diff --git a/java-filestore/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStubSettings.java b/java-filestore/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStubSettings.java index dcfc080cc7a1..fe0cde7afd72 100644 --- a/java-filestore/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStubSettings.java +++ b/java-filestore/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStubSettings.java @@ -776,13 +776,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setInitialRetryDelay(Duration.ofMillis(60000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setMaxRetryDelay(Duration.ofMillis(360000L)) .setInitialRpcTimeout(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(900000L)) .build())); builder @@ -800,13 +800,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setInitialRetryDelay(Duration.ofMillis(60000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setMaxRetryDelay(Duration.ofMillis(360000L)) .setInitialRpcTimeout(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(7200000L)) .build())); builder diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreManagerClient.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreManagerClient.java deleted file mode 100644 index c97fcd964bd9..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreManagerClient.java +++ /dev/null @@ -1,1854 +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.filestore.v1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1.stub.CloudFilestoreManagerStub; -import com.google.cloud.filestore.v1.stub.CloudFilestoreManagerStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Configures and manages Cloud Filestore resources. - * - *

Cloud Filestore Manager v1. - * - *

The `file.googleapis.com` service implements the Cloud Filestore API and defines the following - * resource model for managing instances: - * - *

- * - *

Note that location_id must be a GCP `zone` for instances and but to a GCP `region` for - * backups; for example: - * - *

- * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create()) {
- *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
- *   Instance response = cloudFilestoreManagerClient.getInstance(name);
- * }
- * }
- * - *

Note: close() needs to be called on the CloudFilestoreManagerClient object to clean up - * resources such as threads. In the example above, try-with-resources is used, which automatically - * calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of CloudFilestoreManagerSettings - * to create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
- *     CloudFilestoreManagerSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
- *     CloudFilestoreManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
- * }
- * - *

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.
- * CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
- *     CloudFilestoreManagerSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             CloudFilestoreManagerSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class CloudFilestoreManagerClient implements BackgroundResource { - private final CloudFilestoreManagerSettings settings; - private final CloudFilestoreManagerStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of CloudFilestoreManagerClient with default settings. */ - public static final CloudFilestoreManagerClient create() throws IOException { - return create(CloudFilestoreManagerSettings.newBuilder().build()); - } - - /** - * Constructs an instance of CloudFilestoreManagerClient, using the given settings. The channels - * are created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final CloudFilestoreManagerClient create(CloudFilestoreManagerSettings settings) - throws IOException { - return new CloudFilestoreManagerClient(settings); - } - - /** - * Constructs an instance of CloudFilestoreManagerClient, using the given stub for making calls. - * This is for advanced usage - prefer using create(CloudFilestoreManagerSettings). - */ - public static final CloudFilestoreManagerClient create(CloudFilestoreManagerStub stub) { - return new CloudFilestoreManagerClient(stub); - } - - /** - * Constructs an instance of CloudFilestoreManagerClient, 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 CloudFilestoreManagerClient(CloudFilestoreManagerSettings settings) throws IOException { - this.settings = settings; - this.stub = ((CloudFilestoreManagerStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected CloudFilestoreManagerClient(CloudFilestoreManagerStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final CloudFilestoreManagerSettings getSettings() { - return settings; - } - - public CloudFilestoreManagerStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project and location for which to retrieve instance information, in - * the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map - * to GCP zones, for example **us-west1-b**. To retrieve instance information - * for all locations, use "-" for the `{location}` value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInstancesPagedResponse listInstances(LocationName parent) { - ListInstancesRequest request = - ListInstancesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listInstances(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project and location for which to retrieve instance information, in - * the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map - * to GCP zones, for example **us-west1-b**. To retrieve instance information - * for all locations, use "-" for the `{location}` value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInstancesPagedResponse listInstances(String parent) { - ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); - return listInstances(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListInstancesRequest request =
-   *       ListInstancesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (Instance element : cloudFilestoreManagerClient.listInstances(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 ListInstancesPagedResponse listInstances(ListInstancesRequest request) { - return listInstancesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListInstancesRequest request =
-   *       ListInstancesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.listInstancesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Instance element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listInstancesPagedCallable() { - return stub.listInstancesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListInstancesRequest request =
-   *       ListInstancesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListInstancesResponse response =
-   *         cloudFilestoreManagerClient.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;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listInstancesCallable() { - return stub.listInstancesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   Instance response = cloudFilestoreManagerClient.getInstance(name);
-   * }
-   * }
- * - * @param name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Instance getInstance(InstanceName name) { - GetInstanceRequest request = - GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getInstance(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
-   *   Instance response = cloudFilestoreManagerClient.getInstance(name);
-   * }
-   * }
- * - * @param name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Instance getInstance(String name) { - GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); - return getInstance(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   GetInstanceRequest request =
-   *       GetInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   Instance response = cloudFilestoreManagerClient.getInstance(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 Instance getInstance(GetInstanceRequest request) { - return getInstanceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   GetInstanceRequest request =
-   *       GetInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.getInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getInstanceCallable() { - return stub.getInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Instance instance = Instance.newBuilder().build();
-   *   String instanceId = "instanceId902024336";
-   *   Instance response =
-   *       cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get();
-   * }
-   * }
- * - * @param parent Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map to GCP - * zones, for example **us-west1-b**. - * @param instance Required. An [instance resource][google.cloud.filestore.v1.Instance] - * @param instanceId Required. The name of the instance to create. The name must be unique for the - * specified project and location. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createInstanceAsync( - LocationName parent, Instance instance, String instanceId) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInstance(instance) - .setInstanceId(instanceId) - .build(); - return createInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Instance instance = Instance.newBuilder().build();
-   *   String instanceId = "instanceId902024336";
-   *   Instance response =
-   *       cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get();
-   * }
-   * }
- * - * @param parent Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map to GCP - * zones, for example **us-west1-b**. - * @param instance Required. An [instance resource][google.cloud.filestore.v1.Instance] - * @param instanceId Required. The name of the instance to create. The name must be unique for the - * specified project and location. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createInstanceAsync( - String parent, Instance instance, String instanceId) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(parent) - .setInstance(instance) - .setInstanceId(instanceId) - .build(); - return createInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateInstanceRequest request =
-   *       CreateInstanceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInstanceId("instanceId902024336")
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   Instance response = cloudFilestoreManagerClient.createInstanceAsync(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 createInstanceAsync( - CreateInstanceRequest request) { - return createInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateInstanceRequest request =
-   *       CreateInstanceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInstanceId("instanceId902024336")
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.createInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createInstanceOperationCallable() { - return stub.createInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateInstanceRequest request =
-   *       CreateInstanceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInstanceId("instanceId902024336")
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.createInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createInstanceCallable() { - return stub.createInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   Instance instance = Instance.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Instance response =
-   *       cloudFilestoreManagerClient.updateInstanceAsync(instance, updateMask).get();
-   * }
-   * }
- * - * @param instance Only fields specified in update_mask are updated. - * @param updateMask Mask of fields to update. At least one path must be supplied in this field. - * The elements of the repeated paths field may only include these fields: - *
    - *
  • "description" - *
  • "file_shares" - *
  • "labels" - *
- * - * @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. - /** - * Updates the settings of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateInstanceRequest request =
-   *       UpdateInstanceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   Instance response = cloudFilestoreManagerClient.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. - /** - * Updates the settings of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateInstanceRequest request =
-   *       UpdateInstanceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.updateInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateInstanceOperationCallable() { - return stub.updateInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateInstanceRequest request =
-   *       UpdateInstanceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.updateInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateInstanceCallable() { - return stub.updateInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores an existing instance's file share from a backup. - * - *

The capacity of the instance needs to be equal to or larger than the capacity of the backup - * (and also equal to or larger than the minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   RestoreInstanceRequest request =
-   *       RestoreInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .setFileShare("fileShare-1327728701")
-   *           .build();
-   *   Instance response = cloudFilestoreManagerClient.restoreInstanceAsync(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 restoreInstanceAsync( - RestoreInstanceRequest request) { - return restoreInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores an existing instance's file share from a backup. - * - *

The capacity of the instance needs to be equal to or larger than the capacity of the backup - * (and also equal to or larger than the minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   RestoreInstanceRequest request =
-   *       RestoreInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .setFileShare("fileShare-1327728701")
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.restoreInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - restoreInstanceOperationCallable() { - return stub.restoreInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores an existing instance's file share from a backup. - * - *

The capacity of the instance needs to be equal to or larger than the capacity of the backup - * (and also equal to or larger than the minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   RestoreInstanceRequest request =
-   *       RestoreInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .setFileShare("fileShare-1327728701")
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.restoreInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable restoreInstanceCallable() { - return stub.restoreInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   cloudFilestoreManagerClient.deleteInstanceAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteInstanceAsync(InstanceName name) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
-   *   cloudFilestoreManagerClient.deleteInstanceAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteInstanceAsync(String name) { - DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); - return deleteInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   cloudFilestoreManagerClient.deleteInstanceAsync(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 deleteInstanceAsync( - DeleteInstanceRequest request) { - return deleteInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.deleteInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteInstanceOperationCallable() { - return stub.deleteInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.deleteInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteInstanceCallable() { - return stub.deleteInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project and location for which to retrieve backup information, in - * the format `projects/{project_number}/locations/{location}`. In Cloud Filestore, backup - * locations map to GCP regions, for example **us-west1**. To retrieve backup - * information for all locations, use "-" for the `{location}` value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBackupsPagedResponse listBackups(LocationName parent) { - ListBackupsRequest request = - ListBackupsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listBackups(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project and location for which to retrieve backup information, in - * the format `projects/{project_number}/locations/{location}`. In Cloud Filestore, backup - * locations map to GCP regions, for example **us-west1**. To retrieve backup - * information for all locations, use "-" for the `{location}` value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBackupsPagedResponse listBackups(String parent) { - ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build(); - return listBackups(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListBackupsRequest request =
-   *       ListBackupsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (Backup element : cloudFilestoreManagerClient.listBackups(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 ListBackupsPagedResponse listBackups(ListBackupsRequest request) { - return listBackupsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListBackupsRequest request =
-   *       ListBackupsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.listBackupsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Backup element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listBackupsPagedCallable() { - return stub.listBackupsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListBackupsRequest request =
-   *       ListBackupsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListBackupsResponse response =
-   *         cloudFilestoreManagerClient.listBackupsCallable().call(request);
-   *     for (Backup element : response.getBackupsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listBackupsCallable() { - return stub.listBackupsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
-   *   Backup response = cloudFilestoreManagerClient.getBackup(name);
-   * }
-   * }
- * - * @param name Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Backup getBackup(BackupName name) { - GetBackupRequest request = - GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getBackup(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
-   *   Backup response = cloudFilestoreManagerClient.getBackup(name);
-   * }
-   * }
- * - * @param name Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Backup getBackup(String name) { - GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build(); - return getBackup(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   GetBackupRequest request =
-   *       GetBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   Backup response = cloudFilestoreManagerClient.getBackup(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 Backup getBackup(GetBackupRequest request) { - return getBackupCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   GetBackupRequest request =
-   *       GetBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.getBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getBackupCallable() { - return stub.getBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Backup backup = Backup.newBuilder().build();
-   *   String backupId = "backupId2121930365";
-   *   Backup response =
-   *       cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get();
-   * }
-   * }
- * - * @param parent Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, backup locations map - * to GCP regions, for example **us-west1**. - * @param backup Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @param backupId Required. The ID to use for the backup. The ID must be unique within the - * specified project and location. - *

This value must start with a lowercase letter followed by up to 62 lowercase letters, - * numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern - * will trigger an INVALID_ARGUMENT error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createBackupAsync( - LocationName parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Backup backup = Backup.newBuilder().build();
-   *   String backupId = "backupId2121930365";
-   *   Backup response =
-   *       cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get();
-   * }
-   * }
- * - * @param parent Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, backup locations map - * to GCP regions, for example **us-west1**. - * @param backup Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @param backupId Required. The ID to use for the backup. The ID must be unique within the - * specified project and location. - *

This value must start with a lowercase letter followed by up to 62 lowercase letters, - * numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern - * will trigger an INVALID_ARGUMENT error. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createBackupAsync( - String parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateBackupRequest request =
-   *       CreateBackupRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setBackupId("backupId2121930365")
-   *           .build();
-   *   Backup response = cloudFilestoreManagerClient.createBackupAsync(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 createBackupAsync( - CreateBackupRequest request) { - return createBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateBackupRequest request =
-   *       CreateBackupRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setBackupId("backupId2121930365")
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.createBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createBackupOperationCallable() { - return stub.createBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateBackupRequest request =
-   *       CreateBackupRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setBackupId("backupId2121930365")
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.createBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createBackupCallable() { - return stub.createBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
-   *   cloudFilestoreManagerClient.deleteBackupAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteBackupAsync(BackupName name) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
-   *   cloudFilestoreManagerClient.deleteBackupAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteBackupAsync(String name) { - DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   cloudFilestoreManagerClient.deleteBackupAsync(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 deleteBackupAsync( - DeleteBackupRequest request) { - return deleteBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.deleteBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteBackupOperationCallable() { - return stub.deleteBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.deleteBackupCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteBackupCallable() { - return stub.deleteBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   Backup backup = Backup.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Backup response = cloudFilestoreManagerClient.updateBackupAsync(backup, updateMask).get();
-   * }
-   * }
- * - * @param backup Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @param updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture updateBackupAsync( - Backup backup, FieldMask updateMask) { - UpdateBackupRequest request = - UpdateBackupRequest.newBuilder().setBackup(backup).setUpdateMask(updateMask).build(); - return updateBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateBackupRequest request =
-   *       UpdateBackupRequest.newBuilder()
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Backup response = cloudFilestoreManagerClient.updateBackupAsync(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 updateBackupAsync( - UpdateBackupRequest request) { - return updateBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateBackupRequest request =
-   *       UpdateBackupRequest.newBuilder()
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.updateBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateBackupOperationCallable() { - return stub.updateBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateBackupRequest request =
-   *       UpdateBackupRequest.newBuilder()
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.updateBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateBackupCallable() { - return stub.updateBackupCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListInstancesPagedResponse - extends AbstractPagedListResponse< - ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage, - ListInstancesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListInstancesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListInstancesPagedResponse(ListInstancesPage page) { - super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListInstancesPage - extends AbstractPage< - ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { - - private ListInstancesPage( - PageContext context, - ListInstancesResponse response) { - super(context, response); - } - - private static ListInstancesPage createEmptyPage() { - return new ListInstancesPage(null, null); - } - - @Override - protected ListInstancesPage createPage( - PageContext context, - ListInstancesResponse response) { - return new ListInstancesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListInstancesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage, - ListInstancesFixedSizeCollection> { - - private ListInstancesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListInstancesFixedSizeCollection createEmptyCollection() { - return new ListInstancesFixedSizeCollection(null, 0); - } - - @Override - protected ListInstancesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListInstancesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListBackupsPagedResponse - extends AbstractPagedListResponse< - ListBackupsRequest, ListBackupsResponse, Backup, ListBackupsPage, - ListBackupsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListBackupsPagedResponse(ListBackupsPage page) { - super(page, ListBackupsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListBackupsPage - extends AbstractPage { - - private ListBackupsPage( - PageContext context, - ListBackupsResponse response) { - super(context, response); - } - - private static ListBackupsPage createEmptyPage() { - return new ListBackupsPage(null, null); - } - - @Override - protected ListBackupsPage createPage( - PageContext context, - ListBackupsResponse response) { - return new ListBackupsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListBackupsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListBackupsRequest, ListBackupsResponse, Backup, ListBackupsPage, - ListBackupsFixedSizeCollection> { - - private ListBackupsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListBackupsFixedSizeCollection createEmptyCollection() { - return new ListBackupsFixedSizeCollection(null, 0); - } - - @Override - protected ListBackupsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListBackupsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreManagerSettings.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreManagerSettings.java deleted file mode 100644 index b0cdef7311b1..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreManagerSettings.java +++ /dev/null @@ -1,407 +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.filestore.v1; - -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -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; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1.stub.CloudFilestoreManagerStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link CloudFilestoreManagerClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (file.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getInstance to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * CloudFilestoreManagerSettings.Builder cloudFilestoreManagerSettingsBuilder =
- *     CloudFilestoreManagerSettings.newBuilder();
- * cloudFilestoreManagerSettingsBuilder
- *     .getInstanceSettings()
- *     .setRetrySettings(
- *         cloudFilestoreManagerSettingsBuilder
- *             .getInstanceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
- *     cloudFilestoreManagerSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class CloudFilestoreManagerSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listInstances. */ - public PagedCallSettings - listInstancesSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).listInstancesSettings(); - } - - /** Returns the object with the settings used for calls to getInstance. */ - public UnaryCallSettings getInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).getInstanceSettings(); - } - - /** Returns the object with the settings used for calls to createInstance. */ - public UnaryCallSettings createInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).createInstanceSettings(); - } - - /** Returns the object with the settings used for calls to createInstance. */ - public OperationCallSettings - createInstanceOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()) - .createInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateInstance. */ - public UnaryCallSettings updateInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).updateInstanceSettings(); - } - - /** Returns the object with the settings used for calls to updateInstance. */ - public OperationCallSettings - updateInstanceOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()) - .updateInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to restoreInstance. */ - public UnaryCallSettings restoreInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).restoreInstanceSettings(); - } - - /** Returns the object with the settings used for calls to restoreInstance. */ - public OperationCallSettings - restoreInstanceOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()) - .restoreInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public UnaryCallSettings deleteInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).deleteInstanceSettings(); - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public OperationCallSettings - deleteInstanceOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()) - .deleteInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).listBackupsSettings(); - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).getBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).createBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).createBackupOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).deleteBackupSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).deleteBackupOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateBackup. */ - public UnaryCallSettings updateBackupSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).updateBackupSettings(); - } - - /** Returns the object with the settings used for calls to updateBackup. */ - public OperationCallSettings - updateBackupOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).updateBackupOperationSettings(); - } - - public static final CloudFilestoreManagerSettings create(CloudFilestoreManagerStubSettings stub) - throws IOException { - return new CloudFilestoreManagerSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return CloudFilestoreManagerStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return CloudFilestoreManagerStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return CloudFilestoreManagerStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** 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); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected CloudFilestoreManagerSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for CloudFilestoreManagerSettings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(CloudFilestoreManagerStubSettings.newBuilder(clientContext)); - } - - protected Builder(CloudFilestoreManagerSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(CloudFilestoreManagerStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(CloudFilestoreManagerStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(CloudFilestoreManagerStubSettings.newHttpJsonBuilder()); - } - - public CloudFilestoreManagerStubSettings.Builder getStubSettingsBuilder() { - return ((CloudFilestoreManagerStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listInstances. */ - public PagedCallSettings.Builder< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - listInstancesSettings() { - return getStubSettingsBuilder().listInstancesSettings(); - } - - /** Returns the builder for the settings used for calls to getInstance. */ - public UnaryCallSettings.Builder getInstanceSettings() { - return getStubSettingsBuilder().getInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to createInstance. */ - public UnaryCallSettings.Builder createInstanceSettings() { - return getStubSettingsBuilder().createInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to createInstance. */ - public OperationCallSettings.Builder - createInstanceOperationSettings() { - return getStubSettingsBuilder().createInstanceOperationSettings(); - } - - /** 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 restoreInstance. */ - public UnaryCallSettings.Builder restoreInstanceSettings() { - return getStubSettingsBuilder().restoreInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to restoreInstance. */ - public OperationCallSettings.Builder - restoreInstanceOperationSettings() { - return getStubSettingsBuilder().restoreInstanceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - public UnaryCallSettings.Builder deleteInstanceSettings() { - return getStubSettingsBuilder().deleteInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - public OperationCallSettings.Builder - deleteInstanceOperationSettings() { - return getStubSettingsBuilder().deleteInstanceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return getStubSettingsBuilder().listBackupsSettings(); - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getStubSettingsBuilder().getBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return getStubSettingsBuilder().createBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public OperationCallSettings.Builder - createBackupOperationSettings() { - return getStubSettingsBuilder().createBackupOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return getStubSettingsBuilder().deleteBackupSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return getStubSettingsBuilder().deleteBackupOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateBackup. */ - public UnaryCallSettings.Builder updateBackupSettings() { - return getStubSettingsBuilder().updateBackupSettings(); - } - - /** Returns the builder for the settings used for calls to updateBackup. */ - public OperationCallSettings.Builder - updateBackupOperationSettings() { - return getStubSettingsBuilder().updateBackupOperationSettings(); - } - - @Override - public CloudFilestoreManagerSettings build() throws IOException { - return new CloudFilestoreManagerSettings(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/gapic_metadata.json b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/gapic_metadata.json deleted file mode 100644 index 9a96f22adc3f..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/gapic_metadata.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.filestore.v1", - "libraryPackage": "com.google.cloud.filestore.v1", - "services": { - "CloudFilestoreManager": { - "clients": { - "grpc": { - "libraryClient": "CloudFilestoreManagerClient", - "rpcs": { - "CreateBackup": { - "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] - }, - "CreateInstance": { - "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] - }, - "DeleteBackup": { - "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] - }, - "DeleteInstance": { - "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] - }, - "GetBackup": { - "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] - }, - "GetInstance": { - "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"] - }, - "ListBackups": { - "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] - }, - "ListInstances": { - "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] - }, - "RestoreInstance": { - "methods": ["restoreInstanceAsync", "restoreInstanceOperationCallable", "restoreInstanceCallable"] - }, - "UpdateBackup": { - "methods": ["updateBackupAsync", "updateBackupAsync", "updateBackupOperationCallable", "updateBackupCallable"] - }, - "UpdateInstance": { - "methods": ["updateInstanceAsync", "updateInstanceAsync", "updateInstanceOperationCallable", "updateInstanceCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/package-info.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/package-info.java deleted file mode 100644 index 648fcc9d0f05..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/package-info.java +++ /dev/null @@ -1,65 +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. - */ - -/** - * A client to Cloud Filestore API - * - *

The interfaces provided are listed below, along with usage samples. - * - *

======================= CloudFilestoreManagerClient ======================= - * - *

Service Description: Configures and manages Cloud Filestore resources. - * - *

Cloud Filestore Manager v1. - * - *

The `file.googleapis.com` service implements the Cloud Filestore API and defines the following - * resource model for managing instances: - * - *

    - *
  • The service works with a collection of cloud projects, named: `/projects/*` - *
  • Each project has a collection of available locations, named: `/locations/*` - *
  • Each location has a collection of instances and backups, named: `/instances/*` and - * `/backups/*` respectively. - *
  • As such, Cloud Filestore instances are resources of the form: - * `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` and backups - * are resources of the form: - * `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` - *
- * - *

Note that location_id must be a GCP `zone` for instances and but to a GCP `region` for - * backups; for example: - * - *

    - *
  • `projects/12345/locations/us-central1-c/instances/my-filestore` - *
  • `projects/12345/locations/us-central1/backups/my-backup` - *
- * - *

Sample for CloudFilestoreManagerClient: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create()) {
- *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
- *   Instance response = cloudFilestoreManagerClient.getInstance(name);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.filestore.v1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/CloudFilestoreManagerStub.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/CloudFilestoreManagerStub.java deleted file mode 100644 index ff6d6eb04976..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/CloudFilestoreManagerStub.java +++ /dev/null @@ -1,153 +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.filestore.v1.stub; - -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -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.common.OperationMetadata; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CreateBackupRequest; -import com.google.cloud.filestore.v1.CreateInstanceRequest; -import com.google.cloud.filestore.v1.DeleteBackupRequest; -import com.google.cloud.filestore.v1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1.GetBackupRequest; -import com.google.cloud.filestore.v1.GetInstanceRequest; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.ListBackupsRequest; -import com.google.cloud.filestore.v1.ListBackupsResponse; -import com.google.cloud.filestore.v1.ListInstancesRequest; -import com.google.cloud.filestore.v1.ListInstancesResponse; -import com.google.cloud.filestore.v1.RestoreInstanceRequest; -import com.google.cloud.filestore.v1.UpdateBackupRequest; -import com.google.cloud.filestore.v1.UpdateInstanceRequest; -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. -/** - * Base stub class for the CloudFilestoreManager service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class CloudFilestoreManagerStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable - listInstancesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listInstancesPagedCallable()"); - } - - public UnaryCallable listInstancesCallable() { - throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); - } - - public UnaryCallable getInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); - } - - public OperationCallable - createInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createInstanceOperationCallable()"); - } - - public UnaryCallable createInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: createInstanceCallable()"); - } - - public OperationCallable - updateInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateInstanceOperationCallable()"); - } - - public UnaryCallable updateInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: updateInstanceCallable()"); - } - - public OperationCallable - restoreInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: restoreInstanceOperationCallable()"); - } - - public UnaryCallable restoreInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: restoreInstanceCallable()"); - } - - public OperationCallable - deleteInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteInstanceOperationCallable()"); - } - - public UnaryCallable deleteInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); - } - - public UnaryCallable listBackupsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); - } - - public UnaryCallable listBackupsCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); - } - - public UnaryCallable getBackupCallable() { - throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); - } - - public OperationCallable - createBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupOperationCallable()"); - } - - public UnaryCallable createBackupCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); - } - - public OperationCallable - deleteBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); - } - - public UnaryCallable deleteBackupCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); - } - - public OperationCallable - updateBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateBackupOperationCallable()"); - } - - public UnaryCallable updateBackupCallable() { - throw new UnsupportedOperationException("Not implemented: updateBackupCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/CloudFilestoreManagerStubSettings.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/CloudFilestoreManagerStubSettings.java deleted file mode 100644 index 02f498d5b80b..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/CloudFilestoreManagerStubSettings.java +++ /dev/null @@ -1,1045 +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.filestore.v1.stub; - -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -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; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -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.common.OperationMetadata; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CreateBackupRequest; -import com.google.cloud.filestore.v1.CreateInstanceRequest; -import com.google.cloud.filestore.v1.DeleteBackupRequest; -import com.google.cloud.filestore.v1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1.GetBackupRequest; -import com.google.cloud.filestore.v1.GetInstanceRequest; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.ListBackupsRequest; -import com.google.cloud.filestore.v1.ListBackupsResponse; -import com.google.cloud.filestore.v1.ListInstancesRequest; -import com.google.cloud.filestore.v1.ListInstancesResponse; -import com.google.cloud.filestore.v1.RestoreInstanceRequest; -import com.google.cloud.filestore.v1.UpdateBackupRequest; -import com.google.cloud.filestore.v1.UpdateInstanceRequest; -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; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link CloudFilestoreManagerStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (file.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getInstance to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * CloudFilestoreManagerStubSettings.Builder cloudFilestoreManagerSettingsBuilder =
- *     CloudFilestoreManagerStubSettings.newBuilder();
- * cloudFilestoreManagerSettingsBuilder
- *     .getInstanceSettings()
- *     .setRetrySettings(
- *         cloudFilestoreManagerSettingsBuilder
- *             .getInstanceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * CloudFilestoreManagerStubSettings cloudFilestoreManagerSettings =
- *     cloudFilestoreManagerSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class CloudFilestoreManagerStubSettings - extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - listInstancesSettings; - private final UnaryCallSettings getInstanceSettings; - private final UnaryCallSettings createInstanceSettings; - private final OperationCallSettings - createInstanceOperationSettings; - private final UnaryCallSettings updateInstanceSettings; - private final OperationCallSettings - updateInstanceOperationSettings; - private final UnaryCallSettings restoreInstanceSettings; - private final OperationCallSettings - restoreInstanceOperationSettings; - private final UnaryCallSettings deleteInstanceSettings; - private final OperationCallSettings - deleteInstanceOperationSettings; - private final PagedCallSettings - listBackupsSettings; - private final UnaryCallSettings getBackupSettings; - private final UnaryCallSettings createBackupSettings; - private final OperationCallSettings - createBackupOperationSettings; - private final UnaryCallSettings deleteBackupSettings; - private final OperationCallSettings - deleteBackupOperationSettings; - private final UnaryCallSettings updateBackupSettings; - private final OperationCallSettings - updateBackupOperationSettings; - - private static final PagedListDescriptor - LIST_INSTANCES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListInstancesRequest injectToken(ListInstancesRequest payload, String token) { - return ListInstancesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListInstancesRequest injectPageSize(ListInstancesRequest payload, int pageSize) { - return ListInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListInstancesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListInstancesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListInstancesResponse payload) { - return payload.getInstancesList() == null - ? ImmutableList.of() - : payload.getInstancesList(); - } - }; - - private static final PagedListDescriptor - LIST_BACKUPS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListBackupsRequest injectToken(ListBackupsRequest payload, String token) { - return ListBackupsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListBackupsRequest injectPageSize(ListBackupsRequest payload, int pageSize) { - return ListBackupsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListBackupsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListBackupsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListBackupsResponse payload) { - return payload.getBackupsList() == null - ? ImmutableList.of() - : payload.getBackupsList(); - } - }; - - private static final PagedListResponseFactory< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - LIST_INSTANCES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListInstancesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_INSTANCES_PAGE_STR_DESC, request, context); - return ListInstancesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - LIST_BACKUPS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListBackupsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_BACKUPS_PAGE_STR_DESC, request, context); - return ListBackupsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listInstances. */ - public PagedCallSettings - listInstancesSettings() { - return listInstancesSettings; - } - - /** Returns the object with the settings used for calls to getInstance. */ - public UnaryCallSettings getInstanceSettings() { - return getInstanceSettings; - } - - /** Returns the object with the settings used for calls to createInstance. */ - public UnaryCallSettings createInstanceSettings() { - return createInstanceSettings; - } - - /** Returns the object with the settings used for calls to createInstance. */ - public OperationCallSettings - createInstanceOperationSettings() { - return createInstanceOperationSettings; - } - - /** 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 restoreInstance. */ - public UnaryCallSettings restoreInstanceSettings() { - return restoreInstanceSettings; - } - - /** Returns the object with the settings used for calls to restoreInstance. */ - public OperationCallSettings - restoreInstanceOperationSettings() { - return restoreInstanceOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public UnaryCallSettings deleteInstanceSettings() { - return deleteInstanceSettings; - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public OperationCallSettings - deleteInstanceOperationSettings() { - return deleteInstanceOperationSettings; - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return getBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return createBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - /** Returns the object with the settings used for calls to updateBackup. */ - public UnaryCallSettings updateBackupSettings() { - return updateBackupSettings; - } - - /** Returns the object with the settings used for calls to updateBackup. */ - public OperationCallSettings - updateBackupOperationSettings() { - return updateBackupOperationSettings; - } - - public CloudFilestoreManagerStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcCloudFilestoreManagerStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonCloudFilestoreManagerStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "file.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "file.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** 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 defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(CloudFilestoreManagerStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @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(CloudFilestoreManagerStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return CloudFilestoreManagerStubSettings.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); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected CloudFilestoreManagerStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listInstancesSettings = settingsBuilder.listInstancesSettings().build(); - getInstanceSettings = settingsBuilder.getInstanceSettings().build(); - createInstanceSettings = settingsBuilder.createInstanceSettings().build(); - createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build(); - updateInstanceSettings = settingsBuilder.updateInstanceSettings().build(); - updateInstanceOperationSettings = settingsBuilder.updateInstanceOperationSettings().build(); - restoreInstanceSettings = settingsBuilder.restoreInstanceSettings().build(); - restoreInstanceOperationSettings = settingsBuilder.restoreInstanceOperationSettings().build(); - deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); - deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); - listBackupsSettings = settingsBuilder.listBackupsSettings().build(); - getBackupSettings = settingsBuilder.getBackupSettings().build(); - createBackupSettings = settingsBuilder.createBackupSettings().build(); - createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); - deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); - deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); - updateBackupSettings = settingsBuilder.updateBackupSettings().build(); - updateBackupOperationSettings = settingsBuilder.updateBackupOperationSettings().build(); - } - - /** Builder for CloudFilestoreManagerStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - listInstancesSettings; - private final UnaryCallSettings.Builder getInstanceSettings; - private final UnaryCallSettings.Builder - createInstanceSettings; - private final OperationCallSettings.Builder - createInstanceOperationSettings; - private final UnaryCallSettings.Builder - updateInstanceSettings; - private final OperationCallSettings.Builder - updateInstanceOperationSettings; - private final UnaryCallSettings.Builder - restoreInstanceSettings; - private final OperationCallSettings.Builder - restoreInstanceOperationSettings; - private final UnaryCallSettings.Builder - deleteInstanceSettings; - private final OperationCallSettings.Builder - deleteInstanceOperationSettings; - private final PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings; - private final UnaryCallSettings.Builder getBackupSettings; - private final UnaryCallSettings.Builder createBackupSettings; - private final OperationCallSettings.Builder - createBackupOperationSettings; - private final UnaryCallSettings.Builder deleteBackupSettings; - private final OperationCallSettings.Builder - deleteBackupOperationSettings; - private final UnaryCallSettings.Builder updateBackupSettings; - private final OperationCallSettings.Builder - updateBackupOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(250L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(32000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000000L)) - .setTotalTimeout(Duration.ofMillis(60000000L)) - .build(); - definitions.put("no_retry_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(14400000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(14400000L)) - .setTotalTimeout(Duration.ofMillis(14400000L)) - .build(); - definitions.put("no_retry_2_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("no_retry_3_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); - getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createInstanceOperationSettings = OperationCallSettings.newBuilder(); - updateInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateInstanceOperationSettings = OperationCallSettings.newBuilder(); - restoreInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - restoreInstanceOperationSettings = OperationCallSettings.newBuilder(); - deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); - listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); - getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupOperationSettings = OperationCallSettings.newBuilder(); - deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteBackupOperationSettings = OperationCallSettings.newBuilder(); - updateBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateBackupOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listInstancesSettings, - getInstanceSettings, - createInstanceSettings, - updateInstanceSettings, - restoreInstanceSettings, - deleteInstanceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings, - updateBackupSettings); - initDefaults(this); - } - - protected Builder(CloudFilestoreManagerStubSettings settings) { - super(settings); - - listInstancesSettings = settings.listInstancesSettings.toBuilder(); - getInstanceSettings = settings.getInstanceSettings.toBuilder(); - createInstanceSettings = settings.createInstanceSettings.toBuilder(); - createInstanceOperationSettings = settings.createInstanceOperationSettings.toBuilder(); - updateInstanceSettings = settings.updateInstanceSettings.toBuilder(); - updateInstanceOperationSettings = settings.updateInstanceOperationSettings.toBuilder(); - restoreInstanceSettings = settings.restoreInstanceSettings.toBuilder(); - restoreInstanceOperationSettings = settings.restoreInstanceOperationSettings.toBuilder(); - deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); - deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); - listBackupsSettings = settings.listBackupsSettings.toBuilder(); - getBackupSettings = settings.getBackupSettings.toBuilder(); - createBackupSettings = settings.createBackupSettings.toBuilder(); - createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); - deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); - deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); - updateBackupSettings = settings.updateBackupSettings.toBuilder(); - updateBackupOperationSettings = settings.updateBackupOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listInstancesSettings, - getInstanceSettings, - createInstanceSettings, - updateInstanceSettings, - restoreInstanceSettings, - deleteInstanceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings, - updateBackupSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - 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() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); - - builder - .restoreInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); - - builder - .listBackupsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); - - builder - .updateBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); - - builder - .createInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_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 - .updateInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_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 - .restoreInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_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 - .deleteInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.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 - .createBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Backup.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 - .deleteBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.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 - .updateBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Backup.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())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listInstances. */ - public PagedCallSettings.Builder< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - listInstancesSettings() { - return listInstancesSettings; - } - - /** Returns the builder for the settings used for calls to getInstance. */ - public UnaryCallSettings.Builder getInstanceSettings() { - return getInstanceSettings; - } - - /** Returns the builder for the settings used for calls to createInstance. */ - public UnaryCallSettings.Builder createInstanceSettings() { - return createInstanceSettings; - } - - /** Returns the builder for the settings used for calls to createInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createInstanceOperationSettings() { - return createInstanceOperationSettings; - } - - /** 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 restoreInstance. */ - public UnaryCallSettings.Builder restoreInstanceSettings() { - return restoreInstanceSettings; - } - - /** Returns the builder for the settings used for calls to restoreInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - restoreInstanceOperationSettings() { - return restoreInstanceOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - public UnaryCallSettings.Builder deleteInstanceSettings() { - return deleteInstanceSettings; - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteInstanceOperationSettings() { - return deleteInstanceOperationSettings; - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return createBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateBackup. */ - public UnaryCallSettings.Builder updateBackupSettings() { - return updateBackupSettings; - } - - /** Returns the builder for the settings used for calls to updateBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateBackupOperationSettings() { - return updateBackupOperationSettings; - } - - @Override - public CloudFilestoreManagerStubSettings build() throws IOException { - return new CloudFilestoreManagerStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/GrpcCloudFilestoreManagerCallableFactory.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/GrpcCloudFilestoreManagerCallableFactory.java deleted file mode 100644 index 448cde8679b3..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/GrpcCloudFilestoreManagerCallableFactory.java +++ /dev/null @@ -1,113 +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.filestore.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -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.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the CloudFilestoreManager service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcCloudFilestoreManagerCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/GrpcCloudFilestoreManagerStub.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/GrpcCloudFilestoreManagerStub.java deleted file mode 100644 index 8883443cffbb..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/GrpcCloudFilestoreManagerStub.java +++ /dev/null @@ -1,586 +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.filestore.v1.stub; - -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -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.common.OperationMetadata; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CreateBackupRequest; -import com.google.cloud.filestore.v1.CreateInstanceRequest; -import com.google.cloud.filestore.v1.DeleteBackupRequest; -import com.google.cloud.filestore.v1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1.GetBackupRequest; -import com.google.cloud.filestore.v1.GetInstanceRequest; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.ListBackupsRequest; -import com.google.cloud.filestore.v1.ListBackupsResponse; -import com.google.cloud.filestore.v1.ListInstancesRequest; -import com.google.cloud.filestore.v1.ListInstancesResponse; -import com.google.cloud.filestore.v1.RestoreInstanceRequest; -import com.google.cloud.filestore.v1.UpdateBackupRequest; -import com.google.cloud.filestore.v1.UpdateInstanceRequest; -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; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the CloudFilestoreManager service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcCloudFilestoreManagerStub extends CloudFilestoreManagerStub { - private static final MethodDescriptor - listInstancesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/ListInstances") - .setRequestMarshaller( - ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/GetInstance") - .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/CreateInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/UpdateInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - restoreInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/RestoreInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(RestoreInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/DeleteInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listBackupsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/ListBackups") - .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/GetBackup") - .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/CreateBackup") - .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/DeleteBackup") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/UpdateBackup") - .setRequestMarshaller(ProtoUtils.marshaller(UpdateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable listInstancesCallable; - private final UnaryCallable - listInstancesPagedCallable; - private final UnaryCallable getInstanceCallable; - private final UnaryCallable createInstanceCallable; - private final OperationCallable - createInstanceOperationCallable; - private final UnaryCallable updateInstanceCallable; - private final OperationCallable - updateInstanceOperationCallable; - private final UnaryCallable restoreInstanceCallable; - private final OperationCallable - restoreInstanceOperationCallable; - private final UnaryCallable deleteInstanceCallable; - private final OperationCallable - deleteInstanceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - private final UnaryCallable updateBackupCallable; - private final OperationCallable - updateBackupOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcCloudFilestoreManagerStub create( - CloudFilestoreManagerStubSettings settings) throws IOException { - return new GrpcCloudFilestoreManagerStub(settings, ClientContext.create(settings)); - } - - public static final GrpcCloudFilestoreManagerStub create(ClientContext clientContext) - throws IOException { - return new GrpcCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcCloudFilestoreManagerStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcCloudFilestoreManagerStub, 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 GrpcCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcCloudFilestoreManagerCallableFactory()); - } - - /** - * Constructs an instance of GrpcCloudFilestoreManagerStub, 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 GrpcCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings listInstancesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listInstancesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - 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 restoreInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(restoreInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listBackupsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("backup.name", String.valueOf(request.getBackup().getName())); - return params.build(); - }) - .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.createInstanceCallable = - callableFactory.createUnaryCallable( - createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); - this.createInstanceOperationCallable = - callableFactory.createOperationCallable( - createInstanceTransportSettings, - settings.createInstanceOperationSettings(), - clientContext, - operationsStub); - this.updateInstanceCallable = - callableFactory.createUnaryCallable( - updateInstanceTransportSettings, settings.updateInstanceSettings(), clientContext); - this.updateInstanceOperationCallable = - callableFactory.createOperationCallable( - updateInstanceTransportSettings, - settings.updateInstanceOperationSettings(), - clientContext, - operationsStub); - this.restoreInstanceCallable = - callableFactory.createUnaryCallable( - restoreInstanceTransportSettings, settings.restoreInstanceSettings(), clientContext); - this.restoreInstanceOperationCallable = - callableFactory.createOperationCallable( - restoreInstanceTransportSettings, - settings.restoreInstanceOperationSettings(), - clientContext, - operationsStub); - this.deleteInstanceCallable = - callableFactory.createUnaryCallable( - deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); - this.deleteInstanceOperationCallable = - callableFactory.createOperationCallable( - deleteInstanceTransportSettings, - settings.deleteInstanceOperationSettings(), - clientContext, - operationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - operationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - operationsStub); - this.updateBackupCallable = - callableFactory.createUnaryCallable( - updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); - this.updateBackupOperationCallable = - callableFactory.createOperationCallable( - updateBackupTransportSettings, - settings.updateBackupOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listInstancesCallable() { - return listInstancesCallable; - } - - @Override - public UnaryCallable - listInstancesPagedCallable() { - return listInstancesPagedCallable; - } - - @Override - public UnaryCallable getInstanceCallable() { - return getInstanceCallable; - } - - @Override - public UnaryCallable createInstanceCallable() { - return createInstanceCallable; - } - - @Override - public OperationCallable - createInstanceOperationCallable() { - return createInstanceOperationCallable; - } - - @Override - public UnaryCallable updateInstanceCallable() { - return updateInstanceCallable; - } - - @Override - public OperationCallable - updateInstanceOperationCallable() { - return updateInstanceOperationCallable; - } - - @Override - public UnaryCallable restoreInstanceCallable() { - return restoreInstanceCallable; - } - - @Override - public OperationCallable - restoreInstanceOperationCallable() { - return restoreInstanceOperationCallable; - } - - @Override - public UnaryCallable deleteInstanceCallable() { - return deleteInstanceCallable; - } - - @Override - public OperationCallable - deleteInstanceOperationCallable() { - return deleteInstanceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public UnaryCallable updateBackupCallable() { - return updateBackupCallable; - } - - @Override - public OperationCallable - updateBackupOperationCallable() { - return updateBackupOperationCallable; - } - - @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/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/HttpJsonCloudFilestoreManagerCallableFactory.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/HttpJsonCloudFilestoreManagerCallableFactory.java deleted file mode 100644 index a7fa0483931e..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/HttpJsonCloudFilestoreManagerCallableFactory.java +++ /dev/null @@ -1,105 +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.filestore.v1.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 CloudFilestoreManager service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonCloudFilestoreManagerCallableFactory - 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/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/HttpJsonCloudFilestoreManagerStub.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/HttpJsonCloudFilestoreManagerStub.java deleted file mode 100644 index 623735465788..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1/stub/HttpJsonCloudFilestoreManagerStub.java +++ /dev/null @@ -1,876 +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.filestore.v1.stub; - -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -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.longrunning.OperationSnapshot; -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.common.OperationMetadata; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CreateBackupRequest; -import com.google.cloud.filestore.v1.CreateInstanceRequest; -import com.google.cloud.filestore.v1.DeleteBackupRequest; -import com.google.cloud.filestore.v1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1.GetBackupRequest; -import com.google.cloud.filestore.v1.GetInstanceRequest; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.ListBackupsRequest; -import com.google.cloud.filestore.v1.ListBackupsResponse; -import com.google.cloud.filestore.v1.ListInstancesRequest; -import com.google.cloud.filestore.v1.ListInstancesResponse; -import com.google.cloud.filestore.v1.RestoreInstanceRequest; -import com.google.cloud.filestore.v1.UpdateBackupRequest; -import com.google.cloud.filestore.v1.UpdateInstanceRequest; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -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 CloudFilestoreManager service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonCloudFilestoreManagerStub extends CloudFilestoreManagerStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .add(Instance.getDescriptor()) - .add(Backup.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listInstancesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/ListInstances") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{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, "orderBy", request.getOrderBy()); - 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.filestore.v1.CloudFilestoreManager/GetInstance") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{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 - createInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/CreateInstance") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{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, "instanceId", request.getInstanceId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("instance", request.getInstance())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateInstanceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/UpdateInstance") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{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 - restoreInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/RestoreInstance") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/instances/*}:restore", - 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( - (RestoreInstanceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/DeleteInstance") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{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(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteInstanceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - listBackupsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/ListBackups") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/backups", - 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, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListBackupsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/GetBackup") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/backups/*}", - 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(Backup.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/CreateBackup") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/backups", - 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, "backupId", request.getBackupId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create().toBody("backup", request.getBackup())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/DeleteBackup") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/backups/*}", - 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(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1.CloudFilestoreManager/UpdateBackup") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{backup.name=projects/*/locations/*/backups/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "backup.name", request.getBackup().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("backup", request.getBackup())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable listInstancesCallable; - private final UnaryCallable - listInstancesPagedCallable; - private final UnaryCallable getInstanceCallable; - private final UnaryCallable createInstanceCallable; - private final OperationCallable - createInstanceOperationCallable; - private final UnaryCallable updateInstanceCallable; - private final OperationCallable - updateInstanceOperationCallable; - private final UnaryCallable restoreInstanceCallable; - private final OperationCallable - restoreInstanceOperationCallable; - private final UnaryCallable deleteInstanceCallable; - private final OperationCallable - deleteInstanceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - private final UnaryCallable updateBackupCallable; - private final OperationCallable - updateBackupOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonCloudFilestoreManagerStub create( - CloudFilestoreManagerStubSettings settings) throws IOException { - return new HttpJsonCloudFilestoreManagerStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonCloudFilestoreManagerStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonCloudFilestoreManagerStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonCloudFilestoreManagerStub, 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 HttpJsonCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonCloudFilestoreManagerCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonCloudFilestoreManagerStub, 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 HttpJsonCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings 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 createInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings restoreInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(restoreInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listBackupsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateBackupMethodDescriptor) - .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.createInstanceCallable = - callableFactory.createUnaryCallable( - createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); - this.createInstanceOperationCallable = - callableFactory.createOperationCallable( - createInstanceTransportSettings, - settings.createInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateInstanceCallable = - callableFactory.createUnaryCallable( - updateInstanceTransportSettings, settings.updateInstanceSettings(), clientContext); - this.updateInstanceOperationCallable = - callableFactory.createOperationCallable( - updateInstanceTransportSettings, - settings.updateInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.restoreInstanceCallable = - callableFactory.createUnaryCallable( - restoreInstanceTransportSettings, settings.restoreInstanceSettings(), clientContext); - this.restoreInstanceOperationCallable = - callableFactory.createOperationCallable( - restoreInstanceTransportSettings, - settings.restoreInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteInstanceCallable = - callableFactory.createUnaryCallable( - deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); - this.deleteInstanceOperationCallable = - callableFactory.createOperationCallable( - deleteInstanceTransportSettings, - settings.deleteInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateBackupCallable = - callableFactory.createUnaryCallable( - updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); - this.updateBackupOperationCallable = - callableFactory.createOperationCallable( - updateBackupTransportSettings, - settings.updateBackupOperationSettings(), - 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(createInstanceMethodDescriptor); - methodDescriptors.add(updateInstanceMethodDescriptor); - methodDescriptors.add(restoreInstanceMethodDescriptor); - methodDescriptors.add(deleteInstanceMethodDescriptor); - methodDescriptors.add(listBackupsMethodDescriptor); - methodDescriptors.add(getBackupMethodDescriptor); - methodDescriptors.add(createBackupMethodDescriptor); - methodDescriptors.add(deleteBackupMethodDescriptor); - methodDescriptors.add(updateBackupMethodDescriptor); - 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 createInstanceCallable() { - return createInstanceCallable; - } - - @Override - public OperationCallable - createInstanceOperationCallable() { - return createInstanceOperationCallable; - } - - @Override - public UnaryCallable updateInstanceCallable() { - return updateInstanceCallable; - } - - @Override - public OperationCallable - updateInstanceOperationCallable() { - return updateInstanceOperationCallable; - } - - @Override - public UnaryCallable restoreInstanceCallable() { - return restoreInstanceCallable; - } - - @Override - public OperationCallable - restoreInstanceOperationCallable() { - return restoreInstanceOperationCallable; - } - - @Override - public UnaryCallable deleteInstanceCallable() { - return deleteInstanceCallable; - } - - @Override - public OperationCallable - deleteInstanceOperationCallable() { - return deleteInstanceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public UnaryCallable updateBackupCallable() { - return updateBackupCallable; - } - - @Override - public OperationCallable - updateBackupOperationCallable() { - return updateBackupOperationCallable; - } - - @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/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/CloudFilestoreManagerClientHttpJsonTest.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/CloudFilestoreManagerClientHttpJsonTest.java deleted file mode 100644 index fa407c9021c5..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/CloudFilestoreManagerClientHttpJsonTest.java +++ /dev/null @@ -1,1154 +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.filestore.v1; - -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -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.filestore.v1.stub.HttpJsonCloudFilestoreManagerStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.BoolValue; -import com.google.protobuf.Empty; -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 CloudFilestoreManagerClientHttpJsonTest { - private static MockHttpService mockService; - private static CloudFilestoreManagerClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonCloudFilestoreManagerStub.getMethodDescriptors(), - CloudFilestoreManagerSettings.getDefaultEndpoint()); - CloudFilestoreManagerSettings settings = - CloudFilestoreManagerSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - CloudFilestoreManagerSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = CloudFilestoreManagerClient.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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .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 createInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).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 createInstanceExceptionTest() 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]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createInstanceTest2() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).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 createInstanceExceptionTest2() 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"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateInstanceAsync(instance, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - - Instance actualResponse = client.restoreInstanceAsync(request).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 restoreInstanceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - client.restoreInstanceAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteInstanceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - client.deleteInstanceAsync(name).get(); - - 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 deleteInstanceExceptionTest() 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.deleteInstanceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteInstanceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; - - client.deleteInstanceAsync(name).get(); - - 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 deleteInstanceExceptionTest2() 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.deleteInstanceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().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 listBackupsExceptionTest() 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.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().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 listBackupsExceptionTest2() 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.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(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 getBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-1607/locations/location-1607/backups/backup-1607"; - - Backup actualResponse = client.getBackup(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 getBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-1607/locations/location-1607/backups/backup-1607"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).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 createBackupExceptionTest() 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]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).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 createBackupExceptionTest2() 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"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - 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 deleteBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-1607/locations/location-1607/backups/backup-1607"; - - client.deleteBackupAsync(name).get(); - - 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 deleteBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-1607/locations/location-1607/backups/backup-1607"; - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Backup backup = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Backup actualResponse = client.updateBackupAsync(backup, 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 updateBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Backup backup = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance( - InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateBackupAsync(backup, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/CloudFilestoreManagerClientTest.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/CloudFilestoreManagerClientTest.java deleted file mode 100644 index bccc8b60763a..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/CloudFilestoreManagerClientTest.java +++ /dev/null @@ -1,1043 +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.filestore.v1; - -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.BoolValue; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -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 CloudFilestoreManagerClientTest { - private static MockCloudFilestoreManager mockCloudFilestoreManager; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private CloudFilestoreManagerClient client; - - @BeforeClass - public static void startStaticServer() { - mockCloudFilestoreManager = new MockCloudFilestoreManager(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockCloudFilestoreManager)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - CloudFilestoreManagerSettings settings = - CloudFilestoreManagerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = CloudFilestoreManagerClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listInstancesTest() throws Exception { - Instance responsesElement = Instance.newBuilder().build(); - ListInstancesResponse expectedResponse = - ListInstancesResponse.newBuilder() - .setNextPageToken("") - .addAllInstances(Arrays.asList(responsesElement)) - .build(); - mockCloudFilestoreManager.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 = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInstancesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.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(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - 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 = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInstancesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String parent = "parent-995424086"; - 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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - Instance actualResponse = client.getInstance(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - String name = "name3373707"; - - Instance actualResponse = client.getInstance(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getInstanceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String name = "name3373707"; - client.getInstance(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(instance, actualRequest.getInstance()); - Assert.assertEquals(instanceId, actualRequest.getInstanceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).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()); - } - } - - @Test - public void createInstanceTest2() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - String parent = "parent-995424086"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(instance, actualRequest.getInstance()); - Assert.assertEquals(instanceId, actualRequest.getInstanceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInstanceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String parent = "parent-995424086"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).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()); - } - } - - @Test - public void updateInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - Instance instance = Instance.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Instance actualResponse = client.updateInstanceAsync(instance, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateInstanceRequest actualRequest = ((UpdateInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(instance, actualRequest.getInstance()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - 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()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - - Instance actualResponse = client.restoreInstanceAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreInstanceRequest actualRequest = ((RestoreInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getFileShare(), actualRequest.getFileShare()); - Assert.assertEquals(request.getSourceBackup(), actualRequest.getSourceBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - client.restoreInstanceAsync(request).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()); - } - } - - @Test - public void deleteInstanceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - client.deleteInstanceAsync(name).get(); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - client.deleteInstanceAsync(name).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()); - } - } - - @Test - public void deleteInstanceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteInstanceAsync(name).get(); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteInstanceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String name = "name3373707"; - client.deleteInstanceAsync(name).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()); - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String parent = "parent-995424086"; - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - String name = "name3373707"; - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String name = "name3373707"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).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()); - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).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()); - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - client.deleteBackupAsync(name).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()); - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String name = "name3373707"; - client.deleteBackupAsync(name).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()); - } - } - - @Test - public void updateBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - Backup backup = Backup.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Backup actualResponse = client.updateBackupAsync(backup, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateBackupRequest actualRequest = ((UpdateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - Backup backup = Backup.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateBackupAsync(backup, 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/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/MockCloudFilestoreManager.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/MockCloudFilestoreManager.java deleted file mode 100644 index 9e52af2c7a73..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/MockCloudFilestoreManager.java +++ /dev/null @@ -1,59 +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.filestore.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockCloudFilestoreManager implements MockGrpcService { - private final MockCloudFilestoreManagerImpl serviceImpl; - - public MockCloudFilestoreManager() { - serviceImpl = new MockCloudFilestoreManagerImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/MockCloudFilestoreManagerImpl.java b/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/MockCloudFilestoreManagerImpl.java deleted file mode 100644 index c6caa7f071d3..000000000000 --- a/owl-bot-staging/java-filestore/v1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1/MockCloudFilestoreManagerImpl.java +++ /dev/null @@ -1,290 +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.filestore.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.filestore.v1.CloudFilestoreManagerGrpc.CloudFilestoreManagerImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockCloudFilestoreManagerImpl extends CloudFilestoreManagerImplBase { - private List requests; - private Queue responses; - - public MockCloudFilestoreManagerImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void listInstances( - ListInstancesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListInstancesResponse) { - requests.add(request); - responseObserver.onNext(((ListInstancesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListInstances, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListInstancesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Instance) { - requests.add(request); - responseObserver.onNext(((Instance) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Instance.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createInstance( - CreateInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateInstance( - UpdateInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void restoreInstance( - RestoreInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method RestoreInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteInstance( - DeleteInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listBackups( - ListBackupsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListBackupsResponse) { - requests.add(request); - responseObserver.onNext(((ListBackupsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListBackups, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListBackupsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getBackup(GetBackupRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Backup) { - requests.add(request); - responseObserver.onNext(((Backup) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetBackup, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Backup.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createBackup( - CreateBackupRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateBackup, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteBackup( - DeleteBackupRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteBackup, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateBackup( - UpdateBackupRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateBackup, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1/grpc-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreManagerGrpc.java b/owl-bot-staging/java-filestore/v1/grpc-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreManagerGrpc.java deleted file mode 100644 index f132c8392cdc..000000000000 --- a/owl-bot-staging/java-filestore/v1/grpc-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreManagerGrpc.java +++ /dev/null @@ -1,1270 +0,0 @@ -package com.google.cloud.filestore.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Configures and manages Cloud Filestore resources.
- * Cloud Filestore Manager v1.
- * The `file.googleapis.com` service implements the Cloud Filestore API and
- * defines the following resource model for managing instances:
- * * The service works with a collection of cloud projects, named: `/projects/*`
- * * Each project has a collection of available locations, named: `/locations/*`
- * * Each location has a collection of instances and backups, named:
- * `/instances/*` and `/backups/*` respectively.
- * * As such, Cloud Filestore instances are resources of the form:
- *   `/projects/{project_number}/locations/{location_id}/instances/{instance_id}`
- *   and backups are resources of the form:
- *   `/projects/{project_number}/locations/{location_id}/backup/{backup_id}`
- * Note that location_id must be a GCP `zone` for instances and but to a GCP
- * `region` for backups; for example:
- * * `projects/12345/locations/us-central1-c/instances/my-filestore`
- * * `projects/12345/locations/us-central1/backups/my-backup`
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/filestore/v1/cloud_filestore_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class CloudFilestoreManagerGrpc { - - private CloudFilestoreManagerGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.filestore.v1.CloudFilestoreManager"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getListInstancesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListInstances", - requestType = com.google.cloud.filestore.v1.ListInstancesRequest.class, - responseType = com.google.cloud.filestore.v1.ListInstancesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListInstancesMethod() { - io.grpc.MethodDescriptor getListInstancesMethod; - if ((getListInstancesMethod = CloudFilestoreManagerGrpc.getListInstancesMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getListInstancesMethod = CloudFilestoreManagerGrpc.getListInstancesMethod) == null) { - CloudFilestoreManagerGrpc.getListInstancesMethod = getListInstancesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.ListInstancesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.ListInstancesResponse.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("ListInstances")) - .build(); - } - } - } - return getListInstancesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetInstance", - requestType = com.google.cloud.filestore.v1.GetInstanceRequest.class, - responseType = com.google.cloud.filestore.v1.Instance.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetInstanceMethod() { - io.grpc.MethodDescriptor getGetInstanceMethod; - if ((getGetInstanceMethod = CloudFilestoreManagerGrpc.getGetInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getGetInstanceMethod = CloudFilestoreManagerGrpc.getGetInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getGetInstanceMethod = getGetInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.GetInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.Instance.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("GetInstance")) - .build(); - } - } - } - return getGetInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateInstance", - requestType = com.google.cloud.filestore.v1.CreateInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateInstanceMethod() { - io.grpc.MethodDescriptor getCreateInstanceMethod; - if ((getCreateInstanceMethod = CloudFilestoreManagerGrpc.getCreateInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getCreateInstanceMethod = CloudFilestoreManagerGrpc.getCreateInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getCreateInstanceMethod = getCreateInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.CreateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("CreateInstance")) - .build(); - } - } - } - return getCreateInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateInstance", - requestType = com.google.cloud.filestore.v1.UpdateInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateInstanceMethod() { - io.grpc.MethodDescriptor getUpdateInstanceMethod; - if ((getUpdateInstanceMethod = CloudFilestoreManagerGrpc.getUpdateInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getUpdateInstanceMethod = CloudFilestoreManagerGrpc.getUpdateInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getUpdateInstanceMethod = getUpdateInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.UpdateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("UpdateInstance")) - .build(); - } - } - } - return getUpdateInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getRestoreInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RestoreInstance", - requestType = com.google.cloud.filestore.v1.RestoreInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRestoreInstanceMethod() { - io.grpc.MethodDescriptor getRestoreInstanceMethod; - if ((getRestoreInstanceMethod = CloudFilestoreManagerGrpc.getRestoreInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getRestoreInstanceMethod = CloudFilestoreManagerGrpc.getRestoreInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getRestoreInstanceMethod = getRestoreInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.RestoreInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("RestoreInstance")) - .build(); - } - } - } - return getRestoreInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", - requestType = com.google.cloud.filestore.v1.DeleteInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteInstanceMethod() { - io.grpc.MethodDescriptor getDeleteInstanceMethod; - if ((getDeleteInstanceMethod = CloudFilestoreManagerGrpc.getDeleteInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getDeleteInstanceMethod = CloudFilestoreManagerGrpc.getDeleteInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getDeleteInstanceMethod = getDeleteInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.DeleteInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("DeleteInstance")) - .build(); - } - } - } - return getDeleteInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListBackupsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListBackups", - requestType = com.google.cloud.filestore.v1.ListBackupsRequest.class, - responseType = com.google.cloud.filestore.v1.ListBackupsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListBackupsMethod() { - io.grpc.MethodDescriptor getListBackupsMethod; - if ((getListBackupsMethod = CloudFilestoreManagerGrpc.getListBackupsMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getListBackupsMethod = CloudFilestoreManagerGrpc.getListBackupsMethod) == null) { - CloudFilestoreManagerGrpc.getListBackupsMethod = getListBackupsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackups")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.ListBackupsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.ListBackupsResponse.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("ListBackups")) - .build(); - } - } - } - return getListBackupsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBackup", - requestType = com.google.cloud.filestore.v1.GetBackupRequest.class, - responseType = com.google.cloud.filestore.v1.Backup.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetBackupMethod() { - io.grpc.MethodDescriptor getGetBackupMethod; - if ((getGetBackupMethod = CloudFilestoreManagerGrpc.getGetBackupMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getGetBackupMethod = CloudFilestoreManagerGrpc.getGetBackupMethod) == null) { - CloudFilestoreManagerGrpc.getGetBackupMethod = getGetBackupMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.GetBackupRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.Backup.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("GetBackup")) - .build(); - } - } - } - return getGetBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateBackup", - requestType = com.google.cloud.filestore.v1.CreateBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateBackupMethod() { - io.grpc.MethodDescriptor getCreateBackupMethod; - if ((getCreateBackupMethod = CloudFilestoreManagerGrpc.getCreateBackupMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getCreateBackupMethod = CloudFilestoreManagerGrpc.getCreateBackupMethod) == null) { - CloudFilestoreManagerGrpc.getCreateBackupMethod = getCreateBackupMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.CreateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("CreateBackup")) - .build(); - } - } - } - return getCreateBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", - requestType = com.google.cloud.filestore.v1.DeleteBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteBackupMethod() { - io.grpc.MethodDescriptor getDeleteBackupMethod; - if ((getDeleteBackupMethod = CloudFilestoreManagerGrpc.getDeleteBackupMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getDeleteBackupMethod = CloudFilestoreManagerGrpc.getDeleteBackupMethod) == null) { - CloudFilestoreManagerGrpc.getDeleteBackupMethod = getDeleteBackupMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.DeleteBackupRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("DeleteBackup")) - .build(); - } - } - } - return getDeleteBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateBackup", - requestType = com.google.cloud.filestore.v1.UpdateBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateBackupMethod() { - io.grpc.MethodDescriptor getUpdateBackupMethod; - if ((getUpdateBackupMethod = CloudFilestoreManagerGrpc.getUpdateBackupMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getUpdateBackupMethod = CloudFilestoreManagerGrpc.getUpdateBackupMethod) == null) { - CloudFilestoreManagerGrpc.getUpdateBackupMethod = getUpdateBackupMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1.UpdateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("UpdateBackup")) - .build(); - } - } - } - return getUpdateBackupMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static CloudFilestoreManagerStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public CloudFilestoreManagerStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerStub(channel, callOptions); - } - }; - return CloudFilestoreManagerStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static CloudFilestoreManagerBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public CloudFilestoreManagerBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerBlockingStub(channel, callOptions); - } - }; - return CloudFilestoreManagerBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static CloudFilestoreManagerFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public CloudFilestoreManagerFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerFutureStub(channel, callOptions); - } - }; - return CloudFilestoreManagerFutureStub.newStub(factory, channel); - } - - /** - *
-   * Configures and manages Cloud Filestore resources.
-   * Cloud Filestore Manager v1.
-   * The `file.googleapis.com` service implements the Cloud Filestore API and
-   * defines the following resource model for managing instances:
-   * * The service works with a collection of cloud projects, named: `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   * * Each location has a collection of instances and backups, named:
-   * `/instances/*` and `/backups/*` respectively.
-   * * As such, Cloud Filestore instances are resources of the form:
-   *   `/projects/{project_number}/locations/{location_id}/instances/{instance_id}`
-   *   and backups are resources of the form:
-   *   `/projects/{project_number}/locations/{location_id}/backup/{backup_id}`
-   * Note that location_id must be a GCP `zone` for instances and but to a GCP
-   * `region` for backups; for example:
-   * * `projects/12345/locations/us-central1-c/instances/my-filestore`
-   * * `projects/12345/locations/us-central1/backups/my-backup`
-   * 
- */ - public static abstract class CloudFilestoreManagerImplBase implements io.grpc.BindableService { - - /** - *
-     * Lists all instances in a project for either a specified location
-     * or for all locations.
-     * 
- */ - public void listInstances(com.google.cloud.filestore.v1.ListInstancesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListInstancesMethod(), responseObserver); - } - - /** - *
-     * Gets the details of a specific instance.
-     * 
- */ - public void getInstance(com.google.cloud.filestore.v1.GetInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstanceMethod(), responseObserver); - } - - /** - *
-     * Creates an instance.
-     * When creating from a backup, the capacity of the new instance needs to be
-     * equal to or larger than the capacity of the backup (and also equal to or
-     * larger than the minimum capacity of the tier).
-     * 
- */ - public void createInstance(com.google.cloud.filestore.v1.CreateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateInstanceMethod(), responseObserver); - } - - /** - *
-     * Updates the settings of a specific instance.
-     * 
- */ - public void updateInstance(com.google.cloud.filestore.v1.UpdateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateInstanceMethod(), responseObserver); - } - - /** - *
-     * Restores an existing instance's file share from a backup.
-     * The capacity of the instance needs to be equal to or larger than the
-     * capacity of the backup (and also equal to or larger than the minimum
-     * capacity of the tier).
-     * 
- */ - public void restoreInstance(com.google.cloud.filestore.v1.RestoreInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRestoreInstanceMethod(), responseObserver); - } - - /** - *
-     * Deletes an instance.
-     * 
- */ - public void deleteInstance(com.google.cloud.filestore.v1.DeleteInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteInstanceMethod(), responseObserver); - } - - /** - *
-     * Lists all backups in a project for either a specified location or for all
-     * locations.
-     * 
- */ - public void listBackups(com.google.cloud.filestore.v1.ListBackupsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListBackupsMethod(), responseObserver); - } - - /** - *
-     * Gets the details of a specific backup.
-     * 
- */ - public void getBackup(com.google.cloud.filestore.v1.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); - } - - /** - *
-     * Creates a backup.
-     * 
- */ - public void createBackup(com.google.cloud.filestore.v1.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateBackupMethod(), responseObserver); - } - - /** - *
-     * Deletes a backup.
-     * 
- */ - public void deleteBackup(com.google.cloud.filestore.v1.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteBackupMethod(), responseObserver); - } - - /** - *
-     * Updates the settings of a specific backup.
-     * 
- */ - public void updateBackup(com.google.cloud.filestore.v1.UpdateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateBackupMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListInstancesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.ListInstancesRequest, - com.google.cloud.filestore.v1.ListInstancesResponse>( - this, METHODID_LIST_INSTANCES))) - .addMethod( - getGetInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.GetInstanceRequest, - com.google.cloud.filestore.v1.Instance>( - this, METHODID_GET_INSTANCE))) - .addMethod( - getCreateInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.CreateInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_CREATE_INSTANCE))) - .addMethod( - getUpdateInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.UpdateInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_UPDATE_INSTANCE))) - .addMethod( - getRestoreInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.RestoreInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_RESTORE_INSTANCE))) - .addMethod( - getDeleteInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.DeleteInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_DELETE_INSTANCE))) - .addMethod( - getListBackupsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.ListBackupsRequest, - com.google.cloud.filestore.v1.ListBackupsResponse>( - this, METHODID_LIST_BACKUPS))) - .addMethod( - getGetBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.GetBackupRequest, - com.google.cloud.filestore.v1.Backup>( - this, METHODID_GET_BACKUP))) - .addMethod( - getCreateBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.CreateBackupRequest, - com.google.longrunning.Operation>( - this, METHODID_CREATE_BACKUP))) - .addMethod( - getDeleteBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.DeleteBackupRequest, - com.google.longrunning.Operation>( - this, METHODID_DELETE_BACKUP))) - .addMethod( - getUpdateBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1.UpdateBackupRequest, - com.google.longrunning.Operation>( - this, METHODID_UPDATE_BACKUP))) - .build(); - } - } - - /** - *
-   * Configures and manages Cloud Filestore resources.
-   * Cloud Filestore Manager v1.
-   * The `file.googleapis.com` service implements the Cloud Filestore API and
-   * defines the following resource model for managing instances:
-   * * The service works with a collection of cloud projects, named: `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   * * Each location has a collection of instances and backups, named:
-   * `/instances/*` and `/backups/*` respectively.
-   * * As such, Cloud Filestore instances are resources of the form:
-   *   `/projects/{project_number}/locations/{location_id}/instances/{instance_id}`
-   *   and backups are resources of the form:
-   *   `/projects/{project_number}/locations/{location_id}/backup/{backup_id}`
-   * Note that location_id must be a GCP `zone` for instances and but to a GCP
-   * `region` for backups; for example:
-   * * `projects/12345/locations/us-central1-c/instances/my-filestore`
-   * * `projects/12345/locations/us-central1/backups/my-backup`
-   * 
- */ - public static final class CloudFilestoreManagerStub extends io.grpc.stub.AbstractAsyncStub { - private CloudFilestoreManagerStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected CloudFilestoreManagerStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerStub(channel, callOptions); - } - - /** - *
-     * Lists all instances in a project for either a specified location
-     * or for all locations.
-     * 
- */ - public void listInstances(com.google.cloud.filestore.v1.ListInstancesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListInstancesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the details of a specific instance.
-     * 
- */ - public void getInstance(com.google.cloud.filestore.v1.GetInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates an instance.
-     * When creating from a backup, the capacity of the new instance needs to be
-     * equal to or larger than the capacity of the backup (and also equal to or
-     * larger than the minimum capacity of the tier).
-     * 
- */ - public void createInstance(com.google.cloud.filestore.v1.CreateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the settings of a specific instance.
-     * 
- */ - public void updateInstance(com.google.cloud.filestore.v1.UpdateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Restores an existing instance's file share from a backup.
-     * The capacity of the instance needs to be equal to or larger than the
-     * capacity of the backup (and also equal to or larger than the minimum
-     * capacity of the tier).
-     * 
- */ - public void restoreInstance(com.google.cloud.filestore.v1.RestoreInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRestoreInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes an instance.
-     * 
- */ - public void deleteInstance(com.google.cloud.filestore.v1.DeleteInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists all backups in a project for either a specified location or for all
-     * locations.
-     * 
- */ - public void listBackups(com.google.cloud.filestore.v1.ListBackupsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the details of a specific backup.
-     * 
- */ - public void getBackup(com.google.cloud.filestore.v1.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a backup.
-     * 
- */ - public void createBackup(com.google.cloud.filestore.v1.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a backup.
-     * 
- */ - public void deleteBackup(com.google.cloud.filestore.v1.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the settings of a specific backup.
-     * 
- */ - public void updateBackup(com.google.cloud.filestore.v1.UpdateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Configures and manages Cloud Filestore resources.
-   * Cloud Filestore Manager v1.
-   * The `file.googleapis.com` service implements the Cloud Filestore API and
-   * defines the following resource model for managing instances:
-   * * The service works with a collection of cloud projects, named: `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   * * Each location has a collection of instances and backups, named:
-   * `/instances/*` and `/backups/*` respectively.
-   * * As such, Cloud Filestore instances are resources of the form:
-   *   `/projects/{project_number}/locations/{location_id}/instances/{instance_id}`
-   *   and backups are resources of the form:
-   *   `/projects/{project_number}/locations/{location_id}/backup/{backup_id}`
-   * Note that location_id must be a GCP `zone` for instances and but to a GCP
-   * `region` for backups; for example:
-   * * `projects/12345/locations/us-central1-c/instances/my-filestore`
-   * * `projects/12345/locations/us-central1/backups/my-backup`
-   * 
- */ - public static final class CloudFilestoreManagerBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private CloudFilestoreManagerBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected CloudFilestoreManagerBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerBlockingStub(channel, callOptions); - } - - /** - *
-     * Lists all instances in a project for either a specified location
-     * or for all locations.
-     * 
- */ - public com.google.cloud.filestore.v1.ListInstancesResponse listInstances(com.google.cloud.filestore.v1.ListInstancesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListInstancesMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the details of a specific instance.
-     * 
- */ - public com.google.cloud.filestore.v1.Instance getInstance(com.google.cloud.filestore.v1.GetInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates an instance.
-     * When creating from a backup, the capacity of the new instance needs to be
-     * equal to or larger than the capacity of the backup (and also equal to or
-     * larger than the minimum capacity of the tier).
-     * 
- */ - public com.google.longrunning.Operation createInstance(com.google.cloud.filestore.v1.CreateInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the settings of a specific instance.
-     * 
- */ - public com.google.longrunning.Operation updateInstance(com.google.cloud.filestore.v1.UpdateInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Restores an existing instance's file share from a backup.
-     * The capacity of the instance needs to be equal to or larger than the
-     * capacity of the backup (and also equal to or larger than the minimum
-     * capacity of the tier).
-     * 
- */ - public com.google.longrunning.Operation restoreInstance(com.google.cloud.filestore.v1.RestoreInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRestoreInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes an instance.
-     * 
- */ - public com.google.longrunning.Operation deleteInstance(com.google.cloud.filestore.v1.DeleteInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists all backups in a project for either a specified location or for all
-     * locations.
-     * 
- */ - public com.google.cloud.filestore.v1.ListBackupsResponse listBackups(com.google.cloud.filestore.v1.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListBackupsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the details of a specific backup.
-     * 
- */ - public com.google.cloud.filestore.v1.Backup getBackup(com.google.cloud.filestore.v1.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBackupMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a backup.
-     * 
- */ - public com.google.longrunning.Operation createBackup(com.google.cloud.filestore.v1.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateBackupMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes a backup.
-     * 
- */ - public com.google.longrunning.Operation deleteBackup(com.google.cloud.filestore.v1.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteBackupMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the settings of a specific backup.
-     * 
- */ - public com.google.longrunning.Operation updateBackup(com.google.cloud.filestore.v1.UpdateBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateBackupMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Configures and manages Cloud Filestore resources.
-   * Cloud Filestore Manager v1.
-   * The `file.googleapis.com` service implements the Cloud Filestore API and
-   * defines the following resource model for managing instances:
-   * * The service works with a collection of cloud projects, named: `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   * * Each location has a collection of instances and backups, named:
-   * `/instances/*` and `/backups/*` respectively.
-   * * As such, Cloud Filestore instances are resources of the form:
-   *   `/projects/{project_number}/locations/{location_id}/instances/{instance_id}`
-   *   and backups are resources of the form:
-   *   `/projects/{project_number}/locations/{location_id}/backup/{backup_id}`
-   * Note that location_id must be a GCP `zone` for instances and but to a GCP
-   * `region` for backups; for example:
-   * * `projects/12345/locations/us-central1-c/instances/my-filestore`
-   * * `projects/12345/locations/us-central1/backups/my-backup`
-   * 
- */ - public static final class CloudFilestoreManagerFutureStub extends io.grpc.stub.AbstractFutureStub { - private CloudFilestoreManagerFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected CloudFilestoreManagerFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerFutureStub(channel, callOptions); - } - - /** - *
-     * Lists all instances in a project for either a specified location
-     * or for all locations.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listInstances( - com.google.cloud.filestore.v1.ListInstancesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the details of a specific instance.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getInstance( - com.google.cloud.filestore.v1.GetInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates an instance.
-     * When creating from a backup, the capacity of the new instance needs to be
-     * equal to or larger than the capacity of the backup (and also equal to or
-     * larger than the minimum capacity of the tier).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createInstance( - com.google.cloud.filestore.v1.CreateInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the settings of a specific instance.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateInstance( - com.google.cloud.filestore.v1.UpdateInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Restores an existing instance's file share from a backup.
-     * The capacity of the instance needs to be equal to or larger than the
-     * capacity of the backup (and also equal to or larger than the minimum
-     * capacity of the tier).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture restoreInstance( - com.google.cloud.filestore.v1.RestoreInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRestoreInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes an instance.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteInstance( - com.google.cloud.filestore.v1.DeleteInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists all backups in a project for either a specified location or for all
-     * locations.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listBackups( - com.google.cloud.filestore.v1.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the details of a specific backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getBackup( - com.google.cloud.filestore.v1.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createBackup( - com.google.cloud.filestore.v1.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteBackup( - com.google.cloud.filestore.v1.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the settings of a specific backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateBackup( - com.google.cloud.filestore.v1.UpdateBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_INSTANCES = 0; - private static final int METHODID_GET_INSTANCE = 1; - private static final int METHODID_CREATE_INSTANCE = 2; - private static final int METHODID_UPDATE_INSTANCE = 3; - private static final int METHODID_RESTORE_INSTANCE = 4; - private static final int METHODID_DELETE_INSTANCE = 5; - private static final int METHODID_LIST_BACKUPS = 6; - private static final int METHODID_GET_BACKUP = 7; - private static final int METHODID_CREATE_BACKUP = 8; - private static final int METHODID_DELETE_BACKUP = 9; - private static final int METHODID_UPDATE_BACKUP = 10; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final CloudFilestoreManagerImplBase serviceImpl; - private final int methodId; - - MethodHandlers(CloudFilestoreManagerImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_INSTANCES: - serviceImpl.listInstances((com.google.cloud.filestore.v1.ListInstancesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_INSTANCE: - serviceImpl.getInstance((com.google.cloud.filestore.v1.GetInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_INSTANCE: - serviceImpl.createInstance((com.google.cloud.filestore.v1.CreateInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_INSTANCE: - serviceImpl.updateInstance((com.google.cloud.filestore.v1.UpdateInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_RESTORE_INSTANCE: - serviceImpl.restoreInstance((com.google.cloud.filestore.v1.RestoreInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_INSTANCE: - serviceImpl.deleteInstance((com.google.cloud.filestore.v1.DeleteInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_BACKUPS: - serviceImpl.listBackups((com.google.cloud.filestore.v1.ListBackupsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_BACKUP: - serviceImpl.getBackup((com.google.cloud.filestore.v1.GetBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_BACKUP: - serviceImpl.createBackup((com.google.cloud.filestore.v1.CreateBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_BACKUP: - serviceImpl.deleteBackup((com.google.cloud.filestore.v1.DeleteBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_BACKUP: - serviceImpl.updateBackup((com.google.cloud.filestore.v1.UpdateBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class CloudFilestoreManagerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - CloudFilestoreManagerBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("CloudFilestoreManager"); - } - } - - private static final class CloudFilestoreManagerFileDescriptorSupplier - extends CloudFilestoreManagerBaseDescriptorSupplier { - CloudFilestoreManagerFileDescriptorSupplier() {} - } - - private static final class CloudFilestoreManagerMethodDescriptorSupplier - extends CloudFilestoreManagerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - CloudFilestoreManagerMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new CloudFilestoreManagerFileDescriptorSupplier()) - .addMethod(getListInstancesMethod()) - .addMethod(getGetInstanceMethod()) - .addMethod(getCreateInstanceMethod()) - .addMethod(getUpdateInstanceMethod()) - .addMethod(getRestoreInstanceMethod()) - .addMethod(getDeleteInstanceMethod()) - .addMethod(getListBackupsMethod()) - .addMethod(getGetBackupMethod()) - .addMethod(getCreateBackupMethod()) - .addMethod(getDeleteBackupMethod()) - .addMethod(getUpdateBackupMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/common/OperationMetadata.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/common/OperationMetadata.java deleted file mode 100644 index 22af5772faab..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/common/OperationMetadata.java +++ /dev/null @@ -1,1658 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/common/operation_metadata.proto - -package com.google.cloud.common; - -/** - *
- * Represents the metadata of the long-running operation.
- * 
- * - * Protobuf type {@code google.cloud.common.OperationMetadata} - */ -public final class OperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.common.OperationMetadata) - OperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OperationMetadata() { - target_ = ""; - verb_ = ""; - statusDetail_ = ""; - apiVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OperationMetadata( - 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.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 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - statusDetail_ = s; - break; - } - case 48: { - - cancelRequested_ = input.readBool(); - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = 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.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.common.OperationMetadata.class, com.google.cloud.common.OperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int TARGET_FIELD_NUMBER = 3; - private volatile java.lang.Object target_; - /** - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The target. - */ - @java.lang.Override - public java.lang.String getTarget() { - java.lang.Object ref = target_; - 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(); - target_ = s; - return s; - } - } - /** - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for target. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERB_FIELD_NUMBER = 4; - private volatile java.lang.Object verb_; - /** - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The verb. - */ - @java.lang.Override - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - 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(); - verb_ = s; - return s; - } - } - /** - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for verb. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_DETAIL_FIELD_NUMBER = 5; - private volatile java.lang.Object statusDetail_; - /** - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusDetail. - */ - @java.lang.Override - public java.lang.String getStatusDetail() { - java.lang.Object ref = statusDetail_; - 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(); - statusDetail_ = s; - return s; - } - } - /** - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusDetail. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStatusDetailBytes() { - java.lang.Object ref = statusDetail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - statusDetail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CANCEL_REQUESTED_FIELD_NUMBER = 6; - private boolean cancelRequested_; - /** - *
-   * Output only. Identifies whether the user has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-   * corresponding to `Code.CANCELLED`.
-   * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cancelRequested. - */ - @java.lang.Override - public boolean getCancelRequested() { - return cancelRequested_; - } - - public static final int API_VERSION_FIELD_NUMBER = 7; - private volatile java.lang.Object apiVersion_; - /** - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The apiVersion. - */ - @java.lang.Override - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - 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(); - apiVersion_ = s; - return s; - } - } - /** - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for apiVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiVersion_ = 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 (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusDetail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusDetail_); - } - if (cancelRequested_ != false) { - output.writeBool(6, cancelRequested_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusDetail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusDetail_); - } - if (cancelRequested_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, cancelRequested_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); - } - 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.common.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.common.OperationMetadata other = (com.google.cloud.common.OperationMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!getTarget() - .equals(other.getTarget())) return false; - if (!getVerb() - .equals(other.getVerb())) return false; - if (!getStatusDetail() - .equals(other.getStatusDetail())) return false; - if (getCancelRequested() - != other.getCancelRequested()) return false; - if (!getApiVersion() - .equals(other.getApiVersion())) 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 (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget().hashCode(); - hash = (37 * hash) + VERB_FIELD_NUMBER; - hash = (53 * hash) + getVerb().hashCode(); - hash = (37 * hash) + STATUS_DETAIL_FIELD_NUMBER; - hash = (53 * hash) + getStatusDetail().hashCode(); - hash = (37 * hash) + CANCEL_REQUESTED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getCancelRequested()); - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.common.OperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.common.OperationMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.common.OperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata 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 the metadata of the long-running operation.
-   * 
- * - * Protobuf type {@code google.cloud.common.OperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.common.OperationMetadata) - com.google.cloud.common.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.common.OperationMetadata.class, com.google.cloud.common.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.common.OperationMetadata.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 (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - target_ = ""; - - verb_ = ""; - - statusDetail_ = ""; - - cancelRequested_ = false; - - apiVersion_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.common.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.common.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.common.OperationMetadata build() { - com.google.cloud.common.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.common.OperationMetadata buildPartial() { - com.google.cloud.common.OperationMetadata result = new com.google.cloud.common.OperationMetadata(this); - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - result.target_ = target_; - result.verb_ = verb_; - result.statusDetail_ = statusDetail_; - result.cancelRequested_ = cancelRequested_; - result.apiVersion_ = apiVersion_; - 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.common.OperationMetadata) { - return mergeFrom((com.google.cloud.common.OperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.common.OperationMetadata other) { - if (other == com.google.cloud.common.OperationMetadata.getDefaultInstance()) return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - onChanged(); - } - if (!other.getVerb().isEmpty()) { - verb_ = other.verb_; - onChanged(); - } - if (!other.getStatusDetail().isEmpty()) { - statusDetail_ = other.statusDetail_; - onChanged(); - } - if (other.getCancelRequested() != false) { - setCancelRequested(other.getCancelRequested()); - } - if (!other.getApiVersion().isEmpty()) { - apiVersion_ = other.apiVersion_; - 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.common.OperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.common.OperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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(); - } - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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 com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object target_ = ""; - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The target. - */ - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for target. - */ - public com.google.protobuf.ByteString - getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The target to set. - * @return This builder for chaining. - */ - public Builder setTarget( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - target_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearTarget() { - - target_ = getDefaultInstance().getTarget(); - onChanged(); - return this; - } - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for target to set. - * @return This builder for chaining. - */ - public Builder setTargetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - target_ = value; - onChanged(); - return this; - } - - private java.lang.Object verb_ = ""; - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The verb. - */ - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for verb. - */ - public com.google.protobuf.ByteString - getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The verb to set. - * @return This builder for chaining. - */ - public Builder setVerb( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - verb_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearVerb() { - - verb_ = getDefaultInstance().getVerb(); - onChanged(); - return this; - } - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for verb to set. - * @return This builder for chaining. - */ - public Builder setVerbBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - verb_ = value; - onChanged(); - return this; - } - - private java.lang.Object statusDetail_ = ""; - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusDetail. - */ - public java.lang.String getStatusDetail() { - java.lang.Object ref = statusDetail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusDetail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusDetail. - */ - public com.google.protobuf.ByteString - getStatusDetailBytes() { - java.lang.Object ref = statusDetail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - statusDetail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The statusDetail to set. - * @return This builder for chaining. - */ - public Builder setStatusDetail( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - statusDetail_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearStatusDetail() { - - statusDetail_ = getDefaultInstance().getStatusDetail(); - onChanged(); - return this; - } - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for statusDetail to set. - * @return This builder for chaining. - */ - public Builder setStatusDetailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - statusDetail_ = value; - onChanged(); - return this; - } - - private boolean cancelRequested_ ; - /** - *
-     * Output only. Identifies whether the user has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cancelRequested. - */ - @java.lang.Override - public boolean getCancelRequested() { - return cancelRequested_; - } - /** - *
-     * Output only. Identifies whether the user has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The cancelRequested to set. - * @return This builder for chaining. - */ - public Builder setCancelRequested(boolean value) { - - cancelRequested_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Identifies whether the user has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearCancelRequested() { - - cancelRequested_ = false; - onChanged(); - return this; - } - - private java.lang.Object apiVersion_ = ""; - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The apiVersion. - */ - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for apiVersion. - */ - public com.google.protobuf.ByteString - getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - apiVersion_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearApiVersion() { - - apiVersion_ = getDefaultInstance().getApiVersion(); - onChanged(); - return this; - } - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - apiVersion_ = 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.common.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.common.OperationMetadata) - private static final com.google.cloud.common.OperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.common.OperationMetadata(); - } - - public static com.google.cloud.common.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(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.common.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/common/OperationMetadataOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/common/OperationMetadataOrBuilder.java deleted file mode 100644 index 03b8d68c0be5..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/common/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,156 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/common/operation_metadata.proto - -package com.google.cloud.common; - -public interface OperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.common.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The target. - */ - java.lang.String getTarget(); - /** - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for target. - */ - com.google.protobuf.ByteString - getTargetBytes(); - - /** - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The verb. - */ - java.lang.String getVerb(); - /** - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for verb. - */ - com.google.protobuf.ByteString - getVerbBytes(); - - /** - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusDetail. - */ - java.lang.String getStatusDetail(); - /** - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusDetail. - */ - com.google.protobuf.ByteString - getStatusDetailBytes(); - - /** - *
-   * Output only. Identifies whether the user has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-   * corresponding to `Code.CANCELLED`.
-   * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cancelRequested. - */ - boolean getCancelRequested(); - - /** - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The apiVersion. - */ - java.lang.String getApiVersion(); - /** - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for apiVersion. - */ - com.google.protobuf.ByteString - getApiVersionBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/common/OperationMetadataOuterClass.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/common/OperationMetadataOuterClass.java deleted file mode 100644 index 8b00f4c11630..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/common/OperationMetadataOuterClass.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/common/operation_metadata.proto - -package com.google.cloud.common; - -public final class OperationMetadataOuterClass { - private OperationMetadataOuterClass() {} - 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_common_OperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_common_OperationMetadata_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/common/operation_metadata" + - ".proto\022\023google.cloud.common\032\037google/api/" + - "field_behavior.proto\032\037google/protobuf/ti" + - "mestamp.proto\"\371\001\n\021OperationMetadata\0224\n\013c" + - "reate_time\030\001 \001(\0132\032.google.protobuf.Times" + - "tampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.pro" + - "tobuf.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\032\n\rstatus_detail\030\005 " + - "\001(\tB\003\340A\003\022\035\n\020cancel_requested\030\006 \001(\010B\003\340A\003\022" + - "\030\n\013api_version\030\007 \001(\tB\003\340A\003BV\n\027com.google." + - "cloud.commonP\001Z9google.golang.org/genpro" + - "to/googleapis/cloud/common;commonb\006proto" + - "3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_common_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_common_OperationMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_common_OperationMetadata_descriptor, - new java.lang.String[] { "CreateTime", "EndTime", "Target", "Verb", "StatusDetail", "CancelRequested", "ApiVersion", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/Backup.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/Backup.java deleted file mode 100644 index 5478d91b6c47..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/Backup.java +++ /dev/null @@ -1,2624 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * A Cloud Filestore backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.Backup} - */ -public final class Backup extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.Backup) - BackupOrBuilder { -private static final long serialVersionUID = 0L; - // Use Backup.newBuilder() to construct. - private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Backup() { - name_ = ""; - description_ = ""; - state_ = 0; - sourceInstance_ = ""; - sourceFileShare_ = ""; - sourceInstanceTier_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Backup(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Backup( - 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 24: { - int rawValue = input.readEnum(); - - state_ = rawValue; - 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: { - 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 48: { - - capacityGb_ = input.readInt64(); - break; - } - case 56: { - - storageBytes_ = input.readInt64(); - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceInstance_ = s; - break; - } - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceFileShare_ = s; - break; - } - case 80: { - int rawValue = input.readEnum(); - - sourceInstanceTier_ = rawValue; - break; - } - case 88: { - - downloadBytes_ = input.readInt64(); - break; - } - case 98: { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (satisfiesPzs_ != null) { - subBuilder = satisfiesPzs_.toBuilder(); - } - satisfiesPzs_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(satisfiesPzs_); - satisfiesPzs_ = 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Backup_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.Backup.class, com.google.cloud.filestore.v1.Backup.Builder.class); - } - - /** - *
-   * The backup state.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1.Backup.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Backup is being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - *
-     * Backup has been taken and the operation is being finalized. At this
-     * point, changes to the file share will not be reflected in the backup.
-     * 
- * - * FINALIZING = 2; - */ - FINALIZING(2), - /** - *
-     * Backup is available for use.
-     * 
- * - * READY = 3; - */ - READY(3), - /** - *
-     * Backup is being deleted.
-     * 
- * - * DELETING = 4; - */ - DELETING(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Backup is being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - *
-     * Backup has been taken and the operation is being finalized. At this
-     * point, changes to the file share will not be reflected in the backup.
-     * 
- * - * FINALIZING = 2; - */ - public static final int FINALIZING_VALUE = 2; - /** - *
-     * Backup is available for use.
-     * 
- * - * READY = 3; - */ - public static final int READY_VALUE = 3; - /** - *
-     * Backup is being deleted.
-     * 
- * - * DELETING = 4; - */ - public static final int DELETING_VALUE = 4; - - - 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 CREATING; - case 2: return FINALIZING; - case 3: return READY; - case 4: return DELETING; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> 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.filestore.v1.Backup.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.filestore.v1.Backup.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Output only. The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * 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 resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * 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_; - /** - *
-   * A description of the backup with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * 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; - } - } - /** - *
-   * A description of the backup with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * 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 STATE_FIELD_NUMBER = 3; - private int state_; - /** - *
-   * Output only. The backup state.
-   * 
- * - * .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Output only. The backup state.
-   * 
- * - * .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override public com.google.cloud.filestore.v1.Backup.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.Backup.State result = com.google.cloud.filestore.v1.Backup.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1.Backup.State.UNRECOGNIZED : result; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int LABELS_FIELD_NUMBER = 5; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Backup_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - - @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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - @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; - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - @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 CAPACITY_GB_FIELD_NUMBER = 6; - private long capacityGb_; - /** - *
-   * Output only. Capacity of the source file share when the backup was created.
-   * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The capacityGb. - */ - @java.lang.Override - public long getCapacityGb() { - return capacityGb_; - } - - public static final int STORAGE_BYTES_FIELD_NUMBER = 7; - private long storageBytes_; - /** - *
-   * Output only. The size of the storage used by the backup. As backups share
-   * storage, this number is expected to change with backup creation/deletion.
-   * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The storageBytes. - */ - @java.lang.Override - public long getStorageBytes() { - return storageBytes_; - } - - public static final int SOURCE_INSTANCE_FIELD_NUMBER = 8; - private volatile java.lang.Object sourceInstance_; - /** - *
-   * The resource name of the source Cloud Filestore instance, in the format
-   * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
-   * used to create this backup.
-   * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The sourceInstance. - */ - @java.lang.Override - public java.lang.String getSourceInstance() { - java.lang.Object ref = sourceInstance_; - 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(); - sourceInstance_ = s; - return s; - } - } - /** - *
-   * The resource name of the source Cloud Filestore instance, in the format
-   * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
-   * used to create this backup.
-   * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceInstance. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceInstanceBytes() { - java.lang.Object ref = sourceInstance_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceInstance_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_FILE_SHARE_FIELD_NUMBER = 9; - private volatile java.lang.Object sourceFileShare_; - /** - *
-   * Name of the file share in the source Cloud Filestore instance that the
-   * backup is created from.
-   * 
- * - * string source_file_share = 9; - * @return The sourceFileShare. - */ - @java.lang.Override - public java.lang.String getSourceFileShare() { - java.lang.Object ref = sourceFileShare_; - 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(); - sourceFileShare_ = s; - return s; - } - } - /** - *
-   * Name of the file share in the source Cloud Filestore instance that the
-   * backup is created from.
-   * 
- * - * string source_file_share = 9; - * @return The bytes for sourceFileShare. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceFileShareBytes() { - java.lang.Object ref = sourceFileShare_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceFileShare_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_INSTANCE_TIER_FIELD_NUMBER = 10; - private int sourceInstanceTier_; - /** - *
-   * Output only. The service tier of the source Cloud Filestore instance that
-   * this backup is created from.
-   * 
- * - * .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for sourceInstanceTier. - */ - @java.lang.Override public int getSourceInstanceTierValue() { - return sourceInstanceTier_; - } - /** - *
-   * Output only. The service tier of the source Cloud Filestore instance that
-   * this backup is created from.
-   * 
- * - * .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sourceInstanceTier. - */ - @java.lang.Override public com.google.cloud.filestore.v1.Instance.Tier getSourceInstanceTier() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.Instance.Tier result = com.google.cloud.filestore.v1.Instance.Tier.valueOf(sourceInstanceTier_); - return result == null ? com.google.cloud.filestore.v1.Instance.Tier.UNRECOGNIZED : result; - } - - public static final int DOWNLOAD_BYTES_FIELD_NUMBER = 11; - private long downloadBytes_; - /** - *
-   * Output only. Amount of bytes that will be downloaded if the backup is
-   * restored. This may be different than storage bytes, since sequential
-   * backups of the same disk will share storage.
-   * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The downloadBytes. - */ - @java.lang.Override - public long getDownloadBytes() { - return downloadBytes_; - } - - public static final int SATISFIES_PZS_FIELD_NUMBER = 12; - private com.google.protobuf.BoolValue satisfiesPzs_; - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - @java.lang.Override - public boolean hasSatisfiesPzs() { - return satisfiesPzs_ != null; - } - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - @java.lang.Override - public com.google.protobuf.BoolValue getSatisfiesPzs() { - return satisfiesPzs_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { - return getSatisfiesPzs(); - } - - 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 (state_ != com.google.cloud.filestore.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (createTime_ != null) { - output.writeMessage(4, getCreateTime()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 5); - if (capacityGb_ != 0L) { - output.writeInt64(6, capacityGb_); - } - if (storageBytes_ != 0L) { - output.writeInt64(7, storageBytes_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceInstance_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, sourceInstance_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceFileShare_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, sourceFileShare_); - } - if (sourceInstanceTier_ != com.google.cloud.filestore.v1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - output.writeEnum(10, sourceInstanceTier_); - } - if (downloadBytes_ != 0L) { - output.writeInt64(11, downloadBytes_); - } - if (satisfiesPzs_ != null) { - output.writeMessage(12, getSatisfiesPzs()); - } - 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 (state_ != com.google.cloud.filestore.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, state_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCreateTime()); - } - 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(5, labels__); - } - if (capacityGb_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(6, capacityGb_); - } - if (storageBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(7, storageBytes_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceInstance_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, sourceInstance_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceFileShare_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, sourceFileShare_); - } - if (sourceInstanceTier_ != com.google.cloud.filestore.v1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, sourceInstanceTier_); - } - if (downloadBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(11, downloadBytes_); - } - if (satisfiesPzs_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getSatisfiesPzs()); - } - 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.filestore.v1.Backup)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.Backup other = (com.google.cloud.filestore.v1.Backup) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (state_ != other.state_) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (getCapacityGb() - != other.getCapacityGb()) return false; - if (getStorageBytes() - != other.getStorageBytes()) return false; - if (!getSourceInstance() - .equals(other.getSourceInstance())) return false; - if (!getSourceFileShare() - .equals(other.getSourceFileShare())) return false; - if (sourceInstanceTier_ != other.sourceInstanceTier_) return false; - if (getDownloadBytes() - != other.getDownloadBytes()) return false; - if (hasSatisfiesPzs() != other.hasSatisfiesPzs()) return false; - if (hasSatisfiesPzs()) { - if (!getSatisfiesPzs() - .equals(other.getSatisfiesPzs())) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + CAPACITY_GB_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCapacityGb()); - hash = (37 * hash) + STORAGE_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getStorageBytes()); - hash = (37 * hash) + SOURCE_INSTANCE_FIELD_NUMBER; - hash = (53 * hash) + getSourceInstance().hashCode(); - hash = (37 * hash) + SOURCE_FILE_SHARE_FIELD_NUMBER; - hash = (53 * hash) + getSourceFileShare().hashCode(); - hash = (37 * hash) + SOURCE_INSTANCE_TIER_FIELD_NUMBER; - hash = (53 * hash) + sourceInstanceTier_; - hash = (37 * hash) + DOWNLOAD_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getDownloadBytes()); - if (hasSatisfiesPzs()) { - hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; - hash = (53 * hash) + getSatisfiesPzs().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.Backup parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.Backup 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.filestore.v1.Backup parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.Backup 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.filestore.v1.Backup parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.Backup parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.Backup parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.Backup 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.filestore.v1.Backup parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.Backup 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.filestore.v1.Backup parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.Backup 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.filestore.v1.Backup 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 Cloud Filestore backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.Backup} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.Backup) - com.google.cloud.filestore.v1.BackupOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Backup_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 5: - 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.Backup.class, com.google.cloud.filestore.v1.Backup.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.Backup.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_ = ""; - - state_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - capacityGb_ = 0L; - - storageBytes_ = 0L; - - sourceInstance_ = ""; - - sourceFileShare_ = ""; - - sourceInstanceTier_ = 0; - - downloadBytes_ = 0L; - - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = null; - } else { - satisfiesPzs_ = null; - satisfiesPzsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Backup_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.Backup getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.Backup.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.Backup build() { - com.google.cloud.filestore.v1.Backup result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.Backup buildPartial() { - com.google.cloud.filestore.v1.Backup result = new com.google.cloud.filestore.v1.Backup(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - result.state_ = state_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.capacityGb_ = capacityGb_; - result.storageBytes_ = storageBytes_; - result.sourceInstance_ = sourceInstance_; - result.sourceFileShare_ = sourceFileShare_; - result.sourceInstanceTier_ = sourceInstanceTier_; - result.downloadBytes_ = downloadBytes_; - if (satisfiesPzsBuilder_ == null) { - result.satisfiesPzs_ = satisfiesPzs_; - } else { - result.satisfiesPzs_ = satisfiesPzsBuilder_.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.filestore.v1.Backup) { - return mergeFrom((com.google.cloud.filestore.v1.Backup)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.Backup other) { - if (other == com.google.cloud.filestore.v1.Backup.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (other.getCapacityGb() != 0L) { - setCapacityGb(other.getCapacityGb()); - } - if (other.getStorageBytes() != 0L) { - setStorageBytes(other.getStorageBytes()); - } - if (!other.getSourceInstance().isEmpty()) { - sourceInstance_ = other.sourceInstance_; - onChanged(); - } - if (!other.getSourceFileShare().isEmpty()) { - sourceFileShare_ = other.sourceFileShare_; - onChanged(); - } - if (other.sourceInstanceTier_ != 0) { - setSourceInstanceTierValue(other.getSourceInstanceTierValue()); - } - if (other.getDownloadBytes() != 0L) { - setDownloadBytes(other.getDownloadBytes()); - } - if (other.hasSatisfiesPzs()) { - mergeSatisfiesPzs(other.getSatisfiesPzs()); - } - 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.filestore.v1.Backup parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.Backup) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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 resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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 resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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 resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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 resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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_ = ""; - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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; - } - } - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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; - } - } - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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; - } - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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 int state_ = 0; - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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; - } - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Backup.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.Backup.State result = com.google.cloud.filestore.v1.Backup.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1.Backup.State.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.filestore.v1.Backup.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - 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_; - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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(); - } - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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 com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - - @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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - - 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - 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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private long capacityGb_ ; - /** - *
-     * Output only. Capacity of the source file share when the backup was created.
-     * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The capacityGb. - */ - @java.lang.Override - public long getCapacityGb() { - return capacityGb_; - } - /** - *
-     * Output only. Capacity of the source file share when the backup was created.
-     * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The capacityGb to set. - * @return This builder for chaining. - */ - public Builder setCapacityGb(long value) { - - capacityGb_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Capacity of the source file share when the backup was created.
-     * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearCapacityGb() { - - capacityGb_ = 0L; - onChanged(); - return this; - } - - private long storageBytes_ ; - /** - *
-     * Output only. The size of the storage used by the backup. As backups share
-     * storage, this number is expected to change with backup creation/deletion.
-     * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The storageBytes. - */ - @java.lang.Override - public long getStorageBytes() { - return storageBytes_; - } - /** - *
-     * Output only. The size of the storage used by the backup. As backups share
-     * storage, this number is expected to change with backup creation/deletion.
-     * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The storageBytes to set. - * @return This builder for chaining. - */ - public Builder setStorageBytes(long value) { - - storageBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The size of the storage used by the backup. As backups share
-     * storage, this number is expected to change with backup creation/deletion.
-     * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearStorageBytes() { - - storageBytes_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object sourceInstance_ = ""; - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The sourceInstance. - */ - public java.lang.String getSourceInstance() { - java.lang.Object ref = sourceInstance_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceInstance_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceInstance. - */ - public com.google.protobuf.ByteString - getSourceInstanceBytes() { - java.lang.Object ref = sourceInstance_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceInstance_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @param value The sourceInstance to set. - * @return This builder for chaining. - */ - public Builder setSourceInstance( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceInstance_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearSourceInstance() { - - sourceInstance_ = getDefaultInstance().getSourceInstance(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @param value The bytes for sourceInstance to set. - * @return This builder for chaining. - */ - public Builder setSourceInstanceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceInstance_ = value; - onChanged(); - return this; - } - - private java.lang.Object sourceFileShare_ = ""; - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @return The sourceFileShare. - */ - public java.lang.String getSourceFileShare() { - java.lang.Object ref = sourceFileShare_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceFileShare_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @return The bytes for sourceFileShare. - */ - public com.google.protobuf.ByteString - getSourceFileShareBytes() { - java.lang.Object ref = sourceFileShare_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceFileShare_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @param value The sourceFileShare to set. - * @return This builder for chaining. - */ - public Builder setSourceFileShare( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceFileShare_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @return This builder for chaining. - */ - public Builder clearSourceFileShare() { - - sourceFileShare_ = getDefaultInstance().getSourceFileShare(); - onChanged(); - return this; - } - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @param value The bytes for sourceFileShare to set. - * @return This builder for chaining. - */ - public Builder setSourceFileShareBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceFileShare_ = value; - onChanged(); - return this; - } - - private int sourceInstanceTier_ = 0; - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that
-     * this backup is created from.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for sourceInstanceTier. - */ - @java.lang.Override public int getSourceInstanceTierValue() { - return sourceInstanceTier_; - } - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that
-     * this backup is created from.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The enum numeric value on the wire for sourceInstanceTier to set. - * @return This builder for chaining. - */ - public Builder setSourceInstanceTierValue(int value) { - - sourceInstanceTier_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that
-     * this backup is created from.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sourceInstanceTier. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Instance.Tier getSourceInstanceTier() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.Instance.Tier result = com.google.cloud.filestore.v1.Instance.Tier.valueOf(sourceInstanceTier_); - return result == null ? com.google.cloud.filestore.v1.Instance.Tier.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that
-     * this backup is created from.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The sourceInstanceTier to set. - * @return This builder for chaining. - */ - public Builder setSourceInstanceTier(com.google.cloud.filestore.v1.Instance.Tier value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceInstanceTier_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that
-     * this backup is created from.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearSourceInstanceTier() { - - sourceInstanceTier_ = 0; - onChanged(); - return this; - } - - private long downloadBytes_ ; - /** - *
-     * Output only. Amount of bytes that will be downloaded if the backup is
-     * restored. This may be different than storage bytes, since sequential
-     * backups of the same disk will share storage.
-     * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The downloadBytes. - */ - @java.lang.Override - public long getDownloadBytes() { - return downloadBytes_; - } - /** - *
-     * Output only. Amount of bytes that will be downloaded if the backup is
-     * restored. This may be different than storage bytes, since sequential
-     * backups of the same disk will share storage.
-     * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The downloadBytes to set. - * @return This builder for chaining. - */ - public Builder setDownloadBytes(long value) { - - downloadBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Amount of bytes that will be downloaded if the backup is
-     * restored. This may be different than storage bytes, since sequential
-     * backups of the same disk will share storage.
-     * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearDownloadBytes() { - - downloadBytes_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.BoolValue satisfiesPzs_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> satisfiesPzsBuilder_; - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - public boolean hasSatisfiesPzs() { - return satisfiesPzsBuilder_ != null || satisfiesPzs_ != null; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - public com.google.protobuf.BoolValue getSatisfiesPzs() { - if (satisfiesPzsBuilder_ == null) { - return satisfiesPzs_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } else { - return satisfiesPzsBuilder_.getMessage(); - } - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSatisfiesPzs(com.google.protobuf.BoolValue value) { - if (satisfiesPzsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - satisfiesPzs_ = value; - onChanged(); - } else { - satisfiesPzsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSatisfiesPzs( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = builderForValue.build(); - onChanged(); - } else { - satisfiesPzsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeSatisfiesPzs(com.google.protobuf.BoolValue value) { - if (satisfiesPzsBuilder_ == null) { - if (satisfiesPzs_ != null) { - satisfiesPzs_ = - com.google.protobuf.BoolValue.newBuilder(satisfiesPzs_).mergeFrom(value).buildPartial(); - } else { - satisfiesPzs_ = value; - } - onChanged(); - } else { - satisfiesPzsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearSatisfiesPzs() { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = null; - onChanged(); - } else { - satisfiesPzs_ = null; - satisfiesPzsBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.BoolValue.Builder getSatisfiesPzsBuilder() { - - onChanged(); - return getSatisfiesPzsFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { - if (satisfiesPzsBuilder_ != null) { - return satisfiesPzsBuilder_.getMessageOrBuilder(); - } else { - return satisfiesPzs_ == null ? - com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> - getSatisfiesPzsFieldBuilder() { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( - getSatisfiesPzs(), - getParentForChildren(), - isClean()); - satisfiesPzs_ = null; - } - return satisfiesPzsBuilder_; - } - @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.filestore.v1.Backup) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.Backup) - private static final com.google.cloud.filestore.v1.Backup DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.Backup(); - } - - public static com.google.cloud.filestore.v1.Backup getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Backup parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Backup(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.filestore.v1.Backup getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/BackupName.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/BackupName.java deleted file mode 100644 index 122bca80b281..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/BackupName.java +++ /dev/null @@ -1,223 +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.filestore.v1; - -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 BackupName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_BACKUP = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/backups/{backup}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String backup; - - @Deprecated - protected BackupName() { - project = null; - location = null; - backup = null; - } - - private BackupName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - backup = Preconditions.checkNotNull(builder.getBackup()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getBackup() { - return backup; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static BackupName of(String project, String location, String backup) { - return newBuilder().setProject(project).setLocation(location).setBackup(backup).build(); - } - - public static String format(String project, String location, String backup) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setBackup(backup) - .build() - .toString(); - } - - public static BackupName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_BACKUP.validatedMatch( - formattedString, "BackupName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("backup")); - } - - 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 (BackupName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_BACKUP.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 (backup != null) { - fieldMapBuilder.put("backup", backup); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_BACKUP.instantiate( - "project", project, "location", location, "backup", backup); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - BackupName that = ((BackupName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.backup, that.backup); - } - 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(backup); - return h; - } - - /** Builder for projects/{project}/locations/{location}/backups/{backup}. */ - public static class Builder { - private String project; - private String location; - private String backup; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getBackup() { - return backup; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setBackup(String backup) { - this.backup = backup; - return this; - } - - private Builder(BackupName backupName) { - this.project = backupName.project; - this.location = backupName.location; - this.backup = backupName.backup; - } - - public BackupName build() { - return new BackupName(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/BackupOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/BackupOrBuilder.java deleted file mode 100644 index 32cee1f9ac05..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/BackupOrBuilder.java +++ /dev/null @@ -1,282 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface BackupOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.Backup) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A description of the backup with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A description of the backup with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. The backup state.
-   * 
- * - * .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Output only. The backup state.
-   * 
- * - * .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - com.google.cloud.filestore.v1.Backup.State getState(); - - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - int getLabelsCount(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Output only. Capacity of the source file share when the backup was created.
-   * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The capacityGb. - */ - long getCapacityGb(); - - /** - *
-   * Output only. The size of the storage used by the backup. As backups share
-   * storage, this number is expected to change with backup creation/deletion.
-   * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The storageBytes. - */ - long getStorageBytes(); - - /** - *
-   * The resource name of the source Cloud Filestore instance, in the format
-   * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
-   * used to create this backup.
-   * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The sourceInstance. - */ - java.lang.String getSourceInstance(); - /** - *
-   * The resource name of the source Cloud Filestore instance, in the format
-   * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
-   * used to create this backup.
-   * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceInstance. - */ - com.google.protobuf.ByteString - getSourceInstanceBytes(); - - /** - *
-   * Name of the file share in the source Cloud Filestore instance that the
-   * backup is created from.
-   * 
- * - * string source_file_share = 9; - * @return The sourceFileShare. - */ - java.lang.String getSourceFileShare(); - /** - *
-   * Name of the file share in the source Cloud Filestore instance that the
-   * backup is created from.
-   * 
- * - * string source_file_share = 9; - * @return The bytes for sourceFileShare. - */ - com.google.protobuf.ByteString - getSourceFileShareBytes(); - - /** - *
-   * Output only. The service tier of the source Cloud Filestore instance that
-   * this backup is created from.
-   * 
- * - * .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for sourceInstanceTier. - */ - int getSourceInstanceTierValue(); - /** - *
-   * Output only. The service tier of the source Cloud Filestore instance that
-   * this backup is created from.
-   * 
- * - * .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sourceInstanceTier. - */ - com.google.cloud.filestore.v1.Instance.Tier getSourceInstanceTier(); - - /** - *
-   * Output only. Amount of bytes that will be downloaded if the backup is
-   * restored. This may be different than storage bytes, since sequential
-   * backups of the same disk will share storage.
-   * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The downloadBytes. - */ - long getDownloadBytes(); - - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - boolean hasSatisfiesPzs(); - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - com.google.protobuf.BoolValue getSatisfiesPzs(); - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreServiceProto.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreServiceProto.java deleted file mode 100644 index 082657124478..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CloudFilestoreServiceProto.java +++ /dev/null @@ -1,460 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public final class CloudFilestoreServiceProto { - private CloudFilestoreServiceProto() {} - 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_filestore_v1_NetworkConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_NetworkConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_FileShareConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_FileShareConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_NfsExportOptions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_NfsExportOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_Instance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_Instance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_Instance_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_Instance_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_CreateInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_CreateInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_GetInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_GetInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_ListInstancesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_ListInstancesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_ListInstancesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_ListInstancesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_Backup_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_Backup_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_Backup_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_Backup_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_CreateBackupRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_CreateBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_DeleteBackupRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_DeleteBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_UpdateBackupRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_UpdateBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_GetBackupRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_GetBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_ListBackupsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_ListBackupsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1_ListBackupsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1_ListBackupsResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n7google/cloud/filestore/v1/cloud_filest" + - "ore_service.proto\022\031google.cloud.filestor" + - "e.v1\032\034google/api/annotations.proto\032\027goog" + - "le/api/client.proto\032\037google/api/field_be" + - "havior.proto\032\031google/api/resource.proto\032" + - ",google/cloud/common/operation_metadata." + - "proto\032#google/longrunning/operations.pro" + - "to\032 google/protobuf/field_mask.proto\032\037go" + - "ogle/protobuf/timestamp.proto\032\036google/pr" + - "otobuf/wrappers.proto\"\327\001\n\rNetworkConfig\022" + - "\017\n\007network\030\001 \001(\t\022C\n\005modes\030\003 \003(\01624.google" + - ".cloud.filestore.v1.NetworkConfig.Addres" + - "sMode\022\031\n\021reserved_ip_range\030\004 \001(\t\022\031\n\014ip_a" + - "ddresses\030\005 \003(\tB\003\340A\003\":\n\013AddressMode\022\034\n\030AD" + - "DRESS_MODE_UNSPECIFIED\020\000\022\r\n\tMODE_IPV4\020\001\"" + - "\301\001\n\017FileShareConfig\022\014\n\004name\030\001 \001(\t\022\023\n\013cap" + - "acity_gb\030\002 \001(\003\0228\n\rsource_backup\030\010 \001(\tB\037\372" + - "A\034\n\032file.googleapis.com/BackupH\000\022G\n\022nfs_" + - "export_options\030\007 \003(\0132+.google.cloud.file" + - "store.v1.NfsExportOptionsB\010\n\006source\"\375\002\n\020" + - "NfsExportOptions\022\021\n\tip_ranges\030\001 \003(\t\022K\n\013a" + - "ccess_mode\030\002 \001(\01626.google.cloud.filestor" + - "e.v1.NfsExportOptions.AccessMode\022K\n\013squa" + - "sh_mode\030\003 \001(\01626.google.cloud.filestore.v" + - "1.NfsExportOptions.SquashMode\022\020\n\010anon_ui" + - "d\030\004 \001(\003\022\020\n\010anon_gid\030\005 \001(\003\"H\n\nAccessMode\022" + - "\033\n\027ACCESS_MODE_UNSPECIFIED\020\000\022\r\n\tREAD_ONL" + - "Y\020\001\022\016\n\nREAD_WRITE\020\002\"N\n\nSquashMode\022\033\n\027SQU" + - "ASH_MODE_UNSPECIFIED\020\000\022\022\n\016NO_ROOT_SQUASH" + - "\020\001\022\017\n\013ROOT_SQUASH\020\002\"\353\006\n\010Instance\022\021\n\004name" + - "\030\001 \001(\tB\003\340A\003\022\023\n\013description\030\002 \001(\t\022=\n\005stat" + - "e\030\005 \001(\0162).google.cloud.filestore.v1.Inst" + - "ance.StateB\003\340A\003\022\033\n\016status_message\030\006 \001(\tB" + - "\003\340A\003\0224\n\013create_time\030\007 \001(\0132\032.google.proto" + - "buf.TimestampB\003\340A\003\0226\n\004tier\030\010 \001(\0162(.googl" + - "e.cloud.filestore.v1.Instance.Tier\022?\n\006la" + - "bels\030\t \003(\0132/.google.cloud.filestore.v1.I" + - "nstance.LabelsEntry\022?\n\013file_shares\030\n \003(\013" + - "2*.google.cloud.filestore.v1.FileShareCo" + - "nfig\022:\n\010networks\030\013 \003(\0132(.google.cloud.fi" + - "lestore.v1.NetworkConfig\022\014\n\004etag\030\014 \001(\t\0226" + - "\n\rsatisfies_pzs\030\r \001(\0132\032.google.protobuf." + - "BoolValueB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001" + - "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"n\n\005State\022\025\n\021STATE_" + - "UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\r" + - "\n\tREPAIRING\020\003\022\014\n\010DELETING\020\004\022\t\n\005ERROR\020\006\022\r" + - "\n\tRESTORING\020\007\"i\n\004Tier\022\024\n\020TIER_UNSPECIFIE" + - "D\020\000\022\014\n\010STANDARD\020\001\022\013\n\007PREMIUM\020\002\022\r\n\tBASIC_" + - "HDD\020\003\022\r\n\tBASIC_SSD\020\004\022\022\n\016HIGH_SCALE_SSD\020\005" + - ":_\352A\\\n\034file.googleapis.com/Instance\022\202\323\344\223\002/\022-/v1/{paren" + - "t=projects/*/locations/*}/instances\332A\006pa" + - "rent\022\237\001\n\013GetInstance\022-.google.cloud.file" + - "store.v1.GetInstanceRequest\032#.google.clo" + - "ud.filestore.v1.Instance\"<\202\323\344\223\002/\022-/v1/{n" + - "ame=projects/*/locations/*/instances/*}\332" + - "A\004name\022\365\001\n\016CreateInstance\0220.google.cloud" + - ".filestore.v1.CreateInstanceRequest\032\035.go" + - "ogle.longrunning.Operation\"\221\001\202\323\344\223\0029\"-/v1" + - "/{parent=projects/*/locations/*}/instanc" + - "es:\010instance\332A\033parent,instance,instance_" + - "id\312A1\n\010Instance\022%google.cloud.common.Ope" + - "rationMetadata\022\367\001\n\016UpdateInstance\0220.goog" + - "le.cloud.filestore.v1.UpdateInstanceRequ" + - "est\032\035.google.longrunning.Operation\"\223\001\202\323\344" + - "\223\002B26/v1/{instance.name=projects/*/locat" + - "ions/*/instances/*}:\010instance\332A\024instance" + - ",update_mask\312A1\n\010Instance\022%google.cloud." + - "common.OperationMetadata\022\331\001\n\017RestoreInst" + - "ance\0221.google.cloud.filestore.v1.Restore" + - "InstanceRequest\032\035.google.longrunning.Ope" + - "ration\"t\202\323\344\223\002:\"5/v1/{name=projects/*/loc" + - "ations/*/instances/*}:restore:\001*\312A1\n\010Ins" + - "tance\022%google.cloud.common.OperationMeta" + - "data\022\340\001\n\016DeleteInstance\0220.google.cloud.f" + - "ilestore.v1.DeleteInstanceRequest\032\035.goog" + - "le.longrunning.Operation\"}\202\323\344\223\002/*-/v1/{n" + - "ame=projects/*/locations/*/instances/*}\332" + - "A\004name\312A>\n\025google.protobuf.Empty\022%google" + - ".cloud.common.OperationMetadata\022\252\001\n\013List" + - "Backups\022-.google.cloud.filestore.v1.List" + - "BackupsRequest\032..google.cloud.filestore." + - "v1.ListBackupsResponse\"<\202\323\344\223\002-\022+/v1/{par" + - "ent=projects/*/locations/*}/backups\332A\006pa" + - "rent\022\227\001\n\tGetBackup\022+.google.cloud.filest" + - "ore.v1.GetBackupRequest\032!.google.cloud.f" + - "ilestore.v1.Backup\":\202\323\344\223\002-\022+/v1/{name=pr" + - "ojects/*/locations/*/backups/*}\332A\004name\022\347" + - "\001\n\014CreateBackup\022..google.cloud.filestore" + - ".v1.CreateBackupRequest\032\035.google.longrun" + - "ning.Operation\"\207\001\202\323\344\223\0025\"+/v1/{parent=pro" + - "jects/*/locations/*}/backups:\006backup\332A\027p" + - "arent,backup,backup_id\312A/\n\006Backup\022%googl" + - "e.cloud.common.OperationMetadata\022\332\001\n\014Del" + - "eteBackup\022..google.cloud.filestore.v1.De" + - "leteBackupRequest\032\035.google.longrunning.O" + - "peration\"{\202\323\344\223\002-*+/v1/{name=projects/*/l" + - "ocations/*/backups/*}\332A\004name\312A>\n\025google." + - "protobuf.Empty\022%google.cloud.common.Oper" + - "ationMetadata\022\351\001\n\014UpdateBackup\022..google." + - "cloud.filestore.v1.UpdateBackupRequest\032\035" + - ".google.longrunning.Operation\"\211\001\202\323\344\223\002<22" + - "/v1/{backup.name=projects/*/locations/*/" + - "backups/*}:\006backup\332A\022backup,update_mask\312" + - "A/\n\006Backup\022%google.cloud.common.Operatio" + - "nMetadata\032G\312A\023file.googleapis.com\322A.http" + - "s://www.googleapis.com/auth/cloud-platfo" + - "rmB\271\001\n\035com.google.cloud.filestore.v1B\032Cl" + - "oudFilestoreServiceProtoP\001ZBgoogle.golan" + - "g.org/genproto/googleapis/cloud/filestor" + - "e/v1;filestore\252\002\031Google.Cloud.Filestore." + - "V1\312\002\031Google\\Cloud\\Filestore\\V1b\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.cloud.common.OperationMetadataOuterClass.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.protobuf.WrappersProto.getDescriptor(), - }); - internal_static_google_cloud_filestore_v1_NetworkConfig_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_filestore_v1_NetworkConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_NetworkConfig_descriptor, - new java.lang.String[] { "Network", "Modes", "ReservedIpRange", "IpAddresses", }); - internal_static_google_cloud_filestore_v1_FileShareConfig_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_filestore_v1_FileShareConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_FileShareConfig_descriptor, - new java.lang.String[] { "Name", "CapacityGb", "SourceBackup", "NfsExportOptions", "Source", }); - internal_static_google_cloud_filestore_v1_NfsExportOptions_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_filestore_v1_NfsExportOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_NfsExportOptions_descriptor, - new java.lang.String[] { "IpRanges", "AccessMode", "SquashMode", "AnonUid", "AnonGid", }); - internal_static_google_cloud_filestore_v1_Instance_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_filestore_v1_Instance_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_Instance_descriptor, - new java.lang.String[] { "Name", "Description", "State", "StatusMessage", "CreateTime", "Tier", "Labels", "FileShares", "Networks", "Etag", "SatisfiesPzs", }); - internal_static_google_cloud_filestore_v1_Instance_LabelsEntry_descriptor = - internal_static_google_cloud_filestore_v1_Instance_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_filestore_v1_Instance_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_Instance_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_filestore_v1_CreateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_filestore_v1_CreateInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_CreateInstanceRequest_descriptor, - new java.lang.String[] { "Parent", "InstanceId", "Instance", }); - internal_static_google_cloud_filestore_v1_GetInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_filestore_v1_GetInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_GetInstanceRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_descriptor, - new java.lang.String[] { "UpdateMask", "Instance", }); - internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_descriptor, - new java.lang.String[] { "Name", "FileShare", "SourceBackup", "Source", }); - internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_filestore_v1_ListInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_filestore_v1_ListInstancesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_ListInstancesRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", "OrderBy", "Filter", }); - internal_static_google_cloud_filestore_v1_ListInstancesResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_filestore_v1_ListInstancesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_ListInstancesResponse_descriptor, - new java.lang.String[] { "Instances", "NextPageToken", "Unreachable", }); - internal_static_google_cloud_filestore_v1_Backup_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_filestore_v1_Backup_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_Backup_descriptor, - new java.lang.String[] { "Name", "Description", "State", "CreateTime", "Labels", "CapacityGb", "StorageBytes", "SourceInstance", "SourceFileShare", "SourceInstanceTier", "DownloadBytes", "SatisfiesPzs", }); - internal_static_google_cloud_filestore_v1_Backup_LabelsEntry_descriptor = - internal_static_google_cloud_filestore_v1_Backup_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_filestore_v1_Backup_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_Backup_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_filestore_v1_CreateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_filestore_v1_CreateBackupRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_CreateBackupRequest_descriptor, - new java.lang.String[] { "Parent", "Backup", "BackupId", }); - internal_static_google_cloud_filestore_v1_DeleteBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_filestore_v1_DeleteBackupRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_DeleteBackupRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_filestore_v1_UpdateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_filestore_v1_UpdateBackupRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_UpdateBackupRequest_descriptor, - new java.lang.String[] { "Backup", "UpdateMask", }); - internal_static_google_cloud_filestore_v1_GetBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_filestore_v1_GetBackupRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_GetBackupRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_filestore_v1_ListBackupsRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_filestore_v1_ListBackupsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_ListBackupsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", "OrderBy", "Filter", }); - internal_static_google_cloud_filestore_v1_ListBackupsResponse_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_filestore_v1_ListBackupsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1_ListBackupsResponse_descriptor, - new java.lang.String[] { "Backups", "NextPageToken", "Unreachable", }); - 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.cloud.common.OperationMetadataOuterClass.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.protobuf.WrappersProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateBackupRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateBackupRequest.java deleted file mode 100644 index ae1e3a4c9ea8..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateBackupRequest.java +++ /dev/null @@ -1,1046 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * CreateBackupRequest creates a backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.CreateBackupRequest} - */ -public final class CreateBackupRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.CreateBackupRequest) - CreateBackupRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateBackupRequest.newBuilder() to construct. - private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateBackupRequest() { - parent_ = ""; - backupId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateBackupRequest( - 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.filestore.v1.Backup.Builder subBuilder = null; - if (backup_ != null) { - subBuilder = backup_.toBuilder(); - } - backup_ = input.readMessage(com.google.cloud.filestore.v1.Backup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backup_); - backup_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - backupId_ = 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.CreateBackupRequest.class, com.google.cloud.filestore.v1.CreateBackupRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The backup's project and location, in the format
-   * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**.
-   * 
- * - * 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 backup's project and location, in the format
-   * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**.
-   * 
- * - * 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 BACKUP_FIELD_NUMBER = 2; - private com.google.cloud.filestore.v1.Backup backup_; - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - @java.lang.Override - public boolean hasBackup() { - return backup_ != null; - } - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Backup getBackup() { - return backup_ == null ? com.google.cloud.filestore.v1.Backup.getDefaultInstance() : backup_; - } - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.BackupOrBuilder getBackupOrBuilder() { - return getBackup(); - } - - public static final int BACKUP_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object backupId_; - /** - *
-   * Required. The ID to use for the backup.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
-   * error.
-   * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The backupId. - */ - @java.lang.Override - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - 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(); - backupId_ = s; - return s; - } - } - /** - *
-   * Required. The ID to use for the backup.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
-   * error.
-   * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for backupId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - backupId_ = 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 (backup_ != null) { - output.writeMessage(2, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); - } - 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 (backup_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); - } - 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.filestore.v1.CreateBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.CreateBackupRequest other = (com.google.cloud.filestore.v1.CreateBackupRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasBackup() != other.hasBackup()) return false; - if (hasBackup()) { - if (!getBackup() - .equals(other.getBackup())) return false; - } - if (!getBackupId() - .equals(other.getBackupId())) 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 (hasBackup()) { - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - } - hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; - hash = (53 * hash) + getBackupId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.CreateBackupRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.CreateBackupRequest 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.filestore.v1.CreateBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.CreateBackupRequest 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.filestore.v1.CreateBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.CreateBackupRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.CreateBackupRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.CreateBackupRequest 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.filestore.v1.CreateBackupRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.CreateBackupRequest 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.filestore.v1.CreateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.CreateBackupRequest 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.filestore.v1.CreateBackupRequest 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; - } - /** - *
-   * CreateBackupRequest creates a backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.CreateBackupRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.CreateBackupRequest) - com.google.cloud.filestore.v1.CreateBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.CreateBackupRequest.class, com.google.cloud.filestore.v1.CreateBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.CreateBackupRequest.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 (backupBuilder_ == null) { - backup_ = null; - } else { - backup_ = null; - backupBuilder_ = null; - } - backupId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.CreateBackupRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.CreateBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.CreateBackupRequest build() { - com.google.cloud.filestore.v1.CreateBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.CreateBackupRequest buildPartial() { - com.google.cloud.filestore.v1.CreateBackupRequest result = new com.google.cloud.filestore.v1.CreateBackupRequest(this); - result.parent_ = parent_; - if (backupBuilder_ == null) { - result.backup_ = backup_; - } else { - result.backup_ = backupBuilder_.build(); - } - result.backupId_ = backupId_; - 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.filestore.v1.CreateBackupRequest) { - return mergeFrom((com.google.cloud.filestore.v1.CreateBackupRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.CreateBackupRequest other) { - if (other == com.google.cloud.filestore.v1.CreateBackupRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasBackup()) { - mergeBackup(other.getBackup()); - } - if (!other.getBackupId().isEmpty()) { - backupId_ = other.backupId_; - 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.filestore.v1.CreateBackupRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.CreateBackupRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The backup's project and location, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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 backup's project and location, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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 backup's project and location, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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 backup's project and location, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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 backup's project and location, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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.filestore.v1.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Backup, com.google.cloud.filestore.v1.Backup.Builder, com.google.cloud.filestore.v1.BackupOrBuilder> backupBuilder_; - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - public boolean hasBackup() { - return backupBuilder_ != null || backup_ != null; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - public com.google.cloud.filestore.v1.Backup getBackup() { - if (backupBuilder_ == null) { - return backup_ == null ? com.google.cloud.filestore.v1.Backup.getDefaultInstance() : backup_; - } else { - return backupBuilder_.getMessage(); - } - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBackup(com.google.cloud.filestore.v1.Backup value) { - if (backupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - onChanged(); - } else { - backupBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBackup( - com.google.cloud.filestore.v1.Backup.Builder builderForValue) { - if (backupBuilder_ == null) { - backup_ = builderForValue.build(); - onChanged(); - } else { - backupBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeBackup(com.google.cloud.filestore.v1.Backup value) { - if (backupBuilder_ == null) { - if (backup_ != null) { - backup_ = - com.google.cloud.filestore.v1.Backup.newBuilder(backup_).mergeFrom(value).buildPartial(); - } else { - backup_ = value; - } - onChanged(); - } else { - backupBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearBackup() { - if (backupBuilder_ == null) { - backup_ = null; - onChanged(); - } else { - backup_ = null; - backupBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1.Backup.Builder getBackupBuilder() { - - onChanged(); - return getBackupFieldBuilder().getBuilder(); - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1.BackupOrBuilder getBackupOrBuilder() { - if (backupBuilder_ != null) { - return backupBuilder_.getMessageOrBuilder(); - } else { - return backup_ == null ? - com.google.cloud.filestore.v1.Backup.getDefaultInstance() : backup_; - } - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Backup, com.google.cloud.filestore.v1.Backup.Builder, com.google.cloud.filestore.v1.BackupOrBuilder> - getBackupFieldBuilder() { - if (backupBuilder_ == null) { - backupBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Backup, com.google.cloud.filestore.v1.Backup.Builder, com.google.cloud.filestore.v1.BackupOrBuilder>( - getBackup(), - getParentForChildren(), - isClean()); - backup_ = null; - } - return backupBuilder_; - } - - private java.lang.Object backupId_ = ""; - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
-     * error.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The backupId. - */ - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backupId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
-     * error.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for backupId. - */ - public com.google.protobuf.ByteString - getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - backupId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
-     * error.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - backupId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
-     * error.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearBackupId() { - - backupId_ = getDefaultInstance().getBackupId(); - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
-     * error.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - backupId_ = 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.filestore.v1.CreateBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.CreateBackupRequest) - private static final com.google.cloud.filestore.v1.CreateBackupRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.CreateBackupRequest(); - } - - public static com.google.cloud.filestore.v1.CreateBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateBackupRequest(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.filestore.v1.CreateBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateBackupRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateBackupRequestOrBuilder.java deleted file mode 100644 index 81f422896cba..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateBackupRequestOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface CreateBackupRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.CreateBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The backup's project and location, in the format
-   * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The backup's project and location, in the format
-   * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - boolean hasBackup(); - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - com.google.cloud.filestore.v1.Backup getBackup(); - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.filestore.v1.BackupOrBuilder getBackupOrBuilder(); - - /** - *
-   * Required. The ID to use for the backup.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
-   * error.
-   * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The backupId. - */ - java.lang.String getBackupId(); - /** - *
-   * Required. The ID to use for the backup.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
-   * error.
-   * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for backupId. - */ - com.google.protobuf.ByteString - getBackupIdBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateInstanceRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateInstanceRequest.java deleted file mode 100644 index cdbbb4eb1557..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateInstanceRequest.java +++ /dev/null @@ -1,1018 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * CreateInstanceRequest creates an instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.CreateInstanceRequest} - */ -public final class CreateInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.CreateInstanceRequest) - CreateInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateInstanceRequest.newBuilder() to construct. - private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateInstanceRequest() { - parent_ = ""; - instanceId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateInstanceRequest( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - - instanceId_ = s; - break; - } - case 26: { - com.google.cloud.filestore.v1.Instance.Builder subBuilder = null; - if (instance_ != null) { - subBuilder = instance_.toBuilder(); - } - instance_ = input.readMessage(com.google.cloud.filestore.v1.Instance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instance_); - instance_ = 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.CreateInstanceRequest.class, com.google.cloud.filestore.v1.CreateInstanceRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The instance's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * locations map to GCP zones, for example **us-west1-b**.
-   * 
- * - * 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 instance's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * locations map to GCP zones, for example **us-west1-b**.
-   * 
- * - * 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 INSTANCE_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object instanceId_; - /** - *
-   * Required. The name of the instance to create.
-   * The name must be unique for the specified project and location.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instanceId. - */ - @java.lang.Override - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - 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(); - instanceId_ = s; - return s; - } - } - /** - *
-   * Required. The name of the instance to create.
-   * The name must be unique for the specified project and location.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for instanceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSTANCE_FIELD_NUMBER = 3; - private com.google.cloud.filestore.v1.Instance instance_; - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - @java.lang.Override - public boolean hasInstance() { - return instance_ != null; - } - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Instance getInstance() { - return instance_ == null ? com.google.cloud.filestore.v1.Instance.getDefaultInstance() : instance_; - } - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.InstanceOrBuilder getInstanceOrBuilder() { - return getInstance(); - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); - } - if (instance_ != null) { - output.writeMessage(3, getInstance()); - } - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); - } - if (instance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getInstance()); - } - 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.filestore.v1.CreateInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.CreateInstanceRequest other = (com.google.cloud.filestore.v1.CreateInstanceRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getInstanceId() - .equals(other.getInstanceId())) return false; - if (hasInstance() != other.hasInstance()) return false; - if (hasInstance()) { - if (!getInstance() - .equals(other.getInstance())) 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(); - hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; - hash = (53 * hash) + getInstanceId().hashCode(); - if (hasInstance()) { - hash = (37 * hash) + INSTANCE_FIELD_NUMBER; - hash = (53 * hash) + getInstance().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.CreateInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.CreateInstanceRequest 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.filestore.v1.CreateInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.CreateInstanceRequest 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.filestore.v1.CreateInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.CreateInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.CreateInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.CreateInstanceRequest 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.filestore.v1.CreateInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.CreateInstanceRequest 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.filestore.v1.CreateInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.CreateInstanceRequest 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.filestore.v1.CreateInstanceRequest 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; - } - /** - *
-   * CreateInstanceRequest creates an instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.CreateInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.CreateInstanceRequest) - com.google.cloud.filestore.v1.CreateInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.CreateInstanceRequest.class, com.google.cloud.filestore.v1.CreateInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.CreateInstanceRequest.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_ = ""; - - instanceId_ = ""; - - if (instanceBuilder_ == null) { - instance_ = null; - } else { - instance_ = null; - instanceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_CreateInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.CreateInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.CreateInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.CreateInstanceRequest build() { - com.google.cloud.filestore.v1.CreateInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.CreateInstanceRequest buildPartial() { - com.google.cloud.filestore.v1.CreateInstanceRequest result = new com.google.cloud.filestore.v1.CreateInstanceRequest(this); - result.parent_ = parent_; - result.instanceId_ = instanceId_; - if (instanceBuilder_ == null) { - result.instance_ = instance_; - } else { - result.instance_ = instanceBuilder_.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.filestore.v1.CreateInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1.CreateInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.CreateInstanceRequest other) { - if (other == com.google.cloud.filestore.v1.CreateInstanceRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getInstanceId().isEmpty()) { - instanceId_ = other.instanceId_; - onChanged(); - } - if (other.hasInstance()) { - mergeInstance(other.getInstance()); - } - 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.filestore.v1.CreateInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.CreateInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 java.lang.Object instanceId_ = ""; - /** - *
-     * Required. The name of the instance to create.
-     * The name must be unique for the specified project and location.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instanceId. - */ - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the instance to create.
-     * The name must be unique for the specified project and location.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for instanceId. - */ - public com.google.protobuf.ByteString - getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the instance to create.
-     * The name must be unique for the specified project and location.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - instanceId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the instance to create.
-     * The name must be unique for the specified project and location.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearInstanceId() { - - instanceId_ = getDefaultInstance().getInstanceId(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the instance to create.
-     * The name must be unique for the specified project and location.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - instanceId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.filestore.v1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Instance, com.google.cloud.filestore.v1.Instance.Builder, com.google.cloud.filestore.v1.InstanceOrBuilder> instanceBuilder_; - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - public boolean hasInstance() { - return instanceBuilder_ != null || instance_ != null; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - public com.google.cloud.filestore.v1.Instance getInstance() { - if (instanceBuilder_ == null) { - return instance_ == null ? com.google.cloud.filestore.v1.Instance.getDefaultInstance() : instance_; - } else { - return instanceBuilder_.getMessage(); - } - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInstance(com.google.cloud.filestore.v1.Instance value) { - if (instanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instance_ = value; - onChanged(); - } else { - instanceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInstance( - com.google.cloud.filestore.v1.Instance.Builder builderForValue) { - if (instanceBuilder_ == null) { - instance_ = builderForValue.build(); - onChanged(); - } else { - instanceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeInstance(com.google.cloud.filestore.v1.Instance value) { - if (instanceBuilder_ == null) { - if (instance_ != null) { - instance_ = - com.google.cloud.filestore.v1.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); - } else { - instance_ = value; - } - onChanged(); - } else { - instanceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearInstance() { - if (instanceBuilder_ == null) { - instance_ = null; - onChanged(); - } else { - instance_ = null; - instanceBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1.Instance.Builder getInstanceBuilder() { - - onChanged(); - return getInstanceFieldBuilder().getBuilder(); - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1.InstanceOrBuilder getInstanceOrBuilder() { - if (instanceBuilder_ != null) { - return instanceBuilder_.getMessageOrBuilder(); - } else { - return instance_ == null ? - com.google.cloud.filestore.v1.Instance.getDefaultInstance() : instance_; - } - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Instance, com.google.cloud.filestore.v1.Instance.Builder, com.google.cloud.filestore.v1.InstanceOrBuilder> - getInstanceFieldBuilder() { - if (instanceBuilder_ == null) { - instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Instance, com.google.cloud.filestore.v1.Instance.Builder, com.google.cloud.filestore.v1.InstanceOrBuilder>( - getInstance(), - getParentForChildren(), - isClean()); - instance_ = null; - } - return instanceBuilder_; - } - @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.filestore.v1.CreateInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.CreateInstanceRequest) - private static final com.google.cloud.filestore.v1.CreateInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.CreateInstanceRequest(); - } - - public static com.google.cloud.filestore.v1.CreateInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateInstanceRequest(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.filestore.v1.CreateInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateInstanceRequestOrBuilder.java deleted file mode 100644 index 668c9748aa2c..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/CreateInstanceRequestOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface CreateInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.CreateInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The instance's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * locations map to GCP zones, for example **us-west1-b**.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The instance's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * locations map to GCP zones, for example **us-west1-b**.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The name of the instance to create.
-   * The name must be unique for the specified project and location.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instanceId. - */ - java.lang.String getInstanceId(); - /** - *
-   * Required. The name of the instance to create.
-   * The name must be unique for the specified project and location.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for instanceId. - */ - com.google.protobuf.ByteString - getInstanceIdBytes(); - - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - boolean hasInstance(); - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - com.google.cloud.filestore.v1.Instance getInstance(); - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1.Instance]
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.filestore.v1.InstanceOrBuilder getInstanceOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteBackupRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteBackupRequest.java deleted file mode 100644 index 2ab64bcf0025..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteBackupRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * DeleteBackupRequest deletes a backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.DeleteBackupRequest} - */ -public final class DeleteBackupRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.DeleteBackupRequest) - DeleteBackupRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteBackupRequest.newBuilder() to construct. - private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteBackupRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteBackupRequest( - 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.DeleteBackupRequest.class, com.google.cloud.filestore.v1.DeleteBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_number}/locations/{location}/backups/{backup_id}`
-   * 
- * - * 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 backup resource name, in the format
-   * `projects/{project_number}/locations/{location}/backups/{backup_id}`
-   * 
- * - * 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.filestore.v1.DeleteBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.DeleteBackupRequest other = (com.google.cloud.filestore.v1.DeleteBackupRequest) 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.filestore.v1.DeleteBackupRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.DeleteBackupRequest 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.filestore.v1.DeleteBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.DeleteBackupRequest 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.filestore.v1.DeleteBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.DeleteBackupRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.DeleteBackupRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.DeleteBackupRequest 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.filestore.v1.DeleteBackupRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.DeleteBackupRequest 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.filestore.v1.DeleteBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.DeleteBackupRequest 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.filestore.v1.DeleteBackupRequest 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; - } - /** - *
-   * DeleteBackupRequest deletes a backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.DeleteBackupRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.DeleteBackupRequest) - com.google.cloud.filestore.v1.DeleteBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.DeleteBackupRequest.class, com.google.cloud.filestore.v1.DeleteBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.DeleteBackupRequest.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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.DeleteBackupRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.DeleteBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.DeleteBackupRequest build() { - com.google.cloud.filestore.v1.DeleteBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.DeleteBackupRequest buildPartial() { - com.google.cloud.filestore.v1.DeleteBackupRequest result = new com.google.cloud.filestore.v1.DeleteBackupRequest(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.filestore.v1.DeleteBackupRequest) { - return mergeFrom((com.google.cloud.filestore.v1.DeleteBackupRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.DeleteBackupRequest other) { - if (other == com.google.cloud.filestore.v1.DeleteBackupRequest.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.filestore.v1.DeleteBackupRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.DeleteBackupRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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.filestore.v1.DeleteBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.DeleteBackupRequest) - private static final com.google.cloud.filestore.v1.DeleteBackupRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.DeleteBackupRequest(); - } - - public static com.google.cloud.filestore.v1.DeleteBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteBackupRequest(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.filestore.v1.DeleteBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteBackupRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteBackupRequestOrBuilder.java deleted file mode 100644 index 798cb71d5f5c..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteBackupRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface DeleteBackupRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.DeleteBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_number}/locations/{location}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_number}/locations/{location}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteInstanceRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteInstanceRequest.java deleted file mode 100644 index 012a05fcfff8..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteInstanceRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * DeleteInstanceRequest deletes an instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.DeleteInstanceRequest} - */ -public final class DeleteInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.DeleteInstanceRequest) - DeleteInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteInstanceRequest.newBuilder() to construct. - private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteInstanceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteInstanceRequest( - 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.DeleteInstanceRequest.class, com.google.cloud.filestore.v1.DeleteInstanceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-   * 
- * - * 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 instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-   * 
- * - * 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.filestore.v1.DeleteInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.DeleteInstanceRequest other = (com.google.cloud.filestore.v1.DeleteInstanceRequest) 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.filestore.v1.DeleteInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.DeleteInstanceRequest 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.filestore.v1.DeleteInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.DeleteInstanceRequest 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.filestore.v1.DeleteInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.DeleteInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.DeleteInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.DeleteInstanceRequest 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.filestore.v1.DeleteInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.DeleteInstanceRequest 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.filestore.v1.DeleteInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.DeleteInstanceRequest 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.filestore.v1.DeleteInstanceRequest 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; - } - /** - *
-   * DeleteInstanceRequest deletes an instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.DeleteInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.DeleteInstanceRequest) - com.google.cloud.filestore.v1.DeleteInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.DeleteInstanceRequest.class, com.google.cloud.filestore.v1.DeleteInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.DeleteInstanceRequest.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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_DeleteInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.DeleteInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.DeleteInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.DeleteInstanceRequest build() { - com.google.cloud.filestore.v1.DeleteInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.DeleteInstanceRequest buildPartial() { - com.google.cloud.filestore.v1.DeleteInstanceRequest result = new com.google.cloud.filestore.v1.DeleteInstanceRequest(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.filestore.v1.DeleteInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1.DeleteInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.DeleteInstanceRequest other) { - if (other == com.google.cloud.filestore.v1.DeleteInstanceRequest.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.filestore.v1.DeleteInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.DeleteInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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.filestore.v1.DeleteInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.DeleteInstanceRequest) - private static final com.google.cloud.filestore.v1.DeleteInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.DeleteInstanceRequest(); - } - - public static com.google.cloud.filestore.v1.DeleteInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstanceRequest(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.filestore.v1.DeleteInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteInstanceRequestOrBuilder.java deleted file mode 100644 index c727919af13d..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/DeleteInstanceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface DeleteInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.DeleteInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/FileShareConfig.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/FileShareConfig.java deleted file mode 100644 index 39c835eb0ffd..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/FileShareConfig.java +++ /dev/null @@ -1,1449 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * File share configuration for the instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.FileShareConfig} - */ -public final class FileShareConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.FileShareConfig) - FileShareConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use FileShareConfig.newBuilder() to construct. - private FileShareConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FileShareConfig() { - name_ = ""; - nfsExportOptions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FileShareConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FileShareConfig( - 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 16: { - - capacityGb_ = input.readInt64(); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - nfsExportOptions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nfsExportOptions_.add( - input.readMessage(com.google.cloud.filestore.v1.NfsExportOptions.parser(), extensionRegistry)); - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - sourceCase_ = 8; - source_ = 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)) { - nfsExportOptions_ = java.util.Collections.unmodifiableList(nfsExportOptions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_FileShareConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_FileShareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.FileShareConfig.class, com.google.cloud.filestore.v1.FileShareConfig.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SOURCE_BACKUP(8), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 8: return SOURCE_BACKUP; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The name of the file share (must be 16 characters or less).
-   * 
- * - * 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; - } - } - /** - *
-   * The name of the file share (must be 16 characters or less).
-   * 
- * - * 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 CAPACITY_GB_FIELD_NUMBER = 2; - private long capacityGb_; - /** - *
-   * File share capacity in gigabytes (GB).
-   * Cloud Filestore defines 1 GB as 1024^3 bytes.
-   * 
- * - * int64 capacity_gb = 2; - * @return The capacityGb. - */ - @java.lang.Override - public long getCapacityGb() { - return capacityGb_; - } - - public static final int SOURCE_BACKUP_FIELD_NUMBER = 8; - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-   * that this file share has been restored from.
-   * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - public boolean hasSourceBackup() { - return sourceCase_ == 8; - } - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-   * that this file share has been restored from.
-   * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - public java.lang.String getSourceBackup() { - java.lang.Object ref = ""; - if (sourceCase_ == 8) { - ref = source_; - } - 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(); - if (sourceCase_ == 8) { - source_ = s; - } - return s; - } - } - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-   * that this file share has been restored from.
-   * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - public com.google.protobuf.ByteString - getSourceBackupBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 8) { - ref = source_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 8) { - source_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NFS_EXPORT_OPTIONS_FIELD_NUMBER = 7; - private java.util.List nfsExportOptions_; - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - @java.lang.Override - public java.util.List getNfsExportOptionsList() { - return nfsExportOptions_; - } - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - @java.lang.Override - public java.util.List - getNfsExportOptionsOrBuilderList() { - return nfsExportOptions_; - } - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - @java.lang.Override - public int getNfsExportOptionsCount() { - return nfsExportOptions_.size(); - } - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.NfsExportOptions getNfsExportOptions(int index) { - return nfsExportOptions_.get(index); - } - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.NfsExportOptionsOrBuilder getNfsExportOptionsOrBuilder( - int index) { - return nfsExportOptions_.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 (capacityGb_ != 0L) { - output.writeInt64(2, capacityGb_); - } - for (int i = 0; i < nfsExportOptions_.size(); i++) { - output.writeMessage(7, nfsExportOptions_.get(i)); - } - if (sourceCase_ == 8) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, source_); - } - 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 (capacityGb_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, capacityGb_); - } - for (int i = 0; i < nfsExportOptions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, nfsExportOptions_.get(i)); - } - if (sourceCase_ == 8) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, source_); - } - 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.filestore.v1.FileShareConfig)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.FileShareConfig other = (com.google.cloud.filestore.v1.FileShareConfig) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getCapacityGb() - != other.getCapacityGb()) return false; - if (!getNfsExportOptionsList() - .equals(other.getNfsExportOptionsList())) return false; - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 8: - if (!getSourceBackup() - .equals(other.getSourceBackup())) return false; - break; - case 0: - default: - } - 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) + CAPACITY_GB_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCapacityGb()); - if (getNfsExportOptionsCount() > 0) { - hash = (37 * hash) + NFS_EXPORT_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getNfsExportOptionsList().hashCode(); - } - switch (sourceCase_) { - case 8: - hash = (37 * hash) + SOURCE_BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getSourceBackup().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.FileShareConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.FileShareConfig 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.filestore.v1.FileShareConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.FileShareConfig 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.filestore.v1.FileShareConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.FileShareConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.FileShareConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.FileShareConfig 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.filestore.v1.FileShareConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.FileShareConfig 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.filestore.v1.FileShareConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.FileShareConfig 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.filestore.v1.FileShareConfig 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; - } - /** - *
-   * File share configuration for the instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.FileShareConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.FileShareConfig) - com.google.cloud.filestore.v1.FileShareConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_FileShareConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_FileShareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.FileShareConfig.class, com.google.cloud.filestore.v1.FileShareConfig.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.FileShareConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getNfsExportOptionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - capacityGb_ = 0L; - - if (nfsExportOptionsBuilder_ == null) { - nfsExportOptions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - nfsExportOptionsBuilder_.clear(); - } - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_FileShareConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.FileShareConfig getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.FileShareConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.FileShareConfig build() { - com.google.cloud.filestore.v1.FileShareConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.FileShareConfig buildPartial() { - com.google.cloud.filestore.v1.FileShareConfig result = new com.google.cloud.filestore.v1.FileShareConfig(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.capacityGb_ = capacityGb_; - if (sourceCase_ == 8) { - result.source_ = source_; - } - if (nfsExportOptionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - nfsExportOptions_ = java.util.Collections.unmodifiableList(nfsExportOptions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.nfsExportOptions_ = nfsExportOptions_; - } else { - result.nfsExportOptions_ = nfsExportOptionsBuilder_.build(); - } - result.sourceCase_ = sourceCase_; - 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.filestore.v1.FileShareConfig) { - return mergeFrom((com.google.cloud.filestore.v1.FileShareConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.FileShareConfig other) { - if (other == com.google.cloud.filestore.v1.FileShareConfig.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getCapacityGb() != 0L) { - setCapacityGb(other.getCapacityGb()); - } - if (nfsExportOptionsBuilder_ == null) { - if (!other.nfsExportOptions_.isEmpty()) { - if (nfsExportOptions_.isEmpty()) { - nfsExportOptions_ = other.nfsExportOptions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.addAll(other.nfsExportOptions_); - } - onChanged(); - } - } else { - if (!other.nfsExportOptions_.isEmpty()) { - if (nfsExportOptionsBuilder_.isEmpty()) { - nfsExportOptionsBuilder_.dispose(); - nfsExportOptionsBuilder_ = null; - nfsExportOptions_ = other.nfsExportOptions_; - bitField0_ = (bitField0_ & ~0x00000001); - nfsExportOptionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNfsExportOptionsFieldBuilder() : null; - } else { - nfsExportOptionsBuilder_.addAllMessages(other.nfsExportOptions_); - } - } - } - switch (other.getSourceCase()) { - case SOURCE_BACKUP: { - sourceCase_ = 8; - source_ = other.source_; - onChanged(); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - 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.filestore.v1.FileShareConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.FileShareConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * 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; - } - } - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * 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; - } - } - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * 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; - } - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * 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 long capacityGb_ ; - /** - *
-     * File share capacity in gigabytes (GB).
-     * Cloud Filestore defines 1 GB as 1024^3 bytes.
-     * 
- * - * int64 capacity_gb = 2; - * @return The capacityGb. - */ - @java.lang.Override - public long getCapacityGb() { - return capacityGb_; - } - /** - *
-     * File share capacity in gigabytes (GB).
-     * Cloud Filestore defines 1 GB as 1024^3 bytes.
-     * 
- * - * int64 capacity_gb = 2; - * @param value The capacityGb to set. - * @return This builder for chaining. - */ - public Builder setCapacityGb(long value) { - - capacityGb_ = value; - onChanged(); - return this; - } - /** - *
-     * File share capacity in gigabytes (GB).
-     * Cloud Filestore defines 1 GB as 1024^3 bytes.
-     * 
- * - * int64 capacity_gb = 2; - * @return This builder for chaining. - */ - public Builder clearCapacityGb() { - - capacityGb_ = 0L; - onChanged(); - return this; - } - - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-     * that this file share has been restored from.
-     * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - @java.lang.Override - public boolean hasSourceBackup() { - return sourceCase_ == 8; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-     * that this file share has been restored from.
-     * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - @java.lang.Override - public java.lang.String getSourceBackup() { - java.lang.Object ref = ""; - if (sourceCase_ == 8) { - ref = source_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (sourceCase_ == 8) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-     * that this file share has been restored from.
-     * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceBackupBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 8) { - ref = source_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 8) { - source_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-     * that this file share has been restored from.
-     * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @param value The sourceBackup to set. - * @return This builder for chaining. - */ - public Builder setSourceBackup( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceCase_ = 8; - source_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-     * that this file share has been restored from.
-     * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearSourceBackup() { - if (sourceCase_ == 8) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-     * that this file share has been restored from.
-     * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @param value The bytes for sourceBackup to set. - * @return This builder for chaining. - */ - public Builder setSourceBackupBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceCase_ = 8; - source_ = value; - onChanged(); - return this; - } - - private java.util.List nfsExportOptions_ = - java.util.Collections.emptyList(); - private void ensureNfsExportOptionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - nfsExportOptions_ = new java.util.ArrayList(nfsExportOptions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.NfsExportOptions, com.google.cloud.filestore.v1.NfsExportOptions.Builder, com.google.cloud.filestore.v1.NfsExportOptionsOrBuilder> nfsExportOptionsBuilder_; - - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public java.util.List getNfsExportOptionsList() { - if (nfsExportOptionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(nfsExportOptions_); - } else { - return nfsExportOptionsBuilder_.getMessageList(); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public int getNfsExportOptionsCount() { - if (nfsExportOptionsBuilder_ == null) { - return nfsExportOptions_.size(); - } else { - return nfsExportOptionsBuilder_.getCount(); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public com.google.cloud.filestore.v1.NfsExportOptions getNfsExportOptions(int index) { - if (nfsExportOptionsBuilder_ == null) { - return nfsExportOptions_.get(index); - } else { - return nfsExportOptionsBuilder_.getMessage(index); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public Builder setNfsExportOptions( - int index, com.google.cloud.filestore.v1.NfsExportOptions value) { - if (nfsExportOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.set(index, value); - onChanged(); - } else { - nfsExportOptionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public Builder setNfsExportOptions( - int index, com.google.cloud.filestore.v1.NfsExportOptions.Builder builderForValue) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.set(index, builderForValue.build()); - onChanged(); - } else { - nfsExportOptionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public Builder addNfsExportOptions(com.google.cloud.filestore.v1.NfsExportOptions value) { - if (nfsExportOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.add(value); - onChanged(); - } else { - nfsExportOptionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public Builder addNfsExportOptions( - int index, com.google.cloud.filestore.v1.NfsExportOptions value) { - if (nfsExportOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.add(index, value); - onChanged(); - } else { - nfsExportOptionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public Builder addNfsExportOptions( - com.google.cloud.filestore.v1.NfsExportOptions.Builder builderForValue) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.add(builderForValue.build()); - onChanged(); - } else { - nfsExportOptionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public Builder addNfsExportOptions( - int index, com.google.cloud.filestore.v1.NfsExportOptions.Builder builderForValue) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.add(index, builderForValue.build()); - onChanged(); - } else { - nfsExportOptionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public Builder addAllNfsExportOptions( - java.lang.Iterable values) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nfsExportOptions_); - onChanged(); - } else { - nfsExportOptionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public Builder clearNfsExportOptions() { - if (nfsExportOptionsBuilder_ == null) { - nfsExportOptions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - nfsExportOptionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public Builder removeNfsExportOptions(int index) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.remove(index); - onChanged(); - } else { - nfsExportOptionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public com.google.cloud.filestore.v1.NfsExportOptions.Builder getNfsExportOptionsBuilder( - int index) { - return getNfsExportOptionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public com.google.cloud.filestore.v1.NfsExportOptionsOrBuilder getNfsExportOptionsOrBuilder( - int index) { - if (nfsExportOptionsBuilder_ == null) { - return nfsExportOptions_.get(index); } else { - return nfsExportOptionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public java.util.List - getNfsExportOptionsOrBuilderList() { - if (nfsExportOptionsBuilder_ != null) { - return nfsExportOptionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nfsExportOptions_); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public com.google.cloud.filestore.v1.NfsExportOptions.Builder addNfsExportOptionsBuilder() { - return getNfsExportOptionsFieldBuilder().addBuilder( - com.google.cloud.filestore.v1.NfsExportOptions.getDefaultInstance()); - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public com.google.cloud.filestore.v1.NfsExportOptions.Builder addNfsExportOptionsBuilder( - int index) { - return getNfsExportOptionsFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1.NfsExportOptions.getDefaultInstance()); - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - public java.util.List - getNfsExportOptionsBuilderList() { - return getNfsExportOptionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.NfsExportOptions, com.google.cloud.filestore.v1.NfsExportOptions.Builder, com.google.cloud.filestore.v1.NfsExportOptionsOrBuilder> - getNfsExportOptionsFieldBuilder() { - if (nfsExportOptionsBuilder_ == null) { - nfsExportOptionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.NfsExportOptions, com.google.cloud.filestore.v1.NfsExportOptions.Builder, com.google.cloud.filestore.v1.NfsExportOptionsOrBuilder>( - nfsExportOptions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - nfsExportOptions_ = null; - } - return nfsExportOptionsBuilder_; - } - @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.filestore.v1.FileShareConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.FileShareConfig) - private static final com.google.cloud.filestore.v1.FileShareConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.FileShareConfig(); - } - - public static com.google.cloud.filestore.v1.FileShareConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FileShareConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FileShareConfig(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.filestore.v1.FileShareConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/FileShareConfigOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/FileShareConfigOrBuilder.java deleted file mode 100644 index c2fec583f7d7..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/FileShareConfigOrBuilder.java +++ /dev/null @@ -1,126 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface FileShareConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.FileShareConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the file share (must be 16 characters or less).
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the file share (must be 16 characters or less).
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * File share capacity in gigabytes (GB).
-   * Cloud Filestore defines 1 GB as 1024^3 bytes.
-   * 
- * - * int64 capacity_gb = 2; - * @return The capacityGb. - */ - long getCapacityGb(); - - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-   * that this file share has been restored from.
-   * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - boolean hasSourceBackup(); - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-   * that this file share has been restored from.
-   * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - java.lang.String getSourceBackup(); - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
-   * that this file share has been restored from.
-   * 
- * - * string source_backup = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - com.google.protobuf.ByteString - getSourceBackupBytes(); - - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - java.util.List - getNfsExportOptionsList(); - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - com.google.cloud.filestore.v1.NfsExportOptions getNfsExportOptions(int index); - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - int getNfsExportOptionsCount(); - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - java.util.List - getNfsExportOptionsOrBuilderList(); - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - com.google.cloud.filestore.v1.NfsExportOptionsOrBuilder getNfsExportOptionsOrBuilder( - int index); - - public com.google.cloud.filestore.v1.FileShareConfig.SourceCase getSourceCase(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetBackupRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetBackupRequest.java deleted file mode 100644 index fc6f1896e265..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetBackupRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * GetBackupRequest gets the state of a backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.GetBackupRequest} - */ -public final class GetBackupRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.GetBackupRequest) - GetBackupRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetBackupRequest.newBuilder() to construct. - private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBackupRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetBackupRequest( - 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.GetBackupRequest.class, com.google.cloud.filestore.v1.GetBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_number}/locations/{location}/backups/{backup_id}`.
-   * 
- * - * 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 backup resource name, in the format
-   * `projects/{project_number}/locations/{location}/backups/{backup_id}`.
-   * 
- * - * 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.filestore.v1.GetBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.GetBackupRequest other = (com.google.cloud.filestore.v1.GetBackupRequest) 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.filestore.v1.GetBackupRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.GetBackupRequest 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.filestore.v1.GetBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.GetBackupRequest 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.filestore.v1.GetBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.GetBackupRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.GetBackupRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.GetBackupRequest 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.filestore.v1.GetBackupRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.GetBackupRequest 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.filestore.v1.GetBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.GetBackupRequest 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.filestore.v1.GetBackupRequest 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; - } - /** - *
-   * GetBackupRequest gets the state of a backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.GetBackupRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.GetBackupRequest) - com.google.cloud.filestore.v1.GetBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.GetBackupRequest.class, com.google.cloud.filestore.v1.GetBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.GetBackupRequest.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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.GetBackupRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.GetBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.GetBackupRequest build() { - com.google.cloud.filestore.v1.GetBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.GetBackupRequest buildPartial() { - com.google.cloud.filestore.v1.GetBackupRequest result = new com.google.cloud.filestore.v1.GetBackupRequest(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.filestore.v1.GetBackupRequest) { - return mergeFrom((com.google.cloud.filestore.v1.GetBackupRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.GetBackupRequest other) { - if (other == com.google.cloud.filestore.v1.GetBackupRequest.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.filestore.v1.GetBackupRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.GetBackupRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_number}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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.filestore.v1.GetBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.GetBackupRequest) - private static final com.google.cloud.filestore.v1.GetBackupRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.GetBackupRequest(); - } - - public static com.google.cloud.filestore.v1.GetBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetBackupRequest(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.filestore.v1.GetBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetBackupRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetBackupRequestOrBuilder.java deleted file mode 100644 index 7cb12bf67914..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetBackupRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface GetBackupRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.GetBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_number}/locations/{location}/backups/{backup_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_number}/locations/{location}/backups/{backup_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetInstanceRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetInstanceRequest.java deleted file mode 100644 index e0b027fa069d..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetInstanceRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * GetInstanceRequest gets the state of an instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.GetInstanceRequest} - */ -public final class GetInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.GetInstanceRequest) - GetInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetInstanceRequest.newBuilder() to construct. - private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetInstanceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetInstanceRequest( - 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.GetInstanceRequest.class, com.google.cloud.filestore.v1.GetInstanceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-   * 
- * - * 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 instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-   * 
- * - * 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.filestore.v1.GetInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.GetInstanceRequest other = (com.google.cloud.filestore.v1.GetInstanceRequest) 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.filestore.v1.GetInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.GetInstanceRequest 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.filestore.v1.GetInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.GetInstanceRequest 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.filestore.v1.GetInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.GetInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.GetInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.GetInstanceRequest 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.filestore.v1.GetInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.GetInstanceRequest 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.filestore.v1.GetInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.GetInstanceRequest 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.filestore.v1.GetInstanceRequest 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; - } - /** - *
-   * GetInstanceRequest gets the state of an instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.GetInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.GetInstanceRequest) - com.google.cloud.filestore.v1.GetInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.GetInstanceRequest.class, com.google.cloud.filestore.v1.GetInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.GetInstanceRequest.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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_GetInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.GetInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.GetInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.GetInstanceRequest build() { - com.google.cloud.filestore.v1.GetInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.GetInstanceRequest buildPartial() { - com.google.cloud.filestore.v1.GetInstanceRequest result = new com.google.cloud.filestore.v1.GetInstanceRequest(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.filestore.v1.GetInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1.GetInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.GetInstanceRequest other) { - if (other == com.google.cloud.filestore.v1.GetInstanceRequest.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.filestore.v1.GetInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.GetInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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.filestore.v1.GetInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.GetInstanceRequest) - private static final com.google.cloud.filestore.v1.GetInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.GetInstanceRequest(); - } - - public static com.google.cloud.filestore.v1.GetInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInstanceRequest(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.filestore.v1.GetInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetInstanceRequestOrBuilder.java deleted file mode 100644 index 73fb1e671d99..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/GetInstanceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface GetInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.GetInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/Instance.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/Instance.java deleted file mode 100644 index dff066db3834..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/Instance.java +++ /dev/null @@ -1,3513 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * A Cloud Filestore instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.Instance} - */ -public final class Instance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.Instance) - InstanceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Instance.newBuilder() to construct. - private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Instance() { - name_ = ""; - description_ = ""; - state_ = 0; - statusMessage_ = ""; - tier_ = 0; - fileShares_ = java.util.Collections.emptyList(); - networks_ = java.util.Collections.emptyList(); - etag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Instance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Instance( - 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 40: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - statusMessage_ = s; - break; - } - case 58: { - 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 64: { - int rawValue = input.readEnum(); - - tier_ = rawValue; - break; - } - case 74: { - 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 82: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fileShares_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fileShares_.add( - input.readMessage(com.google.cloud.filestore.v1.FileShareConfig.parser(), extensionRegistry)); - break; - } - case 90: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - networks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - networks_.add( - input.readMessage(com.google.cloud.filestore.v1.NetworkConfig.parser(), extensionRegistry)); - break; - } - case 98: { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 106: { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (satisfiesPzs_ != null) { - subBuilder = satisfiesPzs_.toBuilder(); - } - satisfiesPzs_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(satisfiesPzs_); - satisfiesPzs_ = 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 { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fileShares_ = java.util.Collections.unmodifiableList(fileShares_); - } - if (((mutable_bitField0_ & 0x00000004) != 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Instance_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 9: - 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Instance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.Instance.class, com.google.cloud.filestore.v1.Instance.Builder.class); - } - - /** - *
-   * The instance state.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1.Instance.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * The instance is being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - *
-     * The instance is available for use.
-     * 
- * - * READY = 2; - */ - READY(2), - /** - *
-     * Work is being done on the instance. You can get further details from the
-     * `statusMessage` field of the `Instance` resource.
-     * 
- * - * REPAIRING = 3; - */ - REPAIRING(3), - /** - *
-     * The instance is shutting down.
-     * 
- * - * DELETING = 4; - */ - DELETING(4), - /** - *
-     * The instance is experiencing an issue and might be unusable. You can get
-     * further details from the `statusMessage` field of the `Instance`
-     * resource.
-     * 
- * - * ERROR = 6; - */ - ERROR(6), - /** - *
-     * The instance is restoring a backup to an existing file share and may be
-     * unusable during this time.
-     * 
- * - * RESTORING = 7; - */ - RESTORING(7), - UNRECOGNIZED(-1), - ; - - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The instance is being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - *
-     * The instance is available for use.
-     * 
- * - * READY = 2; - */ - public static final int READY_VALUE = 2; - /** - *
-     * Work is being done on the instance. You can get further details from the
-     * `statusMessage` field of the `Instance` resource.
-     * 
- * - * REPAIRING = 3; - */ - public static final int REPAIRING_VALUE = 3; - /** - *
-     * The instance is shutting down.
-     * 
- * - * DELETING = 4; - */ - public static final int DELETING_VALUE = 4; - /** - *
-     * The instance is experiencing an issue and might be unusable. You can get
-     * further details from the `statusMessage` field of the `Instance`
-     * resource.
-     * 
- * - * ERROR = 6; - */ - public static final int ERROR_VALUE = 6; - /** - *
-     * The instance is restoring a backup to an existing file share and may be
-     * unusable during this time.
-     * 
- * - * RESTORING = 7; - */ - public static final int RESTORING_VALUE = 7; - - - 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 CREATING; - case 2: return READY; - case 3: return REPAIRING; - case 4: return DELETING; - case 6: return ERROR; - case 7: return RESTORING; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> 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.filestore.v1.Instance.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.filestore.v1.Instance.State) - } - - /** - *
-   * Available service tiers.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1.Instance.Tier} - */ - public enum Tier - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - TIER_UNSPECIFIED(0), - /** - *
-     * STANDARD tier.
-     * 
- * - * STANDARD = 1; - */ - STANDARD(1), - /** - *
-     * PREMIUM tier.
-     * 
- * - * PREMIUM = 2; - */ - PREMIUM(2), - /** - *
-     * BASIC instances offer a maximum capacity of 63.9 TB.
-     * BASIC_HDD is an alias for STANDARD Tier, offering economical
-     * performance backed by HDD.
-     * 
- * - * BASIC_HDD = 3; - */ - BASIC_HDD(3), - /** - *
-     * BASIC instances offer a maximum capacity of 63.9 TB.
-     * BASIC_SSD is an alias for PREMIUM Tier, and offers improved
-     * performance backed by SSD.
-     * 
- * - * BASIC_SSD = 4; - */ - BASIC_SSD(4), - /** - *
-     * HIGH_SCALE instances offer expanded capacity and performance scaling
-     * capabilities.
-     * 
- * - * HIGH_SCALE_SSD = 5; - */ - HIGH_SCALE_SSD(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - public static final int TIER_UNSPECIFIED_VALUE = 0; - /** - *
-     * STANDARD tier.
-     * 
- * - * STANDARD = 1; - */ - public static final int STANDARD_VALUE = 1; - /** - *
-     * PREMIUM tier.
-     * 
- * - * PREMIUM = 2; - */ - public static final int PREMIUM_VALUE = 2; - /** - *
-     * BASIC instances offer a maximum capacity of 63.9 TB.
-     * BASIC_HDD is an alias for STANDARD Tier, offering economical
-     * performance backed by HDD.
-     * 
- * - * BASIC_HDD = 3; - */ - public static final int BASIC_HDD_VALUE = 3; - /** - *
-     * BASIC instances offer a maximum capacity of 63.9 TB.
-     * BASIC_SSD is an alias for PREMIUM Tier, and offers improved
-     * performance backed by SSD.
-     * 
- * - * BASIC_SSD = 4; - */ - public static final int BASIC_SSD_VALUE = 4; - /** - *
-     * HIGH_SCALE instances offer expanded capacity and performance scaling
-     * capabilities.
-     * 
- * - * HIGH_SCALE_SSD = 5; - */ - public static final int HIGH_SCALE_SSD_VALUE = 5; - - - 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 Tier 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 Tier forNumber(int value) { - switch (value) { - case 0: return TIER_UNSPECIFIED; - case 1: return STANDARD; - case 2: return PREMIUM; - case 3: return BASIC_HDD; - case 4: return BASIC_SSD; - case 5: return HIGH_SCALE_SSD; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Tier> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Tier findValueByNumber(int number) { - return Tier.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.filestore.v1.Instance.getDescriptor().getEnumTypes().get(1); - } - - private static final Tier[] VALUES = values(); - - public static Tier 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 Tier(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1.Instance.Tier) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Output only. The resource name of the instance, in the format
-   * `projects/{project}/locations/{location}/instances/{instance}`.
-   * 
- * - * 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 resource name of the instance, in the format
-   * `projects/{project}/locations/{location}/instances/{instance}`.
-   * 
- * - * 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 instance (2048 characters or less).
-   * 
- * - * 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 instance (2048 characters or less).
-   * 
- * - * 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 STATE_FIELD_NUMBER = 5; - private int state_; - /** - *
-   * Output only. The instance state.
-   * 
- * - * .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Output only. The instance state.
-   * 
- * - * .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override public com.google.cloud.filestore.v1.Instance.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.Instance.State result = com.google.cloud.filestore.v1.Instance.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1.Instance.State.UNRECOGNIZED : result; - } - - public static final int STATUS_MESSAGE_FIELD_NUMBER = 6; - private volatile java.lang.Object statusMessage_; - /** - *
-   * Output only. Additional information about the instance state, if available.
-   * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusMessage. - */ - @java.lang.Override - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - 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(); - statusMessage_ = s; - return s; - } - } - /** - *
-   * Output only. Additional information about the instance state, if available.
-   * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int TIER_FIELD_NUMBER = 8; - private int tier_; - /** - *
-   * The service tier of the instance.
-   * 
- * - * .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override public int getTierValue() { - return tier_; - } - /** - *
-   * The service tier of the instance.
-   * 
- * - * .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @return The tier. - */ - @java.lang.Override public com.google.cloud.filestore.v1.Instance.Tier getTier() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.Instance.Tier result = com.google.cloud.filestore.v1.Instance.Tier.valueOf(tier_); - return result == null ? com.google.cloud.filestore.v1.Instance.Tier.UNRECOGNIZED : result; - } - - public static final int LABELS_FIELD_NUMBER = 9; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Instance_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - - @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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - @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; - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - @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 FILE_SHARES_FIELD_NUMBER = 10; - private java.util.List fileShares_; - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public java.util.List getFileSharesList() { - return fileShares_; - } - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public java.util.List - getFileSharesOrBuilderList() { - return fileShares_; - } - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public int getFileSharesCount() { - return fileShares_.size(); - } - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.FileShareConfig getFileShares(int index) { - return fileShares_.get(index); - } - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.FileShareConfigOrBuilder getFileSharesOrBuilder( - int index) { - return fileShares_.get(index); - } - - public static final int NETWORKS_FIELD_NUMBER = 11; - private java.util.List networks_; - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - @java.lang.Override - public java.util.List getNetworksList() { - return networks_; - } - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - @java.lang.Override - public java.util.List - getNetworksOrBuilderList() { - return networks_; - } - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - @java.lang.Override - public int getNetworksCount() { - return networks_.size(); - } - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.NetworkConfig getNetworks(int index) { - return networks_.get(index); - } - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.NetworkConfigOrBuilder getNetworksOrBuilder( - int index) { - return networks_.get(index); - } - - public static final int ETAG_FIELD_NUMBER = 12; - private volatile java.lang.Object etag_; - /** - *
-   * Server-specified ETag for the instance resource to prevent simultaneous
-   * updates from overwriting each other.
-   * 
- * - * string etag = 12; - * @return The etag. - */ - @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - 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(); - etag_ = s; - return s; - } - } - /** - *
-   * Server-specified ETag for the instance resource to prevent simultaneous
-   * updates from overwriting each other.
-   * 
- * - * string etag = 12; - * @return The bytes for etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SATISFIES_PZS_FIELD_NUMBER = 13; - private com.google.protobuf.BoolValue satisfiesPzs_; - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - @java.lang.Override - public boolean hasSatisfiesPzs() { - return satisfiesPzs_ != null; - } - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - @java.lang.Override - public com.google.protobuf.BoolValue getSatisfiesPzs() { - return satisfiesPzs_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { - return getSatisfiesPzs(); - } - - 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 (state_ != com.google.cloud.filestore.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, statusMessage_); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (tier_ != com.google.cloud.filestore.v1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - output.writeEnum(8, tier_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 9); - for (int i = 0; i < fileShares_.size(); i++) { - output.writeMessage(10, fileShares_.get(i)); - } - for (int i = 0; i < networks_.size(); i++) { - output.writeMessage(11, networks_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, etag_); - } - if (satisfiesPzs_ != null) { - output.writeMessage(13, getSatisfiesPzs()); - } - 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 (state_ != com.google.cloud.filestore.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, statusMessage_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getCreateTime()); - } - if (tier_ != com.google.cloud.filestore.v1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, tier_); - } - 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(9, labels__); - } - for (int i = 0; i < fileShares_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, fileShares_.get(i)); - } - for (int i = 0; i < networks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, networks_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, etag_); - } - if (satisfiesPzs_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getSatisfiesPzs()); - } - 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.filestore.v1.Instance)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.Instance other = (com.google.cloud.filestore.v1.Instance) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (state_ != other.state_) return false; - if (!getStatusMessage() - .equals(other.getStatusMessage())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (tier_ != other.tier_) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!getFileSharesList() - .equals(other.getFileSharesList())) return false; - if (!getNetworksList() - .equals(other.getNetworksList())) return false; - if (!getEtag() - .equals(other.getEtag())) return false; - if (hasSatisfiesPzs() != other.hasSatisfiesPzs()) return false; - if (hasSatisfiesPzs()) { - if (!getSatisfiesPzs() - .equals(other.getSatisfiesPzs())) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStatusMessage().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (37 * hash) + TIER_FIELD_NUMBER; - hash = (53 * hash) + tier_; - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (getFileSharesCount() > 0) { - hash = (37 * hash) + FILE_SHARES_FIELD_NUMBER; - hash = (53 * hash) + getFileSharesList().hashCode(); - } - if (getNetworksCount() > 0) { - hash = (37 * hash) + NETWORKS_FIELD_NUMBER; - hash = (53 * hash) + getNetworksList().hashCode(); - } - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - if (hasSatisfiesPzs()) { - hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; - hash = (53 * hash) + getSatisfiesPzs().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.Instance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.Instance 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.filestore.v1.Instance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.Instance 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.filestore.v1.Instance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.Instance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.Instance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.Instance 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.filestore.v1.Instance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.Instance 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.filestore.v1.Instance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.Instance 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.filestore.v1.Instance 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 Cloud Filestore instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.Instance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.Instance) - com.google.cloud.filestore.v1.InstanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Instance_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 9: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 9: - 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Instance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.Instance.class, com.google.cloud.filestore.v1.Instance.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.Instance.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFileSharesFieldBuilder(); - getNetworksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - state_ = 0; - - statusMessage_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - tier_ = 0; - - internalGetMutableLabels().clear(); - if (fileSharesBuilder_ == null) { - fileShares_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - fileSharesBuilder_.clear(); - } - if (networksBuilder_ == null) { - networks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - networksBuilder_.clear(); - } - etag_ = ""; - - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = null; - } else { - satisfiesPzs_ = null; - satisfiesPzsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_Instance_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.Instance getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.Instance.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.Instance build() { - com.google.cloud.filestore.v1.Instance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.Instance buildPartial() { - com.google.cloud.filestore.v1.Instance result = new com.google.cloud.filestore.v1.Instance(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - result.state_ = state_; - result.statusMessage_ = statusMessage_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.tier_ = tier_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (fileSharesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - fileShares_ = java.util.Collections.unmodifiableList(fileShares_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fileShares_ = fileShares_; - } else { - result.fileShares_ = fileSharesBuilder_.build(); - } - if (networksBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - networks_ = java.util.Collections.unmodifiableList(networks_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.networks_ = networks_; - } else { - result.networks_ = networksBuilder_.build(); - } - result.etag_ = etag_; - if (satisfiesPzsBuilder_ == null) { - result.satisfiesPzs_ = satisfiesPzs_; - } else { - result.satisfiesPzs_ = satisfiesPzsBuilder_.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.filestore.v1.Instance) { - return mergeFrom((com.google.cloud.filestore.v1.Instance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.Instance other) { - if (other == com.google.cloud.filestore.v1.Instance.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStatusMessage().isEmpty()) { - statusMessage_ = other.statusMessage_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.tier_ != 0) { - setTierValue(other.getTierValue()); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (fileSharesBuilder_ == null) { - if (!other.fileShares_.isEmpty()) { - if (fileShares_.isEmpty()) { - fileShares_ = other.fileShares_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFileSharesIsMutable(); - fileShares_.addAll(other.fileShares_); - } - onChanged(); - } - } else { - if (!other.fileShares_.isEmpty()) { - if (fileSharesBuilder_.isEmpty()) { - fileSharesBuilder_.dispose(); - fileSharesBuilder_ = null; - fileShares_ = other.fileShares_; - bitField0_ = (bitField0_ & ~0x00000002); - fileSharesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFileSharesFieldBuilder() : null; - } else { - fileSharesBuilder_.addAllMessages(other.fileShares_); - } - } - } - if (networksBuilder_ == null) { - if (!other.networks_.isEmpty()) { - if (networks_.isEmpty()) { - networks_ = other.networks_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureNetworksIsMutable(); - networks_.addAll(other.networks_); - } - onChanged(); - } - } else { - if (!other.networks_.isEmpty()) { - if (networksBuilder_.isEmpty()) { - networksBuilder_.dispose(); - networksBuilder_ = null; - networks_ = other.networks_; - bitField0_ = (bitField0_ & ~0x00000004); - networksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNetworksFieldBuilder() : null; - } else { - networksBuilder_.addAllMessages(other.networks_); - } - } - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - onChanged(); - } - if (other.hasSatisfiesPzs()) { - mergeSatisfiesPzs(other.getSatisfiesPzs()); - } - 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.filestore.v1.Instance parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.Instance) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The resource name of the instance, in the format
-     * `projects/{project}/locations/{location}/instances/{instance}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project}/locations/{location}/instances/{instance}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project}/locations/{location}/instances/{instance}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project}/locations/{location}/instances/{instance}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project}/locations/{location}/instances/{instance}`.
-     * 
- * - * 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 instance (2048 characters or less).
-     * 
- * - * 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 instance (2048 characters or less).
-     * 
- * - * 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 instance (2048 characters or less).
-     * 
- * - * 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 instance (2048 characters or less).
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * The description of the instance (2048 characters or less).
-     * 
- * - * 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 int state_ = 0; - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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; - } - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Instance.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.Instance.State result = com.google.cloud.filestore.v1.Instance.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1.Instance.State.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.filestore.v1.Instance.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object statusMessage_ = ""; - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusMessage. - */ - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusMessage. - */ - public com.google.protobuf.ByteString - getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - statusMessage_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearStatusMessage() { - - statusMessage_ = getDefaultInstance().getStatusMessage(); - onChanged(); - return this; - } - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - statusMessage_ = value; - 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_; - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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(); - } - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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 int tier_ = 0; - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override public int getTierValue() { - return tier_; - } - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @param value The enum numeric value on the wire for tier to set. - * @return This builder for chaining. - */ - public Builder setTierValue(int value) { - - tier_ = value; - onChanged(); - return this; - } - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @return The tier. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Instance.Tier getTier() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.Instance.Tier result = com.google.cloud.filestore.v1.Instance.Tier.valueOf(tier_); - return result == null ? com.google.cloud.filestore.v1.Instance.Tier.UNRECOGNIZED : result; - } - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @param value The tier to set. - * @return This builder for chaining. - */ - public Builder setTier(com.google.cloud.filestore.v1.Instance.Tier value) { - if (value == null) { - throw new NullPointerException(); - } - - tier_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @return This builder for chaining. - */ - public Builder clearTier() { - - tier_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - - @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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - - 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - 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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private java.util.List fileShares_ = - java.util.Collections.emptyList(); - private void ensureFileSharesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - fileShares_ = new java.util.ArrayList(fileShares_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.FileShareConfig, com.google.cloud.filestore.v1.FileShareConfig.Builder, com.google.cloud.filestore.v1.FileShareConfigOrBuilder> fileSharesBuilder_; - - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public java.util.List getFileSharesList() { - if (fileSharesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fileShares_); - } else { - return fileSharesBuilder_.getMessageList(); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public int getFileSharesCount() { - if (fileSharesBuilder_ == null) { - return fileShares_.size(); - } else { - return fileSharesBuilder_.getCount(); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1.FileShareConfig getFileShares(int index) { - if (fileSharesBuilder_ == null) { - return fileShares_.get(index); - } else { - return fileSharesBuilder_.getMessage(index); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public Builder setFileShares( - int index, com.google.cloud.filestore.v1.FileShareConfig value) { - if (fileSharesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileSharesIsMutable(); - fileShares_.set(index, value); - onChanged(); - } else { - fileSharesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public Builder setFileShares( - int index, com.google.cloud.filestore.v1.FileShareConfig.Builder builderForValue) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - fileShares_.set(index, builderForValue.build()); - onChanged(); - } else { - fileSharesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public Builder addFileShares(com.google.cloud.filestore.v1.FileShareConfig value) { - if (fileSharesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileSharesIsMutable(); - fileShares_.add(value); - onChanged(); - } else { - fileSharesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public Builder addFileShares( - int index, com.google.cloud.filestore.v1.FileShareConfig value) { - if (fileSharesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileSharesIsMutable(); - fileShares_.add(index, value); - onChanged(); - } else { - fileSharesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public Builder addFileShares( - com.google.cloud.filestore.v1.FileShareConfig.Builder builderForValue) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - fileShares_.add(builderForValue.build()); - onChanged(); - } else { - fileSharesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public Builder addFileShares( - int index, com.google.cloud.filestore.v1.FileShareConfig.Builder builderForValue) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - fileShares_.add(index, builderForValue.build()); - onChanged(); - } else { - fileSharesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public Builder addAllFileShares( - java.lang.Iterable values) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fileShares_); - onChanged(); - } else { - fileSharesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public Builder clearFileShares() { - if (fileSharesBuilder_ == null) { - fileShares_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - fileSharesBuilder_.clear(); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public Builder removeFileShares(int index) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - fileShares_.remove(index); - onChanged(); - } else { - fileSharesBuilder_.remove(index); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1.FileShareConfig.Builder getFileSharesBuilder( - int index) { - return getFileSharesFieldBuilder().getBuilder(index); - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1.FileShareConfigOrBuilder getFileSharesOrBuilder( - int index) { - if (fileSharesBuilder_ == null) { - return fileShares_.get(index); } else { - return fileSharesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public java.util.List - getFileSharesOrBuilderList() { - if (fileSharesBuilder_ != null) { - return fileSharesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fileShares_); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1.FileShareConfig.Builder addFileSharesBuilder() { - return getFileSharesFieldBuilder().addBuilder( - com.google.cloud.filestore.v1.FileShareConfig.getDefaultInstance()); - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1.FileShareConfig.Builder addFileSharesBuilder( - int index) { - return getFileSharesFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1.FileShareConfig.getDefaultInstance()); - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - public java.util.List - getFileSharesBuilderList() { - return getFileSharesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.FileShareConfig, com.google.cloud.filestore.v1.FileShareConfig.Builder, com.google.cloud.filestore.v1.FileShareConfigOrBuilder> - getFileSharesFieldBuilder() { - if (fileSharesBuilder_ == null) { - fileSharesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.FileShareConfig, com.google.cloud.filestore.v1.FileShareConfig.Builder, com.google.cloud.filestore.v1.FileShareConfigOrBuilder>( - fileShares_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - fileShares_ = null; - } - return fileSharesBuilder_; - } - - private java.util.List networks_ = - java.util.Collections.emptyList(); - private void ensureNetworksIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - networks_ = new java.util.ArrayList(networks_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.NetworkConfig, com.google.cloud.filestore.v1.NetworkConfig.Builder, com.google.cloud.filestore.v1.NetworkConfigOrBuilder> networksBuilder_; - - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public java.util.List getNetworksList() { - if (networksBuilder_ == null) { - return java.util.Collections.unmodifiableList(networks_); - } else { - return networksBuilder_.getMessageList(); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public int getNetworksCount() { - if (networksBuilder_ == null) { - return networks_.size(); - } else { - return networksBuilder_.getCount(); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1.NetworkConfig getNetworks(int index) { - if (networksBuilder_ == null) { - return networks_.get(index); - } else { - return networksBuilder_.getMessage(index); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public Builder setNetworks( - int index, com.google.cloud.filestore.v1.NetworkConfig value) { - if (networksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworksIsMutable(); - networks_.set(index, value); - onChanged(); - } else { - networksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public Builder setNetworks( - int index, com.google.cloud.filestore.v1.NetworkConfig.Builder builderForValue) { - if (networksBuilder_ == null) { - ensureNetworksIsMutable(); - networks_.set(index, builderForValue.build()); - onChanged(); - } else { - networksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public Builder addNetworks(com.google.cloud.filestore.v1.NetworkConfig value) { - if (networksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworksIsMutable(); - networks_.add(value); - onChanged(); - } else { - networksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public Builder addNetworks( - int index, com.google.cloud.filestore.v1.NetworkConfig value) { - if (networksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworksIsMutable(); - networks_.add(index, value); - onChanged(); - } else { - networksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public Builder addNetworks( - com.google.cloud.filestore.v1.NetworkConfig.Builder builderForValue) { - if (networksBuilder_ == null) { - ensureNetworksIsMutable(); - networks_.add(builderForValue.build()); - onChanged(); - } else { - networksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public Builder addNetworks( - int index, com.google.cloud.filestore.v1.NetworkConfig.Builder builderForValue) { - if (networksBuilder_ == null) { - ensureNetworksIsMutable(); - networks_.add(index, builderForValue.build()); - onChanged(); - } else { - networksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - 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; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public Builder clearNetworks() { - if (networksBuilder_ == null) { - networks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - networksBuilder_.clear(); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public Builder removeNetworks(int index) { - if (networksBuilder_ == null) { - ensureNetworksIsMutable(); - networks_.remove(index); - onChanged(); - } else { - networksBuilder_.remove(index); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1.NetworkConfig.Builder getNetworksBuilder( - int index) { - return getNetworksFieldBuilder().getBuilder(index); - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1.NetworkConfigOrBuilder getNetworksOrBuilder( - int index) { - if (networksBuilder_ == null) { - return networks_.get(index); } else { - return networksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public java.util.List - getNetworksOrBuilderList() { - if (networksBuilder_ != null) { - return networksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(networks_); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1.NetworkConfig.Builder addNetworksBuilder() { - return getNetworksFieldBuilder().addBuilder( - com.google.cloud.filestore.v1.NetworkConfig.getDefaultInstance()); - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1.NetworkConfig.Builder addNetworksBuilder( - int index) { - return getNetworksFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1.NetworkConfig.getDefaultInstance()); - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - public java.util.List - getNetworksBuilderList() { - return getNetworksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.NetworkConfig, com.google.cloud.filestore.v1.NetworkConfig.Builder, com.google.cloud.filestore.v1.NetworkConfigOrBuilder> - getNetworksFieldBuilder() { - if (networksBuilder_ == null) { - networksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.NetworkConfig, com.google.cloud.filestore.v1.NetworkConfig.Builder, com.google.cloud.filestore.v1.NetworkConfigOrBuilder>( - networks_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - networks_ = null; - } - return networksBuilder_; - } - - private java.lang.Object etag_ = ""; - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @return The bytes for etag. - */ - public com.google.protobuf.ByteString - getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - etag_ = value; - onChanged(); - return this; - } - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @return This builder for chaining. - */ - public Builder clearEtag() { - - etag_ = getDefaultInstance().getEtag(); - onChanged(); - return this; - } - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @param value The bytes for etag to set. - * @return This builder for chaining. - */ - public Builder setEtagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - etag_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.BoolValue satisfiesPzs_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> satisfiesPzsBuilder_; - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - public boolean hasSatisfiesPzs() { - return satisfiesPzsBuilder_ != null || satisfiesPzs_ != null; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - public com.google.protobuf.BoolValue getSatisfiesPzs() { - if (satisfiesPzsBuilder_ == null) { - return satisfiesPzs_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } else { - return satisfiesPzsBuilder_.getMessage(); - } - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSatisfiesPzs(com.google.protobuf.BoolValue value) { - if (satisfiesPzsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - satisfiesPzs_ = value; - onChanged(); - } else { - satisfiesPzsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSatisfiesPzs( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = builderForValue.build(); - onChanged(); - } else { - satisfiesPzsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeSatisfiesPzs(com.google.protobuf.BoolValue value) { - if (satisfiesPzsBuilder_ == null) { - if (satisfiesPzs_ != null) { - satisfiesPzs_ = - com.google.protobuf.BoolValue.newBuilder(satisfiesPzs_).mergeFrom(value).buildPartial(); - } else { - satisfiesPzs_ = value; - } - onChanged(); - } else { - satisfiesPzsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearSatisfiesPzs() { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = null; - onChanged(); - } else { - satisfiesPzs_ = null; - satisfiesPzsBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.BoolValue.Builder getSatisfiesPzsBuilder() { - - onChanged(); - return getSatisfiesPzsFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { - if (satisfiesPzsBuilder_ != null) { - return satisfiesPzsBuilder_.getMessageOrBuilder(); - } else { - return satisfiesPzs_ == null ? - com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> - getSatisfiesPzsFieldBuilder() { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( - getSatisfiesPzs(), - getParentForChildren(), - isClean()); - satisfiesPzs_ = null; - } - return satisfiesPzsBuilder_; - } - @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.filestore.v1.Instance) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.Instance) - private static final com.google.cloud.filestore.v1.Instance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.Instance(); - } - - public static com.google.cloud.filestore.v1.Instance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Instance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Instance(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.filestore.v1.Instance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/InstanceName.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/InstanceName.java deleted file mode 100644 index dea54abbfae8..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/InstanceName.java +++ /dev/null @@ -1,223 +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.filestore.v1; - -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 InstanceName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_INSTANCE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/instances/{instance}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String instance; - - @Deprecated - protected InstanceName() { - project = null; - location = null; - instance = null; - } - - private InstanceName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - instance = Preconditions.checkNotNull(builder.getInstance()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getInstance() { - return instance; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static InstanceName of(String project, String location, String instance) { - return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); - } - - public static String format(String project, String location, String instance) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setInstance(instance) - .build() - .toString(); - } - - public static InstanceName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_INSTANCE.validatedMatch( - formattedString, "InstanceName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); - } - - 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 (InstanceName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_INSTANCE.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 (instance != null) { - fieldMapBuilder.put("instance", instance); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_INSTANCE.instantiate( - "project", project, "location", location, "instance", instance); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - InstanceName that = ((InstanceName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.instance, that.instance); - } - 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(instance); - return h; - } - - /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ - public static class Builder { - private String project; - private String location; - private String instance; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getInstance() { - return instance; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setInstance(String instance) { - this.instance = instance; - return this; - } - - private Builder(InstanceName instanceName) { - this.project = instanceName.project; - this.location = instanceName.location; - this.instance = instanceName.instance; - } - - public InstanceName build() { - return new InstanceName(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/InstanceOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/InstanceOrBuilder.java deleted file mode 100644 index 4c3e1d687d05..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/InstanceOrBuilder.java +++ /dev/null @@ -1,339 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface InstanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.Instance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The resource name of the instance, in the format
-   * `projects/{project}/locations/{location}/instances/{instance}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The resource name of the instance, in the format
-   * `projects/{project}/locations/{location}/instances/{instance}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The description of the instance (2048 characters or less).
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The description of the instance (2048 characters or less).
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. The instance state.
-   * 
- * - * .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Output only. The instance state.
-   * 
- * - * .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - com.google.cloud.filestore.v1.Instance.State getState(); - - /** - *
-   * Output only. Additional information about the instance state, if available.
-   * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusMessage. - */ - java.lang.String getStatusMessage(); - /** - *
-   * Output only. Additional information about the instance state, if available.
-   * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusMessage. - */ - com.google.protobuf.ByteString - getStatusMessageBytes(); - - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The service tier of the instance.
-   * 
- * - * .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @return The enum numeric value on the wire for tier. - */ - int getTierValue(); - /** - *
-   * The service tier of the instance.
-   * 
- * - * .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @return The tier. - */ - com.google.cloud.filestore.v1.Instance.Tier getTier(); - - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - int getLabelsCount(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - java.util.List - getFileSharesList(); - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - com.google.cloud.filestore.v1.FileShareConfig getFileShares(int index); - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - int getFileSharesCount(); - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - java.util.List - getFileSharesOrBuilderList(); - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - com.google.cloud.filestore.v1.FileShareConfigOrBuilder getFileSharesOrBuilder( - int index); - - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - java.util.List - getNetworksList(); - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - com.google.cloud.filestore.v1.NetworkConfig getNetworks(int index); - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - int getNetworksCount(); - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - java.util.List - getNetworksOrBuilderList(); - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - com.google.cloud.filestore.v1.NetworkConfigOrBuilder getNetworksOrBuilder( - int index); - - /** - *
-   * Server-specified ETag for the instance resource to prevent simultaneous
-   * updates from overwriting each other.
-   * 
- * - * string etag = 12; - * @return The etag. - */ - java.lang.String getEtag(); - /** - *
-   * Server-specified ETag for the instance resource to prevent simultaneous
-   * updates from overwriting each other.
-   * 
- * - * string etag = 12; - * @return The bytes for etag. - */ - com.google.protobuf.ByteString - getEtagBytes(); - - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - boolean hasSatisfiesPzs(); - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - com.google.protobuf.BoolValue getSatisfiesPzs(); - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsRequest.java deleted file mode 100644 index 5f3d8d4cc45d..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsRequest.java +++ /dev/null @@ -1,1215 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * ListBackupsRequest lists backups.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.ListBackupsRequest} - */ -public final class ListBackupsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.ListBackupsRequest) - ListBackupsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListBackupsRequest.newBuilder() to construct. - private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListBackupsRequest() { - parent_ = ""; - pageToken_ = ""; - orderBy_ = ""; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListBackupsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListBackupsRequest( - 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 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.ListBackupsRequest.class, com.google.cloud.filestore.v1.ListBackupsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project and location for which to retrieve backup
-   * information, in the format
-   * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**. To retrieve
-   * backup information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 project and location for which to retrieve backup
-   * information, in the format
-   * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**. To retrieve
-   * backup information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 PAGE_SIZE_FIELD_NUMBER = 2; - 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_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - 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; - return s; - } - } - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 4; - private volatile java.lang.Object orderBy_; - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - 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(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 5; - private volatile java.lang.Object filter_; - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @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 = 5; - * @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 - 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 (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); - } - 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 (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(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); - } - 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.filestore.v1.ListBackupsRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.ListBackupsRequest other = (com.google.cloud.filestore.v1.ListBackupsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!getFilter() - .equals(other.getFilter())) 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(); - 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) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().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.filestore.v1.ListBackupsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListBackupsRequest 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.filestore.v1.ListBackupsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListBackupsRequest 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.filestore.v1.ListBackupsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListBackupsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.ListBackupsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListBackupsRequest 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.filestore.v1.ListBackupsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListBackupsRequest 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.filestore.v1.ListBackupsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListBackupsRequest 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.filestore.v1.ListBackupsRequest 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; - } - /** - *
-   * ListBackupsRequest lists backups.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.ListBackupsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.ListBackupsRequest) - com.google.cloud.filestore.v1.ListBackupsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.ListBackupsRequest.class, com.google.cloud.filestore.v1.ListBackupsRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.ListBackupsRequest.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_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - orderBy_ = ""; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListBackupsRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.ListBackupsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListBackupsRequest build() { - com.google.cloud.filestore.v1.ListBackupsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListBackupsRequest buildPartial() { - com.google.cloud.filestore.v1.ListBackupsRequest result = new com.google.cloud.filestore.v1.ListBackupsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.orderBy_ = orderBy_; - result.filter_ = filter_; - 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.filestore.v1.ListBackupsRequest) { - return mergeFrom((com.google.cloud.filestore.v1.ListBackupsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.ListBackupsRequest other) { - if (other == com.google.cloud.filestore.v1.ListBackupsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - 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.filestore.v1.ListBackupsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.ListBackupsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project and location for which to retrieve backup
-     * information, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**. To retrieve
-     * backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve backup
-     * information, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**. To retrieve
-     * backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve backup
-     * information, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**. To retrieve
-     * backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve backup
-     * information, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**. To retrieve
-     * backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve backup
-     * information, in the format
-     * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**. To retrieve
-     * backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 int pageSize_ ; - /** - *
-     * The maximum number of items to return.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return.
-     * 
- * - * 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 to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * List filter.
-     * 
- * - * string filter = 5; - * @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 = 5; - * @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 = 5; - * @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 = 5; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * List filter.
-     * 
- * - * string filter = 5; - * @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); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.filestore.v1.ListBackupsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.ListBackupsRequest) - private static final com.google.cloud.filestore.v1.ListBackupsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.ListBackupsRequest(); - } - - public static com.google.cloud.filestore.v1.ListBackupsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBackupsRequest(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.filestore.v1.ListBackupsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsRequestOrBuilder.java deleted file mode 100644 index 72f91001877b..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsRequestOrBuilder.java +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface ListBackupsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.ListBackupsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project and location for which to retrieve backup
-   * information, in the format
-   * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**. To retrieve
-   * backup information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project and location for which to retrieve backup
-   * information, in the format
-   * `projects/{project_number}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**. To retrieve
-   * backup information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsResponse.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsResponse.java deleted file mode 100644 index 4cfce080f855..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsResponse.java +++ /dev/null @@ -1,1404 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * ListBackupsResponse is the result of ListBackupsRequest.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.ListBackupsResponse} - */ -public final class ListBackupsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.ListBackupsResponse) - ListBackupsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListBackupsResponse.newBuilder() to construct. - private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListBackupsResponse() { - backups_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListBackupsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListBackupsResponse( - 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)) { - backups_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - backups_.add( - input.readMessage(com.google.cloud.filestore.v1.Backup.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - backups_ = java.util.Collections.unmodifiableList(backups_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.ListBackupsResponse.class, com.google.cloud.filestore.v1.ListBackupsResponse.Builder.class); - } - - public static final int BACKUPS_FIELD_NUMBER = 1; - private java.util.List backups_; - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - @java.lang.Override - public java.util.List getBackupsList() { - return backups_; - } - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - @java.lang.Override - public java.util.List - getBackupsOrBuilderList() { - return backups_; - } - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - @java.lang.Override - public int getBackupsCount() { - return backups_.size(); - } - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Backup getBackups(int index) { - return backups_.get(index); - } - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.BackupOrBuilder getBackupsOrBuilder( - int index) { - return backups_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * 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; - } - } - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * 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; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList unreachable_; - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList - getUnreachableList() { - return unreachable_; - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString - getUnreachableBytes(int index) { - return unreachable_.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 { - for (int i = 0; i < backups_.size(); i++) { - output.writeMessage(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < backups_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().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.filestore.v1.ListBackupsResponse)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.ListBackupsResponse other = (com.google.cloud.filestore.v1.ListBackupsResponse) obj; - - if (!getBackupsList() - .equals(other.getBackupsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnreachableList() - .equals(other.getUnreachableList())) 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 (getBackupsCount() > 0) { - hash = (37 * hash) + BACKUPS_FIELD_NUMBER; - hash = (53 * hash) + getBackupsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.ListBackupsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListBackupsResponse 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.filestore.v1.ListBackupsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListBackupsResponse 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.filestore.v1.ListBackupsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListBackupsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.ListBackupsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListBackupsResponse 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.filestore.v1.ListBackupsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListBackupsResponse 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.filestore.v1.ListBackupsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListBackupsResponse 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.filestore.v1.ListBackupsResponse 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; - } - /** - *
-   * ListBackupsResponse is the result of ListBackupsRequest.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.ListBackupsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.ListBackupsResponse) - com.google.cloud.filestore.v1.ListBackupsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.ListBackupsResponse.class, com.google.cloud.filestore.v1.ListBackupsResponse.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.ListBackupsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBackupsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - backupsBuilder_.clear(); - } - nextPageToken_ = ""; - - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListBackupsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListBackupsResponse getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.ListBackupsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListBackupsResponse build() { - com.google.cloud.filestore.v1.ListBackupsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListBackupsResponse buildPartial() { - com.google.cloud.filestore.v1.ListBackupsResponse result = new com.google.cloud.filestore.v1.ListBackupsResponse(this); - int from_bitField0_ = bitField0_; - if (backupsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - backups_ = java.util.Collections.unmodifiableList(backups_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.backups_ = backups_; - } else { - result.backups_ = backupsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - if (((bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.unreachable_ = unreachable_; - 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.filestore.v1.ListBackupsResponse) { - return mergeFrom((com.google.cloud.filestore.v1.ListBackupsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.ListBackupsResponse other) { - if (other == com.google.cloud.filestore.v1.ListBackupsResponse.getDefaultInstance()) return this; - if (backupsBuilder_ == null) { - if (!other.backups_.isEmpty()) { - if (backups_.isEmpty()) { - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBackupsIsMutable(); - backups_.addAll(other.backups_); - } - onChanged(); - } - } else { - if (!other.backups_.isEmpty()) { - if (backupsBuilder_.isEmpty()) { - backupsBuilder_.dispose(); - backupsBuilder_ = null; - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - backupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBackupsFieldBuilder() : null; - } else { - backupsBuilder_.addAllMessages(other.backups_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - 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.filestore.v1.ListBackupsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.ListBackupsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List backups_ = - java.util.Collections.emptyList(); - private void ensureBackupsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - backups_ = new java.util.ArrayList(backups_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.Backup, com.google.cloud.filestore.v1.Backup.Builder, com.google.cloud.filestore.v1.BackupOrBuilder> backupsBuilder_; - - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public java.util.List getBackupsList() { - if (backupsBuilder_ == null) { - return java.util.Collections.unmodifiableList(backups_); - } else { - return backupsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public int getBackupsCount() { - if (backupsBuilder_ == null) { - return backups_.size(); - } else { - return backupsBuilder_.getCount(); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1.Backup getBackups(int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); - } else { - return backupsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public Builder setBackups( - int index, com.google.cloud.filestore.v1.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.set(index, value); - onChanged(); - } else { - backupsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public Builder setBackups( - int index, com.google.cloud.filestore.v1.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.set(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public Builder addBackups(com.google.cloud.filestore.v1.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(value); - onChanged(); - } else { - backupsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public Builder addBackups( - int index, com.google.cloud.filestore.v1.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(index, value); - onChanged(); - } else { - backupsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public Builder addBackups( - com.google.cloud.filestore.v1.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public Builder addBackups( - int index, com.google.cloud.filestore.v1.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public Builder addAllBackups( - java.lang.Iterable values) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, backups_); - onChanged(); - } else { - backupsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public Builder clearBackups() { - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - backupsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public Builder removeBackups(int index) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.remove(index); - onChanged(); - } else { - backupsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1.Backup.Builder getBackupsBuilder( - int index) { - return getBackupsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1.BackupOrBuilder getBackupsOrBuilder( - int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); } else { - return backupsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public java.util.List - getBackupsOrBuilderList() { - if (backupsBuilder_ != null) { - return backupsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(backups_); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1.Backup.Builder addBackupsBuilder() { - return getBackupsFieldBuilder().addBuilder( - com.google.cloud.filestore.v1.Backup.getDefaultInstance()); - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1.Backup.Builder addBackupsBuilder( - int index) { - return getBackupsFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1.Backup.getDefaultInstance()); - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - public java.util.List - getBackupsBuilderList() { - return getBackupsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.Backup, com.google.cloud.filestore.v1.Backup.Builder, com.google.cloud.filestore.v1.BackupOrBuilder> - getBackupsFieldBuilder() { - if (backupsBuilder_ == null) { - backupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.Backup, com.google.cloud.filestore.v1.Backup.Builder, com.google.cloud.filestore.v1.BackupOrBuilder>( - backups_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - backups_ = null; - } - return backupsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - - private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList - getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString - getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable( - java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, unreachable_); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.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.filestore.v1.ListBackupsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.ListBackupsResponse) - private static final com.google.cloud.filestore.v1.ListBackupsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.ListBackupsResponse(); - } - - public static com.google.cloud.filestore.v1.ListBackupsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBackupsResponse(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.filestore.v1.ListBackupsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsResponseOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsResponseOrBuilder.java deleted file mode 100644 index f36e32588b7e..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListBackupsResponseOrBuilder.java +++ /dev/null @@ -1,141 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface ListBackupsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.ListBackupsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - java.util.List - getBackupsList(); - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - com.google.cloud.filestore.v1.Backup getBackups(int index); - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - int getBackupsCount(); - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - java.util.List - getBackupsOrBuilderList(); - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Backup backups = 1; - */ - com.google.cloud.filestore.v1.BackupOrBuilder getBackupsOrBuilder( - int index); - - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * if there are no more results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * if there are no more results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); - - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - java.util.List - getUnreachableList(); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString - getUnreachableBytes(int index); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesRequest.java deleted file mode 100644 index 5edec4b39961..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesRequest.java +++ /dev/null @@ -1,1208 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * ListInstancesRequest lists instances.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.ListInstancesRequest} - */ -public final class ListInstancesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.ListInstancesRequest) - ListInstancesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListInstancesRequest.newBuilder() to construct. - private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListInstancesRequest() { - parent_ = ""; - pageToken_ = ""; - orderBy_ = ""; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListInstancesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListInstancesRequest( - 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 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.ListInstancesRequest.class, com.google.cloud.filestore.v1.ListInstancesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project and location for which to retrieve instance
-   * information, in the format `projects/{project_id}/locations/{location}`. In
-   * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
-   * retrieve instance information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 project and location for which to retrieve instance
-   * information, in the format `projects/{project_id}/locations/{location}`. In
-   * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
-   * retrieve instance information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 PAGE_SIZE_FIELD_NUMBER = 2; - 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_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - 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; - return s; - } - } - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 4; - private volatile java.lang.Object orderBy_; - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - 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(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 5; - private volatile java.lang.Object filter_; - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @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 = 5; - * @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 - 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 (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); - } - 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 (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(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); - } - 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.filestore.v1.ListInstancesRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.ListInstancesRequest other = (com.google.cloud.filestore.v1.ListInstancesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!getFilter() - .equals(other.getFilter())) 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(); - 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) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().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.filestore.v1.ListInstancesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListInstancesRequest 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.filestore.v1.ListInstancesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListInstancesRequest 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.filestore.v1.ListInstancesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListInstancesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.ListInstancesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListInstancesRequest 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.filestore.v1.ListInstancesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListInstancesRequest 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.filestore.v1.ListInstancesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListInstancesRequest 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.filestore.v1.ListInstancesRequest 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; - } - /** - *
-   * ListInstancesRequest lists instances.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.ListInstancesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.ListInstancesRequest) - com.google.cloud.filestore.v1.ListInstancesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.ListInstancesRequest.class, com.google.cloud.filestore.v1.ListInstancesRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.ListInstancesRequest.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_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - orderBy_ = ""; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListInstancesRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.ListInstancesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListInstancesRequest build() { - com.google.cloud.filestore.v1.ListInstancesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListInstancesRequest buildPartial() { - com.google.cloud.filestore.v1.ListInstancesRequest result = new com.google.cloud.filestore.v1.ListInstancesRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.orderBy_ = orderBy_; - result.filter_ = filter_; - 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.filestore.v1.ListInstancesRequest) { - return mergeFrom((com.google.cloud.filestore.v1.ListInstancesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.ListInstancesRequest other) { - if (other == com.google.cloud.filestore.v1.ListInstancesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - 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.filestore.v1.ListInstancesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.ListInstancesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project and location for which to retrieve instance
-     * information, in the format `projects/{project_id}/locations/{location}`. In
-     * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve instance
-     * information, in the format `projects/{project_id}/locations/{location}`. In
-     * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve instance
-     * information, in the format `projects/{project_id}/locations/{location}`. In
-     * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve instance
-     * information, in the format `projects/{project_id}/locations/{location}`. In
-     * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve instance
-     * information, in the format `projects/{project_id}/locations/{location}`. In
-     * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 int pageSize_ ; - /** - *
-     * The maximum number of items to return.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return.
-     * 
- * - * 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 to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * List filter.
-     * 
- * - * string filter = 5; - * @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 = 5; - * @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 = 5; - * @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 = 5; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * List filter.
-     * 
- * - * string filter = 5; - * @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); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.filestore.v1.ListInstancesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.ListInstancesRequest) - private static final com.google.cloud.filestore.v1.ListInstancesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.ListInstancesRequest(); - } - - public static com.google.cloud.filestore.v1.ListInstancesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListInstancesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstancesRequest(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.filestore.v1.ListInstancesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesRequestOrBuilder.java deleted file mode 100644 index 3db0ab0718c8..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesRequestOrBuilder.java +++ /dev/null @@ -1,109 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface ListInstancesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.ListInstancesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project and location for which to retrieve instance
-   * information, in the format `projects/{project_id}/locations/{location}`. In
-   * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
-   * retrieve instance information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project and location for which to retrieve instance
-   * information, in the format `projects/{project_id}/locations/{location}`. In
-   * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
-   * retrieve instance information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesResponse.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesResponse.java deleted file mode 100644 index 40cc7cdcaa1e..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesResponse.java +++ /dev/null @@ -1,1381 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * ListInstancesResponse is the result of ListInstancesRequest.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.ListInstancesResponse} - */ -public final class ListInstancesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.ListInstancesResponse) - ListInstancesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListInstancesResponse.newBuilder() to construct. - private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListInstancesResponse() { - instances_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListInstancesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListInstancesResponse( - 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)) { - instances_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage(com.google.cloud.filestore.v1.Instance.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.ListInstancesResponse.class, com.google.cloud.filestore.v1.ListInstancesResponse.Builder.class); - } - - public static final int INSTANCES_FIELD_NUMBER = 1; - private java.util.List instances_; - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - @java.lang.Override - public java.util.List getInstancesList() { - return instances_; - } - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - @java.lang.Override - public java.util.List - getInstancesOrBuilderList() { - return instances_; - } - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - @java.lang.Override - public int getInstancesCount() { - return instances_.size(); - } - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Instance getInstances(int index) { - return instances_.get(index); - } - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.InstanceOrBuilder getInstancesOrBuilder( - int index) { - return instances_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * 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; - } - } - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * 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; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList unreachable_; - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList - getUnreachableList() { - return unreachable_; - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString - getUnreachableBytes(int index) { - return unreachable_.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 { - for (int i = 0; i < instances_.size(); i++) { - output.writeMessage(1, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < instances_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().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.filestore.v1.ListInstancesResponse)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.ListInstancesResponse other = (com.google.cloud.filestore.v1.ListInstancesResponse) obj; - - if (!getInstancesList() - .equals(other.getInstancesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnreachableList() - .equals(other.getUnreachableList())) 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 (getInstancesCount() > 0) { - hash = (37 * hash) + INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getInstancesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.ListInstancesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListInstancesResponse 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.filestore.v1.ListInstancesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListInstancesResponse 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.filestore.v1.ListInstancesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.ListInstancesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.ListInstancesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListInstancesResponse 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.filestore.v1.ListInstancesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListInstancesResponse 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.filestore.v1.ListInstancesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.ListInstancesResponse 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.filestore.v1.ListInstancesResponse 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; - } - /** - *
-   * ListInstancesResponse is the result of ListInstancesRequest.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.ListInstancesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.ListInstancesResponse) - com.google.cloud.filestore.v1.ListInstancesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.ListInstancesResponse.class, com.google.cloud.filestore.v1.ListInstancesResponse.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.ListInstancesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInstancesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - instancesBuilder_.clear(); - } - nextPageToken_ = ""; - - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_ListInstancesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListInstancesResponse getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.ListInstancesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListInstancesResponse build() { - com.google.cloud.filestore.v1.ListInstancesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.ListInstancesResponse buildPartial() { - com.google.cloud.filestore.v1.ListInstancesResponse result = new com.google.cloud.filestore.v1.ListInstancesResponse(this); - int from_bitField0_ = bitField0_; - if (instancesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.instances_ = instances_; - } else { - result.instances_ = instancesBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - if (((bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.unreachable_ = unreachable_; - 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.filestore.v1.ListInstancesResponse) { - return mergeFrom((com.google.cloud.filestore.v1.ListInstancesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.ListInstancesResponse other) { - if (other == com.google.cloud.filestore.v1.ListInstancesResponse.getDefaultInstance()) return this; - if (instancesBuilder_ == null) { - if (!other.instances_.isEmpty()) { - if (instances_.isEmpty()) { - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInstancesIsMutable(); - instances_.addAll(other.instances_); - } - onChanged(); - } - } else { - if (!other.instances_.isEmpty()) { - if (instancesBuilder_.isEmpty()) { - instancesBuilder_.dispose(); - instancesBuilder_ = null; - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000001); - instancesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInstancesFieldBuilder() : null; - } else { - instancesBuilder_.addAllMessages(other.instances_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - 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.filestore.v1.ListInstancesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.ListInstancesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List instances_ = - java.util.Collections.emptyList(); - private void ensureInstancesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - instances_ = new java.util.ArrayList(instances_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.Instance, com.google.cloud.filestore.v1.Instance.Builder, com.google.cloud.filestore.v1.InstanceOrBuilder> instancesBuilder_; - - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public java.util.List getInstancesList() { - if (instancesBuilder_ == null) { - return java.util.Collections.unmodifiableList(instances_); - } else { - return instancesBuilder_.getMessageList(); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public int getInstancesCount() { - if (instancesBuilder_ == null) { - return instances_.size(); - } else { - return instancesBuilder_.getCount(); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1.Instance getInstances(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessage(index); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public Builder setInstances( - int index, com.google.cloud.filestore.v1.Instance value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.set(index, value); - onChanged(); - } else { - instancesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public Builder setInstances( - int index, com.google.cloud.filestore.v1.Instance.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.set(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public Builder addInstances(com.google.cloud.filestore.v1.Instance value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(value); - onChanged(); - } else { - instancesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public Builder addInstances( - int index, com.google.cloud.filestore.v1.Instance value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(index, value); - onChanged(); - } else { - instancesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public Builder addInstances( - com.google.cloud.filestore.v1.Instance.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public Builder addInstances( - int index, com.google.cloud.filestore.v1.Instance.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public Builder addAllInstances( - java.lang.Iterable values) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, instances_); - onChanged(); - } else { - instancesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public Builder clearInstances() { - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - instancesBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public Builder removeInstances(int index) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.remove(index); - onChanged(); - } else { - instancesBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1.Instance.Builder getInstancesBuilder( - int index) { - return getInstancesFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1.InstanceOrBuilder getInstancesOrBuilder( - int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); } else { - return instancesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public java.util.List - getInstancesOrBuilderList() { - if (instancesBuilder_ != null) { - return instancesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(instances_); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1.Instance.Builder addInstancesBuilder() { - return getInstancesFieldBuilder().addBuilder( - com.google.cloud.filestore.v1.Instance.getDefaultInstance()); - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1.Instance.Builder addInstancesBuilder( - int index) { - return getInstancesFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1.Instance.getDefaultInstance()); - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - public java.util.List - getInstancesBuilderList() { - return getInstancesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.Instance, com.google.cloud.filestore.v1.Instance.Builder, com.google.cloud.filestore.v1.InstanceOrBuilder> - getInstancesFieldBuilder() { - if (instancesBuilder_ == null) { - instancesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1.Instance, com.google.cloud.filestore.v1.Instance.Builder, com.google.cloud.filestore.v1.InstanceOrBuilder>( - instances_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - instances_ = null; - } - return instancesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - - private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList - getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString - getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable( - java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, unreachable_); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.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.filestore.v1.ListInstancesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.ListInstancesResponse) - private static final com.google.cloud.filestore.v1.ListInstancesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.ListInstancesResponse(); - } - - public static com.google.cloud.filestore.v1.ListInstancesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListInstancesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstancesResponse(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.filestore.v1.ListInstancesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesResponseOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesResponseOrBuilder.java deleted file mode 100644 index 6c3648858539..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/ListInstancesResponseOrBuilder.java +++ /dev/null @@ -1,136 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface ListInstancesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.ListInstancesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - java.util.List - getInstancesList(); - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - com.google.cloud.filestore.v1.Instance getInstances(int index); - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - int getInstancesCount(); - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - java.util.List - getInstancesOrBuilderList(); - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - com.google.cloud.filestore.v1.InstanceOrBuilder getInstancesOrBuilder( - int index); - - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * if there are no more results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * if there are no more results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); - - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - java.util.List - getUnreachableList(); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString - getUnreachableBytes(int index); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/LocationName.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/LocationName.java deleted file mode 100644 index b4f5436758b2..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/LocationName.java +++ /dev/null @@ -1,192 +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.filestore.v1; - -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 LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - 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 (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.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); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NetworkConfig.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NetworkConfig.java deleted file mode 100644 index a9449a4c77b3..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NetworkConfig.java +++ /dev/null @@ -1,1583 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * Network configuration for the instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.NetworkConfig} - */ -public final class NetworkConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.NetworkConfig) - NetworkConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use NetworkConfig.newBuilder() to construct. - private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NetworkConfig() { - network_ = ""; - modes_ = java.util.Collections.emptyList(); - reservedIpRange_ = ""; - ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NetworkConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NetworkConfig( - 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(); - - network_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - modes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - modes_.add(rawValue); - break; - } - case 26: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - modes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - modes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - reservedIpRange_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ipAddresses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ipAddresses_.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)) { - modes_ = java.util.Collections.unmodifiableList(modes_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ipAddresses_ = ipAddresses_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.NetworkConfig.class, com.google.cloud.filestore.v1.NetworkConfig.Builder.class); - } - - /** - *
-   * Internet protocol versions supported by Cloud Filestore.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1.NetworkConfig.AddressMode} - */ - public enum AddressMode - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Internet protocol not set.
-     * 
- * - * ADDRESS_MODE_UNSPECIFIED = 0; - */ - ADDRESS_MODE_UNSPECIFIED(0), - /** - *
-     * Use the IPv4 internet protocol.
-     * 
- * - * MODE_IPV4 = 1; - */ - MODE_IPV4(1), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Internet protocol not set.
-     * 
- * - * ADDRESS_MODE_UNSPECIFIED = 0; - */ - public static final int ADDRESS_MODE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Use the IPv4 internet protocol.
-     * 
- * - * MODE_IPV4 = 1; - */ - public static final int MODE_IPV4_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 AddressMode 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 AddressMode forNumber(int value) { - switch (value) { - case 0: return ADDRESS_MODE_UNSPECIFIED; - case 1: return MODE_IPV4; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AddressMode> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AddressMode findValueByNumber(int number) { - return AddressMode.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.filestore.v1.NetworkConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final AddressMode[] VALUES = values(); - - public static AddressMode 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 AddressMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1.NetworkConfig.AddressMode) - } - - public static final int NETWORK_FIELD_NUMBER = 1; - private volatile java.lang.Object network_; - /** - *
-   * The name of the Google Compute Engine
-   * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-   * instance is connected.
-   * 
- * - * 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; - } - } - /** - *
-   * The name of the Google Compute Engine
-   * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-   * instance is connected.
-   * 
- * - * 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 MODES_FIELD_NUMBER = 3; - private java.util.List modes_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.filestore.v1.NetworkConfig.AddressMode> modes_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.filestore.v1.NetworkConfig.AddressMode>() { - public com.google.cloud.filestore.v1.NetworkConfig.AddressMode convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.NetworkConfig.AddressMode result = com.google.cloud.filestore.v1.NetworkConfig.AddressMode.valueOf(from); - return result == null ? com.google.cloud.filestore.v1.NetworkConfig.AddressMode.UNRECOGNIZED : result; - } - }; - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the modes. - */ - @java.lang.Override - public java.util.List getModesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.filestore.v1.NetworkConfig.AddressMode>(modes_, modes_converter_); - } - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return The count of modes. - */ - @java.lang.Override - public int getModesCount() { - return modes_.size(); - } - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the element to return. - * @return The modes at the given index. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.NetworkConfig.AddressMode getModes(int index) { - return modes_converter_.convert(modes_.get(index)); - } - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the enum numeric values on the wire for modes. - */ - @java.lang.Override - public java.util.List - getModesValueList() { - return modes_; - } - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of modes at the given index. - */ - @java.lang.Override - public int getModesValue(int index) { - return modes_.get(index); - } - private int modesMemoizedSerializedSize; - - public static final int RESERVED_IP_RANGE_FIELD_NUMBER = 4; - private volatile java.lang.Object reservedIpRange_; - /** - *
-   * A /29 CIDR block in one of the
-   * [internal IP address
-   * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-   * that identifies the range of IP addresses reserved for this instance. For
-   * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap
-   * with either existing subnets or assigned IP address ranges for other Cloud
-   * Filestore instances in the selected VPC network.
-   * 
- * - * string reserved_ip_range = 4; - * @return The reservedIpRange. - */ - @java.lang.Override - public java.lang.String getReservedIpRange() { - java.lang.Object ref = reservedIpRange_; - 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(); - reservedIpRange_ = s; - return s; - } - } - /** - *
-   * A /29 CIDR block in one of the
-   * [internal IP address
-   * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-   * that identifies the range of IP addresses reserved for this instance. For
-   * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap
-   * with either existing subnets or assigned IP address ranges for other Cloud
-   * Filestore instances in the selected VPC network.
-   * 
- * - * string reserved_ip_range = 4; - * @return The bytes for reservedIpRange. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReservedIpRangeBytes() { - java.lang.Object ref = reservedIpRange_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reservedIpRange_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IP_ADDRESSES_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList ipAddresses_; - /** - *
-   * Output only. IPv4 addresses in the format
-   * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-   * IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return A list containing the ipAddresses. - */ - public com.google.protobuf.ProtocolStringList - getIpAddressesList() { - return ipAddresses_; - } - /** - *
-   * Output only. IPv4 addresses in the format
-   * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-   * IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The count of ipAddresses. - */ - public int getIpAddressesCount() { - return ipAddresses_.size(); - } - /** - *
-   * Output only. IPv4 addresses in the format
-   * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-   * IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the element to return. - * @return The ipAddresses at the given index. - */ - public java.lang.String getIpAddresses(int index) { - return ipAddresses_.get(index); - } - /** - *
-   * Output only. IPv4 addresses in the format
-   * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-   * IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. - */ - public com.google.protobuf.ByteString - getIpAddressesBytes(int index) { - return ipAddresses_.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 { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); - } - if (getModesList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(modesMemoizedSerializedSize); - } - for (int i = 0; i < modes_.size(); i++) { - output.writeEnumNoTag(modes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, reservedIpRange_); - } - for (int i = 0; i < ipAddresses_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, ipAddresses_.getRaw(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(network_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); - } - { - int dataSize = 0; - for (int i = 0; i < modes_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(modes_.get(i)); - } - size += dataSize; - if (!getModesList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }modesMemoizedSerializedSize = dataSize; - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, reservedIpRange_); - } - { - int dataSize = 0; - for (int i = 0; i < ipAddresses_.size(); i++) { - dataSize += computeStringSizeNoTag(ipAddresses_.getRaw(i)); - } - size += dataSize; - size += 1 * getIpAddressesList().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.filestore.v1.NetworkConfig)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.NetworkConfig other = (com.google.cloud.filestore.v1.NetworkConfig) obj; - - if (!getNetwork() - .equals(other.getNetwork())) return false; - if (!modes_.equals(other.modes_)) return false; - if (!getReservedIpRange() - .equals(other.getReservedIpRange())) return false; - if (!getIpAddressesList() - .equals(other.getIpAddressesList())) 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(); - if (getModesCount() > 0) { - hash = (37 * hash) + MODES_FIELD_NUMBER; - hash = (53 * hash) + modes_.hashCode(); - } - hash = (37 * hash) + RESERVED_IP_RANGE_FIELD_NUMBER; - hash = (53 * hash) + getReservedIpRange().hashCode(); - if (getIpAddressesCount() > 0) { - hash = (37 * hash) + IP_ADDRESSES_FIELD_NUMBER; - hash = (53 * hash) + getIpAddressesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.NetworkConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.NetworkConfig 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.filestore.v1.NetworkConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.NetworkConfig 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.filestore.v1.NetworkConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.NetworkConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.NetworkConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.NetworkConfig 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.filestore.v1.NetworkConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.NetworkConfig 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.filestore.v1.NetworkConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.NetworkConfig 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.filestore.v1.NetworkConfig 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 configuration for the instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.NetworkConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.NetworkConfig) - com.google.cloud.filestore.v1.NetworkConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.NetworkConfig.class, com.google.cloud.filestore.v1.NetworkConfig.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.NetworkConfig.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_ = ""; - - modes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - reservedIpRange_ = ""; - - ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NetworkConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.NetworkConfig getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.NetworkConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.NetworkConfig build() { - com.google.cloud.filestore.v1.NetworkConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.NetworkConfig buildPartial() { - com.google.cloud.filestore.v1.NetworkConfig result = new com.google.cloud.filestore.v1.NetworkConfig(this); - int from_bitField0_ = bitField0_; - result.network_ = network_; - if (((bitField0_ & 0x00000001) != 0)) { - modes_ = java.util.Collections.unmodifiableList(modes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.modes_ = modes_; - result.reservedIpRange_ = reservedIpRange_; - if (((bitField0_ & 0x00000002) != 0)) { - ipAddresses_ = ipAddresses_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.ipAddresses_ = ipAddresses_; - 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.filestore.v1.NetworkConfig) { - return mergeFrom((com.google.cloud.filestore.v1.NetworkConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.NetworkConfig other) { - if (other == com.google.cloud.filestore.v1.NetworkConfig.getDefaultInstance()) return this; - if (!other.getNetwork().isEmpty()) { - network_ = other.network_; - onChanged(); - } - if (!other.modes_.isEmpty()) { - if (modes_.isEmpty()) { - modes_ = other.modes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureModesIsMutable(); - modes_.addAll(other.modes_); - } - onChanged(); - } - if (!other.getReservedIpRange().isEmpty()) { - reservedIpRange_ = other.reservedIpRange_; - onChanged(); - } - if (!other.ipAddresses_.isEmpty()) { - if (ipAddresses_.isEmpty()) { - ipAddresses_ = other.ipAddresses_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureIpAddressesIsMutable(); - ipAddresses_.addAll(other.ipAddresses_); - } - 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.filestore.v1.NetworkConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.NetworkConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object network_ = ""; - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * 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; - } - } - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * 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; - } - } - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * 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; - } - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * string network = 1; - * @return This builder for chaining. - */ - public Builder clearNetwork() { - - network_ = getDefaultInstance().getNetwork(); - onChanged(); - return this; - } - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * 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.util.List modes_ = - java.util.Collections.emptyList(); - private void ensureModesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - modes_ = new java.util.ArrayList(modes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the modes. - */ - public java.util.List getModesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.filestore.v1.NetworkConfig.AddressMode>(modes_, modes_converter_); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return The count of modes. - */ - public int getModesCount() { - return modes_.size(); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the element to return. - * @return The modes at the given index. - */ - public com.google.cloud.filestore.v1.NetworkConfig.AddressMode getModes(int index) { - return modes_converter_.convert(modes_.get(index)); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param index The index to set the value at. - * @param value The modes to set. - * @return This builder for chaining. - */ - public Builder setModes( - int index, com.google.cloud.filestore.v1.NetworkConfig.AddressMode value) { - if (value == null) { - throw new NullPointerException(); - } - ensureModesIsMutable(); - modes_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param value The modes to add. - * @return This builder for chaining. - */ - public Builder addModes(com.google.cloud.filestore.v1.NetworkConfig.AddressMode value) { - if (value == null) { - throw new NullPointerException(); - } - ensureModesIsMutable(); - modes_.add(value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param values The modes to add. - * @return This builder for chaining. - */ - public Builder addAllModes( - java.lang.Iterable values) { - ensureModesIsMutable(); - for (com.google.cloud.filestore.v1.NetworkConfig.AddressMode value : values) { - modes_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return This builder for chaining. - */ - public Builder clearModes() { - modes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the enum numeric values on the wire for modes. - */ - public java.util.List - getModesValueList() { - return java.util.Collections.unmodifiableList(modes_); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of modes at the given index. - */ - public int getModesValue(int index) { - return modes_.get(index); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for modes to set. - * @return This builder for chaining. - */ - public Builder setModesValue( - int index, int value) { - ensureModesIsMutable(); - modes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param value The enum numeric value on the wire for modes to add. - * @return This builder for chaining. - */ - public Builder addModesValue(int value) { - ensureModesIsMutable(); - modes_.add(value); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param values The enum numeric values on the wire for modes to add. - * @return This builder for chaining. - */ - public Builder addAllModesValue( - java.lang.Iterable values) { - ensureModesIsMutable(); - for (int value : values) { - modes_.add(value); - } - onChanged(); - return this; - } - - private java.lang.Object reservedIpRange_ = ""; - /** - *
-     * A /29 CIDR block in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @return The reservedIpRange. - */ - public java.lang.String getReservedIpRange() { - java.lang.Object ref = reservedIpRange_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reservedIpRange_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A /29 CIDR block in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @return The bytes for reservedIpRange. - */ - public com.google.protobuf.ByteString - getReservedIpRangeBytes() { - java.lang.Object ref = reservedIpRange_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reservedIpRange_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A /29 CIDR block in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @param value The reservedIpRange to set. - * @return This builder for chaining. - */ - public Builder setReservedIpRange( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - reservedIpRange_ = value; - onChanged(); - return this; - } - /** - *
-     * A /29 CIDR block in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @return This builder for chaining. - */ - public Builder clearReservedIpRange() { - - reservedIpRange_ = getDefaultInstance().getReservedIpRange(); - onChanged(); - return this; - } - /** - *
-     * A /29 CIDR block in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @param value The bytes for reservedIpRange to set. - * @return This builder for chaining. - */ - public Builder setReservedIpRangeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - reservedIpRange_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureIpAddressesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - ipAddresses_ = new com.google.protobuf.LazyStringArrayList(ipAddresses_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-     * IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return A list containing the ipAddresses. - */ - public com.google.protobuf.ProtocolStringList - getIpAddressesList() { - return ipAddresses_.getUnmodifiableView(); - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-     * IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The count of ipAddresses. - */ - public int getIpAddressesCount() { - return ipAddresses_.size(); - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-     * IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the element to return. - * @return The ipAddresses at the given index. - */ - public java.lang.String getIpAddresses(int index) { - return ipAddresses_.get(index); - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-     * IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. - */ - public com.google.protobuf.ByteString - getIpAddressesBytes(int index) { - return ipAddresses_.getByteString(index); - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-     * IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index to set the value at. - * @param value The ipAddresses to set. - * @return This builder for chaining. - */ - public Builder setIpAddresses( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpAddressesIsMutable(); - ipAddresses_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-     * IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The ipAddresses to add. - * @return This builder for chaining. - */ - public Builder addIpAddresses( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpAddressesIsMutable(); - ipAddresses_.add(value); - onChanged(); - return this; - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-     * IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param values The ipAddresses to add. - * @return This builder for chaining. - */ - public Builder addAllIpAddresses( - java.lang.Iterable values) { - ensureIpAddressesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ipAddresses_); - onChanged(); - return this; - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-     * IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearIpAddresses() { - ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-     * IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes of the ipAddresses to add. - * @return This builder for chaining. - */ - public Builder addIpAddressesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureIpAddressesIsMutable(); - ipAddresses_.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.filestore.v1.NetworkConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.NetworkConfig) - private static final com.google.cloud.filestore.v1.NetworkConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.NetworkConfig(); - } - - public static com.google.cloud.filestore.v1.NetworkConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NetworkConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkConfig(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.filestore.v1.NetworkConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NetworkConfigOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NetworkConfigOrBuilder.java deleted file mode 100644 index c1fe39704bdc..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NetworkConfigOrBuilder.java +++ /dev/null @@ -1,172 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface NetworkConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.NetworkConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the Google Compute Engine
-   * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-   * instance is connected.
-   * 
- * - * string network = 1; - * @return The network. - */ - java.lang.String getNetwork(); - /** - *
-   * The name of the Google Compute Engine
-   * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-   * instance is connected.
-   * 
- * - * string network = 1; - * @return The bytes for network. - */ - com.google.protobuf.ByteString - getNetworkBytes(); - - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the modes. - */ - java.util.List getModesList(); - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return The count of modes. - */ - int getModesCount(); - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the element to return. - * @return The modes at the given index. - */ - com.google.cloud.filestore.v1.NetworkConfig.AddressMode getModes(int index); - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the enum numeric values on the wire for modes. - */ - java.util.List - getModesValueList(); - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of modes at the given index. - */ - int getModesValue(int index); - - /** - *
-   * A /29 CIDR block in one of the
-   * [internal IP address
-   * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-   * that identifies the range of IP addresses reserved for this instance. For
-   * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap
-   * with either existing subnets or assigned IP address ranges for other Cloud
-   * Filestore instances in the selected VPC network.
-   * 
- * - * string reserved_ip_range = 4; - * @return The reservedIpRange. - */ - java.lang.String getReservedIpRange(); - /** - *
-   * A /29 CIDR block in one of the
-   * [internal IP address
-   * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-   * that identifies the range of IP addresses reserved for this instance. For
-   * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap
-   * with either existing subnets or assigned IP address ranges for other Cloud
-   * Filestore instances in the selected VPC network.
-   * 
- * - * string reserved_ip_range = 4; - * @return The bytes for reservedIpRange. - */ - com.google.protobuf.ByteString - getReservedIpRangeBytes(); - - /** - *
-   * Output only. IPv4 addresses in the format
-   * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-   * IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return A list containing the ipAddresses. - */ - java.util.List - getIpAddressesList(); - /** - *
-   * Output only. IPv4 addresses in the format
-   * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-   * IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The count of ipAddresses. - */ - int getIpAddressesCount(); - /** - *
-   * Output only. IPv4 addresses in the format
-   * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-   * IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the element to return. - * @return The ipAddresses at the given index. - */ - java.lang.String getIpAddresses(int index); - /** - *
-   * Output only. IPv4 addresses in the format
-   * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or
-   * IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. - */ - com.google.protobuf.ByteString - getIpAddressesBytes(int index); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NfsExportOptions.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NfsExportOptions.java deleted file mode 100644 index e57ce861be4d..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NfsExportOptions.java +++ /dev/null @@ -1,1519 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * NFS export options specifications.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.NfsExportOptions} - */ -public final class NfsExportOptions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.NfsExportOptions) - NfsExportOptionsOrBuilder { -private static final long serialVersionUID = 0L; - // Use NfsExportOptions.newBuilder() to construct. - private NfsExportOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NfsExportOptions() { - ipRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; - accessMode_ = 0; - squashMode_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NfsExportOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NfsExportOptions( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ipRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ipRanges_.add(s); - break; - } - case 16: { - int rawValue = input.readEnum(); - - accessMode_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - squashMode_ = rawValue; - break; - } - case 32: { - - anonUid_ = input.readInt64(); - break; - } - case 40: { - - anonGid_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ipRanges_ = ipRanges_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NfsExportOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NfsExportOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.NfsExportOptions.class, com.google.cloud.filestore.v1.NfsExportOptions.Builder.class); - } - - /** - *
-   * The access mode.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1.NfsExportOptions.AccessMode} - */ - public enum AccessMode - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * AccessMode not set.
-     * 
- * - * ACCESS_MODE_UNSPECIFIED = 0; - */ - ACCESS_MODE_UNSPECIFIED(0), - /** - *
-     * The client can only read the file share.
-     * 
- * - * READ_ONLY = 1; - */ - READ_ONLY(1), - /** - *
-     * The client can read and write the file share (default).
-     * 
- * - * READ_WRITE = 2; - */ - READ_WRITE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * AccessMode not set.
-     * 
- * - * ACCESS_MODE_UNSPECIFIED = 0; - */ - public static final int ACCESS_MODE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The client can only read the file share.
-     * 
- * - * READ_ONLY = 1; - */ - public static final int READ_ONLY_VALUE = 1; - /** - *
-     * The client can read and write the file share (default).
-     * 
- * - * 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 AccessMode 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 AccessMode forNumber(int value) { - switch (value) { - case 0: return ACCESS_MODE_UNSPECIFIED; - case 1: return READ_ONLY; - 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< - AccessMode> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AccessMode findValueByNumber(int number) { - return AccessMode.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.filestore.v1.NfsExportOptions.getDescriptor().getEnumTypes().get(0); - } - - private static final AccessMode[] VALUES = values(); - - public static AccessMode 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 AccessMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1.NfsExportOptions.AccessMode) - } - - /** - *
-   * The squash mode.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1.NfsExportOptions.SquashMode} - */ - public enum SquashMode - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * SquashMode not set.
-     * 
- * - * SQUASH_MODE_UNSPECIFIED = 0; - */ - SQUASH_MODE_UNSPECIFIED(0), - /** - *
-     * The Root user has root access to the file share (default).
-     * 
- * - * NO_ROOT_SQUASH = 1; - */ - NO_ROOT_SQUASH(1), - /** - *
-     * The Root user has squashed access to the anonymous uid/gid.
-     * 
- * - * ROOT_SQUASH = 2; - */ - ROOT_SQUASH(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * SquashMode not set.
-     * 
- * - * SQUASH_MODE_UNSPECIFIED = 0; - */ - public static final int SQUASH_MODE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The Root user has root access to the file share (default).
-     * 
- * - * NO_ROOT_SQUASH = 1; - */ - public static final int NO_ROOT_SQUASH_VALUE = 1; - /** - *
-     * The Root user has squashed access to the anonymous uid/gid.
-     * 
- * - * ROOT_SQUASH = 2; - */ - public static final int ROOT_SQUASH_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 SquashMode 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 SquashMode forNumber(int value) { - switch (value) { - case 0: return SQUASH_MODE_UNSPECIFIED; - case 1: return NO_ROOT_SQUASH; - case 2: return ROOT_SQUASH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SquashMode> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SquashMode findValueByNumber(int number) { - return SquashMode.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.filestore.v1.NfsExportOptions.getDescriptor().getEnumTypes().get(1); - } - - private static final SquashMode[] VALUES = values(); - - public static SquashMode 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 SquashMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1.NfsExportOptions.SquashMode) - } - - public static final int IP_RANGES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList ipRanges_; - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @return A list containing the ipRanges. - */ - public com.google.protobuf.ProtocolStringList - getIpRangesList() { - return ipRanges_; - } - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @return The count of ipRanges. - */ - public int getIpRangesCount() { - return ipRanges_.size(); - } - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the element to return. - * @return The ipRanges at the given index. - */ - public java.lang.String getIpRanges(int index) { - return ipRanges_.get(index); - } - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the value to return. - * @return The bytes of the ipRanges at the given index. - */ - public com.google.protobuf.ByteString - getIpRangesBytes(int index) { - return ipRanges_.getByteString(index); - } - - public static final int ACCESS_MODE_FIELD_NUMBER = 2; - private int accessMode_; - /** - *
-   * Either READ_ONLY, for allowing only read requests on the exported
-   * directory, or READ_WRITE, for allowing both read and write requests.
-   * The default is READ_WRITE.
-   * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @return The enum numeric value on the wire for accessMode. - */ - @java.lang.Override public int getAccessModeValue() { - return accessMode_; - } - /** - *
-   * Either READ_ONLY, for allowing only read requests on the exported
-   * directory, or READ_WRITE, for allowing both read and write requests.
-   * The default is READ_WRITE.
-   * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @return The accessMode. - */ - @java.lang.Override public com.google.cloud.filestore.v1.NfsExportOptions.AccessMode getAccessMode() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.NfsExportOptions.AccessMode result = com.google.cloud.filestore.v1.NfsExportOptions.AccessMode.valueOf(accessMode_); - return result == null ? com.google.cloud.filestore.v1.NfsExportOptions.AccessMode.UNRECOGNIZED : result; - } - - public static final int SQUASH_MODE_FIELD_NUMBER = 3; - private int squashMode_; - /** - *
-   * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-   * or ROOT_SQUASH, for not allowing root access. The default is
-   * NO_ROOT_SQUASH.
-   * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The enum numeric value on the wire for squashMode. - */ - @java.lang.Override public int getSquashModeValue() { - return squashMode_; - } - /** - *
-   * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-   * or ROOT_SQUASH, for not allowing root access. The default is
-   * NO_ROOT_SQUASH.
-   * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The squashMode. - */ - @java.lang.Override public com.google.cloud.filestore.v1.NfsExportOptions.SquashMode getSquashMode() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.NfsExportOptions.SquashMode result = com.google.cloud.filestore.v1.NfsExportOptions.SquashMode.valueOf(squashMode_); - return result == null ? com.google.cloud.filestore.v1.NfsExportOptions.SquashMode.UNRECOGNIZED : result; - } - - public static final int ANON_UID_FIELD_NUMBER = 4; - private long anonUid_; - /** - *
-   * An integer representing the anonymous user id with a default value of
-   * 65534.
-   * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-   * returned if this field is specified for other squash_mode settings.
-   * 
- * - * int64 anon_uid = 4; - * @return The anonUid. - */ - @java.lang.Override - public long getAnonUid() { - return anonUid_; - } - - public static final int ANON_GID_FIELD_NUMBER = 5; - private long anonGid_; - /** - *
-   * An integer representing the anonymous group id with a default value of
-   * 65534.
-   * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-   * returned if this field is specified for other squash_mode settings.
-   * 
- * - * int64 anon_gid = 5; - * @return The anonGid. - */ - @java.lang.Override - public long getAnonGid() { - return anonGid_; - } - - 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 < ipRanges_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipRanges_.getRaw(i)); - } - if (accessMode_ != com.google.cloud.filestore.v1.NfsExportOptions.AccessMode.ACCESS_MODE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, accessMode_); - } - if (squashMode_ != com.google.cloud.filestore.v1.NfsExportOptions.SquashMode.SQUASH_MODE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, squashMode_); - } - if (anonUid_ != 0L) { - output.writeInt64(4, anonUid_); - } - if (anonGid_ != 0L) { - output.writeInt64(5, anonGid_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < ipRanges_.size(); i++) { - dataSize += computeStringSizeNoTag(ipRanges_.getRaw(i)); - } - size += dataSize; - size += 1 * getIpRangesList().size(); - } - if (accessMode_ != com.google.cloud.filestore.v1.NfsExportOptions.AccessMode.ACCESS_MODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, accessMode_); - } - if (squashMode_ != com.google.cloud.filestore.v1.NfsExportOptions.SquashMode.SQUASH_MODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, squashMode_); - } - if (anonUid_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, anonUid_); - } - if (anonGid_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, anonGid_); - } - 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.filestore.v1.NfsExportOptions)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.NfsExportOptions other = (com.google.cloud.filestore.v1.NfsExportOptions) obj; - - if (!getIpRangesList() - .equals(other.getIpRangesList())) return false; - if (accessMode_ != other.accessMode_) return false; - if (squashMode_ != other.squashMode_) return false; - if (getAnonUid() - != other.getAnonUid()) return false; - if (getAnonGid() - != other.getAnonGid()) 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 (getIpRangesCount() > 0) { - hash = (37 * hash) + IP_RANGES_FIELD_NUMBER; - hash = (53 * hash) + getIpRangesList().hashCode(); - } - hash = (37 * hash) + ACCESS_MODE_FIELD_NUMBER; - hash = (53 * hash) + accessMode_; - hash = (37 * hash) + SQUASH_MODE_FIELD_NUMBER; - hash = (53 * hash) + squashMode_; - hash = (37 * hash) + ANON_UID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAnonUid()); - hash = (37 * hash) + ANON_GID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAnonGid()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.NfsExportOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.NfsExportOptions 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.filestore.v1.NfsExportOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.NfsExportOptions 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.filestore.v1.NfsExportOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.NfsExportOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.NfsExportOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.NfsExportOptions 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.filestore.v1.NfsExportOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.NfsExportOptions 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.filestore.v1.NfsExportOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.NfsExportOptions 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.filestore.v1.NfsExportOptions 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; - } - /** - *
-   * NFS export options specifications.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.NfsExportOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.NfsExportOptions) - com.google.cloud.filestore.v1.NfsExportOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NfsExportOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NfsExportOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.NfsExportOptions.class, com.google.cloud.filestore.v1.NfsExportOptions.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.NfsExportOptions.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(); - ipRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - accessMode_ = 0; - - squashMode_ = 0; - - anonUid_ = 0L; - - anonGid_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_NfsExportOptions_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.NfsExportOptions getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.NfsExportOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.NfsExportOptions build() { - com.google.cloud.filestore.v1.NfsExportOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.NfsExportOptions buildPartial() { - com.google.cloud.filestore.v1.NfsExportOptions result = new com.google.cloud.filestore.v1.NfsExportOptions(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - ipRanges_ = ipRanges_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.ipRanges_ = ipRanges_; - result.accessMode_ = accessMode_; - result.squashMode_ = squashMode_; - result.anonUid_ = anonUid_; - result.anonGid_ = anonGid_; - 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.filestore.v1.NfsExportOptions) { - return mergeFrom((com.google.cloud.filestore.v1.NfsExportOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.NfsExportOptions other) { - if (other == com.google.cloud.filestore.v1.NfsExportOptions.getDefaultInstance()) return this; - if (!other.ipRanges_.isEmpty()) { - if (ipRanges_.isEmpty()) { - ipRanges_ = other.ipRanges_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIpRangesIsMutable(); - ipRanges_.addAll(other.ipRanges_); - } - onChanged(); - } - if (other.accessMode_ != 0) { - setAccessModeValue(other.getAccessModeValue()); - } - if (other.squashMode_ != 0) { - setSquashModeValue(other.getSquashModeValue()); - } - if (other.getAnonUid() != 0L) { - setAnonUid(other.getAnonUid()); - } - if (other.getAnonGid() != 0L) { - setAnonGid(other.getAnonGid()); - } - 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.filestore.v1.NfsExportOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.NfsExportOptions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList ipRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureIpRangesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - ipRanges_ = new com.google.protobuf.LazyStringArrayList(ipRanges_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @return A list containing the ipRanges. - */ - public com.google.protobuf.ProtocolStringList - getIpRangesList() { - return ipRanges_.getUnmodifiableView(); - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @return The count of ipRanges. - */ - public int getIpRangesCount() { - return ipRanges_.size(); - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the element to return. - * @return The ipRanges at the given index. - */ - public java.lang.String getIpRanges(int index) { - return ipRanges_.get(index); - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the value to return. - * @return The bytes of the ipRanges at the given index. - */ - public com.google.protobuf.ByteString - getIpRangesBytes(int index) { - return ipRanges_.getByteString(index); - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param index The index to set the value at. - * @param value The ipRanges to set. - * @return This builder for chaining. - */ - public Builder setIpRanges( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpRangesIsMutable(); - ipRanges_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param value The ipRanges to add. - * @return This builder for chaining. - */ - public Builder addIpRanges( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpRangesIsMutable(); - ipRanges_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param values The ipRanges to add. - * @return This builder for chaining. - */ - public Builder addAllIpRanges( - java.lang.Iterable values) { - ensureIpRangesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ipRanges_); - onChanged(); - return this; - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @return This builder for chaining. - */ - public Builder clearIpRanges() { - ipRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param value The bytes of the ipRanges to add. - * @return This builder for chaining. - */ - public Builder addIpRangesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureIpRangesIsMutable(); - ipRanges_.add(value); - onChanged(); - return this; - } - - private int accessMode_ = 0; - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @return The enum numeric value on the wire for accessMode. - */ - @java.lang.Override public int getAccessModeValue() { - return accessMode_; - } - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @param value The enum numeric value on the wire for accessMode to set. - * @return This builder for chaining. - */ - public Builder setAccessModeValue(int value) { - - accessMode_ = value; - onChanged(); - return this; - } - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @return The accessMode. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.NfsExportOptions.AccessMode getAccessMode() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.NfsExportOptions.AccessMode result = com.google.cloud.filestore.v1.NfsExportOptions.AccessMode.valueOf(accessMode_); - return result == null ? com.google.cloud.filestore.v1.NfsExportOptions.AccessMode.UNRECOGNIZED : result; - } - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @param value The accessMode to set. - * @return This builder for chaining. - */ - public Builder setAccessMode(com.google.cloud.filestore.v1.NfsExportOptions.AccessMode value) { - if (value == null) { - throw new NullPointerException(); - } - - accessMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @return This builder for chaining. - */ - public Builder clearAccessMode() { - - accessMode_ = 0; - onChanged(); - return this; - } - - private int squashMode_ = 0; - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The enum numeric value on the wire for squashMode. - */ - @java.lang.Override public int getSquashModeValue() { - return squashMode_; - } - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @param value The enum numeric value on the wire for squashMode to set. - * @return This builder for chaining. - */ - public Builder setSquashModeValue(int value) { - - squashMode_ = value; - onChanged(); - return this; - } - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The squashMode. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.NfsExportOptions.SquashMode getSquashMode() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1.NfsExportOptions.SquashMode result = com.google.cloud.filestore.v1.NfsExportOptions.SquashMode.valueOf(squashMode_); - return result == null ? com.google.cloud.filestore.v1.NfsExportOptions.SquashMode.UNRECOGNIZED : result; - } - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @param value The squashMode to set. - * @return This builder for chaining. - */ - public Builder setSquashMode(com.google.cloud.filestore.v1.NfsExportOptions.SquashMode value) { - if (value == null) { - throw new NullPointerException(); - } - - squashMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @return This builder for chaining. - */ - public Builder clearSquashMode() { - - squashMode_ = 0; - onChanged(); - return this; - } - - private long anonUid_ ; - /** - *
-     * An integer representing the anonymous user id with a default value of
-     * 65534.
-     * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_uid = 4; - * @return The anonUid. - */ - @java.lang.Override - public long getAnonUid() { - return anonUid_; - } - /** - *
-     * An integer representing the anonymous user id with a default value of
-     * 65534.
-     * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_uid = 4; - * @param value The anonUid to set. - * @return This builder for chaining. - */ - public Builder setAnonUid(long value) { - - anonUid_ = value; - onChanged(); - return this; - } - /** - *
-     * An integer representing the anonymous user id with a default value of
-     * 65534.
-     * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_uid = 4; - * @return This builder for chaining. - */ - public Builder clearAnonUid() { - - anonUid_ = 0L; - onChanged(); - return this; - } - - private long anonGid_ ; - /** - *
-     * An integer representing the anonymous group id with a default value of
-     * 65534.
-     * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_gid = 5; - * @return The anonGid. - */ - @java.lang.Override - public long getAnonGid() { - return anonGid_; - } - /** - *
-     * An integer representing the anonymous group id with a default value of
-     * 65534.
-     * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_gid = 5; - * @param value The anonGid to set. - * @return This builder for chaining. - */ - public Builder setAnonGid(long value) { - - anonGid_ = value; - onChanged(); - return this; - } - /** - *
-     * An integer representing the anonymous group id with a default value of
-     * 65534.
-     * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_gid = 5; - * @return This builder for chaining. - */ - public Builder clearAnonGid() { - - anonGid_ = 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.filestore.v1.NfsExportOptions) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.NfsExportOptions) - private static final com.google.cloud.filestore.v1.NfsExportOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.NfsExportOptions(); - } - - public static com.google.cloud.filestore.v1.NfsExportOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NfsExportOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NfsExportOptions(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.filestore.v1.NfsExportOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NfsExportOptionsOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NfsExportOptionsOrBuilder.java deleted file mode 100644 index 797d53a2f722..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/NfsExportOptionsOrBuilder.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface NfsExportOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.NfsExportOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @return A list containing the ipRanges. - */ - java.util.List - getIpRangesList(); - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @return The count of ipRanges. - */ - int getIpRangesCount(); - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the element to return. - * @return The ipRanges at the given index. - */ - java.lang.String getIpRanges(int index); - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the value to return. - * @return The bytes of the ipRanges at the given index. - */ - com.google.protobuf.ByteString - getIpRangesBytes(int index); - - /** - *
-   * Either READ_ONLY, for allowing only read requests on the exported
-   * directory, or READ_WRITE, for allowing both read and write requests.
-   * The default is READ_WRITE.
-   * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @return The enum numeric value on the wire for accessMode. - */ - int getAccessModeValue(); - /** - *
-   * Either READ_ONLY, for allowing only read requests on the exported
-   * directory, or READ_WRITE, for allowing both read and write requests.
-   * The default is READ_WRITE.
-   * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @return The accessMode. - */ - com.google.cloud.filestore.v1.NfsExportOptions.AccessMode getAccessMode(); - - /** - *
-   * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-   * or ROOT_SQUASH, for not allowing root access. The default is
-   * NO_ROOT_SQUASH.
-   * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The enum numeric value on the wire for squashMode. - */ - int getSquashModeValue(); - /** - *
-   * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-   * or ROOT_SQUASH, for not allowing root access. The default is
-   * NO_ROOT_SQUASH.
-   * 
- * - * .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The squashMode. - */ - com.google.cloud.filestore.v1.NfsExportOptions.SquashMode getSquashMode(); - - /** - *
-   * An integer representing the anonymous user id with a default value of
-   * 65534.
-   * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-   * returned if this field is specified for other squash_mode settings.
-   * 
- * - * int64 anon_uid = 4; - * @return The anonUid. - */ - long getAnonUid(); - - /** - *
-   * An integer representing the anonymous group id with a default value of
-   * 65534.
-   * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-   * returned if this field is specified for other squash_mode settings.
-   * 
- * - * int64 anon_gid = 5; - * @return The anonGid. - */ - long getAnonGid(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/RestoreInstanceRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/RestoreInstanceRequest.java deleted file mode 100644 index c8995622aec9..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/RestoreInstanceRequest.java +++ /dev/null @@ -1,1071 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * RestoreInstanceRequest restores an existing instances's file share from a
- * backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.RestoreInstanceRequest} - */ -public final class RestoreInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.RestoreInstanceRequest) - RestoreInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RestoreInstanceRequest.newBuilder() to construct. - private RestoreInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RestoreInstanceRequest() { - name_ = ""; - fileShare_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RestoreInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RestoreInstanceRequest( - 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(); - - fileShare_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - sourceCase_ = 3; - source_ = 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.RestoreInstanceRequest.class, com.google.cloud.filestore.v1.RestoreInstanceRequest.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SOURCE_BACKUP(3), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 3: return SOURCE_BACKUP; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name of the instance, in the format
-   * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * 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 resource name of the instance, in the format
-   * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * 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; - } - } - - public static final int FILE_SHARE_FIELD_NUMBER = 2; - private volatile java.lang.Object fileShare_; - /** - *
-   * Required. Name of the file share in the Cloud Filestore instance that the
-   * backup is being restored to.
-   * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The fileShare. - */ - @java.lang.Override - public java.lang.String getFileShare() { - java.lang.Object ref = fileShare_; - 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(); - fileShare_ = s; - return s; - } - } - /** - *
-   * Required. Name of the file share in the Cloud Filestore instance that the
-   * backup is being restored to.
-   * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for fileShare. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFileShareBytes() { - java.lang.Object ref = fileShare_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fileShare_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_BACKUP_FIELD_NUMBER = 3; - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - public boolean hasSourceBackup() { - return sourceCase_ == 3; - } - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - public java.lang.String getSourceBackup() { - java.lang.Object ref = ""; - if (sourceCase_ == 3) { - ref = source_; - } - 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(); - if (sourceCase_ == 3) { - source_ = s; - } - return s; - } - } - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - public com.google.protobuf.ByteString - getSourceBackupBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 3) { - ref = source_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 3) { - source_ = 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(fileShare_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fileShare_); - } - if (sourceCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); - } - 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(fileShare_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fileShare_); - } - if (sourceCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); - } - 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.filestore.v1.RestoreInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.RestoreInstanceRequest other = (com.google.cloud.filestore.v1.RestoreInstanceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getFileShare() - .equals(other.getFileShare())) return false; - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 3: - if (!getSourceBackup() - .equals(other.getSourceBackup())) return false; - break; - case 0: - default: - } - 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) + FILE_SHARE_FIELD_NUMBER; - hash = (53 * hash) + getFileShare().hashCode(); - switch (sourceCase_) { - case 3: - hash = (37 * hash) + SOURCE_BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getSourceBackup().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.RestoreInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.RestoreInstanceRequest 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.filestore.v1.RestoreInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.RestoreInstanceRequest 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.filestore.v1.RestoreInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.RestoreInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.RestoreInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.RestoreInstanceRequest 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.filestore.v1.RestoreInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.RestoreInstanceRequest 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.filestore.v1.RestoreInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.RestoreInstanceRequest 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.filestore.v1.RestoreInstanceRequest 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; - } - /** - *
-   * RestoreInstanceRequest restores an existing instances's file share from a
-   * backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.RestoreInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.RestoreInstanceRequest) - com.google.cloud.filestore.v1.RestoreInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.RestoreInstanceRequest.class, com.google.cloud.filestore.v1.RestoreInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.RestoreInstanceRequest.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_ = ""; - - fileShare_ = ""; - - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_RestoreInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.RestoreInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.RestoreInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.RestoreInstanceRequest build() { - com.google.cloud.filestore.v1.RestoreInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.RestoreInstanceRequest buildPartial() { - com.google.cloud.filestore.v1.RestoreInstanceRequest result = new com.google.cloud.filestore.v1.RestoreInstanceRequest(this); - result.name_ = name_; - result.fileShare_ = fileShare_; - if (sourceCase_ == 3) { - result.source_ = source_; - } - result.sourceCase_ = sourceCase_; - 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.filestore.v1.RestoreInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1.RestoreInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.RestoreInstanceRequest other) { - if (other == com.google.cloud.filestore.v1.RestoreInstanceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getFileShare().isEmpty()) { - fileShare_ = other.fileShare_; - onChanged(); - } - switch (other.getSourceCase()) { - case SOURCE_BACKUP: { - sourceCase_ = 3; - source_ = other.source_; - onChanged(); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - 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.filestore.v1.RestoreInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.RestoreInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name of the instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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; - } - - private java.lang.Object fileShare_ = ""; - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the
-     * backup is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The fileShare. - */ - public java.lang.String getFileShare() { - java.lang.Object ref = fileShare_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fileShare_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the
-     * backup is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for fileShare. - */ - public com.google.protobuf.ByteString - getFileShareBytes() { - java.lang.Object ref = fileShare_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fileShare_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the
-     * backup is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The fileShare to set. - * @return This builder for chaining. - */ - public Builder setFileShare( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fileShare_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the
-     * backup is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearFileShare() { - - fileShare_ = getDefaultInstance().getFileShare(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the
-     * backup is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for fileShare to set. - * @return This builder for chaining. - */ - public Builder setFileShareBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fileShare_ = value; - onChanged(); - return this; - } - - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - @java.lang.Override - public boolean hasSourceBackup() { - return sourceCase_ == 3; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - @java.lang.Override - public java.lang.String getSourceBackup() { - java.lang.Object ref = ""; - if (sourceCase_ == 3) { - ref = source_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (sourceCase_ == 3) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceBackupBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 3) { - ref = source_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 3) { - source_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @param value The sourceBackup to set. - * @return This builder for chaining. - */ - public Builder setSourceBackup( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceCase_ = 3; - source_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearSourceBackup() { - if (sourceCase_ == 3) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @param value The bytes for sourceBackup to set. - * @return This builder for chaining. - */ - public Builder setSourceBackupBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceCase_ = 3; - source_ = 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.filestore.v1.RestoreInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.RestoreInstanceRequest) - private static final com.google.cloud.filestore.v1.RestoreInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.RestoreInstanceRequest(); - } - - public static com.google.cloud.filestore.v1.RestoreInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RestoreInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RestoreInstanceRequest(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.filestore.v1.RestoreInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/RestoreInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/RestoreInstanceRequestOrBuilder.java deleted file mode 100644 index 0034c29a647a..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/RestoreInstanceRequestOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface RestoreInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.RestoreInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name of the instance, in the format
-   * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name of the instance, in the format
-   * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. Name of the file share in the Cloud Filestore instance that the
-   * backup is being restored to.
-   * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The fileShare. - */ - java.lang.String getFileShare(); - /** - *
-   * Required. Name of the file share in the Cloud Filestore instance that the
-   * backup is being restored to.
-   * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for fileShare. - */ - com.google.protobuf.ByteString - getFileShareBytes(); - - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - boolean hasSourceBackup(); - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - java.lang.String getSourceBackup(); - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 3 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - com.google.protobuf.ByteString - getSourceBackupBytes(); - - public com.google.cloud.filestore.v1.RestoreInstanceRequest.SourceCase getSourceCase(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateBackupRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateBackupRequest.java deleted file mode 100644 index bfcca1e41842..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateBackupRequest.java +++ /dev/null @@ -1,913 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * UpdateBackupRequest updates description and/or labels for a backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.UpdateBackupRequest} - */ -public final class UpdateBackupRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.UpdateBackupRequest) - UpdateBackupRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateBackupRequest.newBuilder() to construct. - private UpdateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateBackupRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateBackupRequest( - 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.filestore.v1.Backup.Builder subBuilder = null; - if (backup_ != null) { - subBuilder = backup_.toBuilder(); - } - backup_ = input.readMessage(com.google.cloud.filestore.v1.Backup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backup_); - backup_ = 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.UpdateBackupRequest.class, com.google.cloud.filestore.v1.UpdateBackupRequest.Builder.class); - } - - public static final int BACKUP_FIELD_NUMBER = 1; - private com.google.cloud.filestore.v1.Backup backup_; - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - @java.lang.Override - public boolean hasBackup() { - return backup_ != null; - } - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Backup getBackup() { - return backup_ == null ? com.google.cloud.filestore.v1.Backup.getDefaultInstance() : backup_; - } - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.BackupOrBuilder getBackupOrBuilder() { - return getBackup(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in
-   * this field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in
-   * this field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in
-   * this field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @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 (backup_ != null) { - output.writeMessage(1, getBackup()); - } - 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 (backup_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBackup()); - } - 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.filestore.v1.UpdateBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.UpdateBackupRequest other = (com.google.cloud.filestore.v1.UpdateBackupRequest) obj; - - if (hasBackup() != other.hasBackup()) return false; - if (hasBackup()) { - if (!getBackup() - .equals(other.getBackup())) 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 (hasBackup()) { - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().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.filestore.v1.UpdateBackupRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.UpdateBackupRequest 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.filestore.v1.UpdateBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.UpdateBackupRequest 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.filestore.v1.UpdateBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.UpdateBackupRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.UpdateBackupRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.UpdateBackupRequest 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.filestore.v1.UpdateBackupRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.UpdateBackupRequest 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.filestore.v1.UpdateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.UpdateBackupRequest 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.filestore.v1.UpdateBackupRequest 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; - } - /** - *
-   * UpdateBackupRequest updates description and/or labels for a backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.UpdateBackupRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.UpdateBackupRequest) - com.google.cloud.filestore.v1.UpdateBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.UpdateBackupRequest.class, com.google.cloud.filestore.v1.UpdateBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.UpdateBackupRequest.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 (backupBuilder_ == null) { - backup_ = null; - } else { - backup_ = null; - backupBuilder_ = 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.UpdateBackupRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.UpdateBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.UpdateBackupRequest build() { - com.google.cloud.filestore.v1.UpdateBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.UpdateBackupRequest buildPartial() { - com.google.cloud.filestore.v1.UpdateBackupRequest result = new com.google.cloud.filestore.v1.UpdateBackupRequest(this); - if (backupBuilder_ == null) { - result.backup_ = backup_; - } else { - result.backup_ = backupBuilder_.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.filestore.v1.UpdateBackupRequest) { - return mergeFrom((com.google.cloud.filestore.v1.UpdateBackupRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.UpdateBackupRequest other) { - if (other == com.google.cloud.filestore.v1.UpdateBackupRequest.getDefaultInstance()) return this; - if (other.hasBackup()) { - mergeBackup(other.getBackup()); - } - 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.filestore.v1.UpdateBackupRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.UpdateBackupRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.filestore.v1.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Backup, com.google.cloud.filestore.v1.Backup.Builder, com.google.cloud.filestore.v1.BackupOrBuilder> backupBuilder_; - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - public boolean hasBackup() { - return backupBuilder_ != null || backup_ != null; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - public com.google.cloud.filestore.v1.Backup getBackup() { - if (backupBuilder_ == null) { - return backup_ == null ? com.google.cloud.filestore.v1.Backup.getDefaultInstance() : backup_; - } else { - return backupBuilder_.getMessage(); - } - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBackup(com.google.cloud.filestore.v1.Backup value) { - if (backupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - onChanged(); - } else { - backupBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBackup( - com.google.cloud.filestore.v1.Backup.Builder builderForValue) { - if (backupBuilder_ == null) { - backup_ = builderForValue.build(); - onChanged(); - } else { - backupBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeBackup(com.google.cloud.filestore.v1.Backup value) { - if (backupBuilder_ == null) { - if (backup_ != null) { - backup_ = - com.google.cloud.filestore.v1.Backup.newBuilder(backup_).mergeFrom(value).buildPartial(); - } else { - backup_ = value; - } - onChanged(); - } else { - backupBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearBackup() { - if (backupBuilder_ == null) { - backup_ = null; - onChanged(); - } else { - backup_ = null; - backupBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1.Backup.Builder getBackupBuilder() { - - onChanged(); - return getBackupFieldBuilder().getBuilder(); - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1.BackupOrBuilder getBackupOrBuilder() { - if (backupBuilder_ != null) { - return backupBuilder_.getMessageOrBuilder(); - } else { - return backup_ == null ? - com.google.cloud.filestore.v1.Backup.getDefaultInstance() : backup_; - } - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-     * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Backup, com.google.cloud.filestore.v1.Backup.Builder, com.google.cloud.filestore.v1.BackupOrBuilder> - getBackupFieldBuilder() { - if (backupBuilder_ == null) { - backupBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Backup, com.google.cloud.filestore.v1.Backup.Builder, com.google.cloud.filestore.v1.BackupOrBuilder>( - getBackup(), - getParentForChildren(), - isClean()); - backup_ = null; - } - return backupBuilder_; - } - - 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_; - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in
-     * this field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in
-     * this field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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(); - } - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in
-     * this field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - 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; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in
-     * this field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in
-     * this field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - 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; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in
-     * this field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in
-     * this field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in
-     * this field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in
-     * this field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - 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.filestore.v1.UpdateBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.UpdateBackupRequest) - private static final com.google.cloud.filestore.v1.UpdateBackupRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.UpdateBackupRequest(); - } - - public static com.google.cloud.filestore.v1.UpdateBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateBackupRequest(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.filestore.v1.UpdateBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateBackupRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateBackupRequestOrBuilder.java deleted file mode 100644 index ce5d045f5520..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateBackupRequestOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface UpdateBackupRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.UpdateBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - boolean hasBackup(); - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - com.google.cloud.filestore.v1.Backup getBackup(); - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1.Backup]
-   * 
- * - * .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.filestore.v1.BackupOrBuilder getBackupOrBuilder(); - - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in
-   * this field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in
-   * this field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in
-   * this field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateInstanceRequest.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateInstanceRequest.java deleted file mode 100644 index 515b01512635..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateInstanceRequest.java +++ /dev/null @@ -1,961 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -/** - *
- * UpdateInstanceRequest updates the settings of an instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1.UpdateInstanceRequest} - */ -public final class UpdateInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1.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.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; - } - case 18: { - com.google.cloud.filestore.v1.Instance.Builder subBuilder = null; - if (instance_ != null) { - subBuilder = instance_.toBuilder(); - } - instance_ = input.readMessage(com.google.cloud.filestore.v1.Instance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instance_); - instance_ = 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.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.UpdateInstanceRequest.class, com.google.cloud.filestore.v1.UpdateInstanceRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - public static final int INSTANCE_FIELD_NUMBER = 2; - private com.google.cloud.filestore.v1.Instance instance_; - /** - *
-   * Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - * @return Whether the instance field is set. - */ - @java.lang.Override - public boolean hasInstance() { - return instance_ != null; - } - /** - *
-   * Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - * @return The instance. - */ - @java.lang.Override - public com.google.cloud.filestore.v1.Instance getInstance() { - return instance_ == null ? com.google.cloud.filestore.v1.Instance.getDefaultInstance() : instance_; - } - /** - *
-   * Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - */ - @java.lang.Override - public com.google.cloud.filestore.v1.InstanceOrBuilder getInstanceOrBuilder() { - return getInstance(); - } - - 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 (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (instance_ != null) { - output.writeMessage(2, getInstance()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getUpdateMask()); - } - if (instance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInstance()); - } - 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.filestore.v1.UpdateInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1.UpdateInstanceRequest other = (com.google.cloud.filestore.v1.UpdateInstanceRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (hasInstance() != other.hasInstance()) return false; - if (hasInstance()) { - if (!getInstance() - .equals(other.getInstance())) 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 (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasInstance()) { - hash = (37 * hash) + INSTANCE_FIELD_NUMBER; - hash = (53 * hash) + getInstance().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1.UpdateInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.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.filestore.v1.UpdateInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.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.filestore.v1.UpdateInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1.UpdateInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1.UpdateInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.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.filestore.v1.UpdateInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.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.filestore.v1.UpdateInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1.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.filestore.v1.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; - } - /** - *
-   * UpdateInstanceRequest updates the settings of an instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1.UpdateInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1.UpdateInstanceRequest) - com.google.cloud.filestore.v1.UpdateInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1.UpdateInstanceRequest.class, com.google.cloud.filestore.v1.UpdateInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1.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 (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - if (instanceBuilder_ == null) { - instance_ = null; - } else { - instance_ = null; - instanceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1_UpdateInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.UpdateInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1.UpdateInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1.UpdateInstanceRequest build() { - com.google.cloud.filestore.v1.UpdateInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1.UpdateInstanceRequest buildPartial() { - com.google.cloud.filestore.v1.UpdateInstanceRequest result = new com.google.cloud.filestore.v1.UpdateInstanceRequest(this); - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - if (instanceBuilder_ == null) { - result.instance_ = instance_; - } else { - result.instance_ = instanceBuilder_.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.filestore.v1.UpdateInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1.UpdateInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1.UpdateInstanceRequest other) { - if (other == com.google.cloud.filestore.v1.UpdateInstanceRequest.getDefaultInstance()) return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasInstance()) { - mergeInstance(other.getInstance()); - } - 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.filestore.v1.UpdateInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1.UpdateInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - 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_; - /** - *
-     * Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1; - * @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(); - } - } - /** - *
-     * Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1; - */ - 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; - } - /** - *
-     * Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1; - */ - 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; - } - /** - *
-     * Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1; - */ - 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_; - } - - private com.google.cloud.filestore.v1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Instance, com.google.cloud.filestore.v1.Instance.Builder, com.google.cloud.filestore.v1.InstanceOrBuilder> instanceBuilder_; - /** - *
-     * Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - * @return Whether the instance field is set. - */ - public boolean hasInstance() { - return instanceBuilder_ != null || instance_ != null; - } - /** - *
-     * Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - * @return The instance. - */ - public com.google.cloud.filestore.v1.Instance getInstance() { - if (instanceBuilder_ == null) { - return instance_ == null ? com.google.cloud.filestore.v1.Instance.getDefaultInstance() : instance_; - } else { - return instanceBuilder_.getMessage(); - } - } - /** - *
-     * Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - */ - public Builder setInstance(com.google.cloud.filestore.v1.Instance value) { - if (instanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instance_ = value; - onChanged(); - } else { - instanceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - */ - public Builder setInstance( - com.google.cloud.filestore.v1.Instance.Builder builderForValue) { - if (instanceBuilder_ == null) { - instance_ = builderForValue.build(); - onChanged(); - } else { - instanceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - */ - public Builder mergeInstance(com.google.cloud.filestore.v1.Instance value) { - if (instanceBuilder_ == null) { - if (instance_ != null) { - instance_ = - com.google.cloud.filestore.v1.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); - } else { - instance_ = value; - } - onChanged(); - } else { - instanceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - */ - public Builder clearInstance() { - if (instanceBuilder_ == null) { - instance_ = null; - onChanged(); - } else { - instance_ = null; - instanceBuilder_ = null; - } - - return this; - } - /** - *
-     * Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - */ - public com.google.cloud.filestore.v1.Instance.Builder getInstanceBuilder() { - - onChanged(); - return getInstanceFieldBuilder().getBuilder(); - } - /** - *
-     * Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - */ - public com.google.cloud.filestore.v1.InstanceOrBuilder getInstanceOrBuilder() { - if (instanceBuilder_ != null) { - return instanceBuilder_.getMessageOrBuilder(); - } else { - return instance_ == null ? - com.google.cloud.filestore.v1.Instance.getDefaultInstance() : instance_; - } - } - /** - *
-     * Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Instance, com.google.cloud.filestore.v1.Instance.Builder, com.google.cloud.filestore.v1.InstanceOrBuilder> - getInstanceFieldBuilder() { - if (instanceBuilder_ == null) { - instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1.Instance, com.google.cloud.filestore.v1.Instance.Builder, com.google.cloud.filestore.v1.InstanceOrBuilder>( - getInstance(), - getParentForChildren(), - isClean()); - instance_ = null; - } - return instanceBuilder_; - } - @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.filestore.v1.UpdateInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1.UpdateInstanceRequest) - private static final com.google.cloud.filestore.v1.UpdateInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1.UpdateInstanceRequest(); - } - - public static com.google.cloud.filestore.v1.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.filestore.v1.UpdateInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateInstanceRequestOrBuilder.java deleted file mode 100644 index 60ce5e62f599..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/java/com/google/cloud/filestore/v1/UpdateInstanceRequestOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1; - -public interface UpdateInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1.UpdateInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - *
-   * Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - * @return Whether the instance field is set. - */ - boolean hasInstance(); - /** - *
-   * Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - * @return The instance. - */ - com.google.cloud.filestore.v1.Instance getInstance(); - /** - *
-   * Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1.Instance instance = 2; - */ - com.google.cloud.filestore.v1.InstanceOrBuilder getInstanceOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/proto/google/cloud/filestore/v1/cloud_filestore_service.proto b/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/proto/google/cloud/filestore/v1/cloud_filestore_service.proto deleted file mode 100644 index 676fa0b2fc53..000000000000 --- a/owl-bot-staging/java-filestore/v1/proto-google-cloud-filestore-v1/src/main/proto/google/cloud/filestore/v1/cloud_filestore_service.proto +++ /dev/null @@ -1,718 +0,0 @@ -// Copyright 2021 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.filestore.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/common/operation_metadata.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option csharp_namespace = "Google.Cloud.Filestore.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/filestore/v1;filestore"; -option java_multiple_files = true; -option java_outer_classname = "CloudFilestoreServiceProto"; -option java_package = "com.google.cloud.filestore.v1"; -option php_namespace = "Google\\Cloud\\Filestore\\V1"; - -// Configures and manages Cloud Filestore resources. -// -// Cloud Filestore Manager v1. -// -// The `file.googleapis.com` service implements the Cloud Filestore API and -// defines the following resource model for managing instances: -// * The service works with a collection of cloud projects, named: `/projects/*` -// * Each project has a collection of available locations, named: `/locations/*` -// * Each location has a collection of instances and backups, named: -// `/instances/*` and `/backups/*` respectively. -// * As such, Cloud Filestore instances are resources of the form: -// `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` -// and backups are resources of the form: -// `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` -// -// Note that location_id must be a GCP `zone` for instances and but to a GCP -// `region` for backups; for example: -// * `projects/12345/locations/us-central1-c/instances/my-filestore` -// * `projects/12345/locations/us-central1/backups/my-backup` -service CloudFilestoreManager { - option (google.api.default_host) = "file.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all instances in a project for either a specified location - // or for all locations. - rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/instances" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a specific instance. - rpc GetInstance(GetInstanceRequest) returns (Instance) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/instances/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates an instance. - // When creating from a backup, the capacity of the new instance needs to be - // equal to or larger than the capacity of the backup (and also equal to or - // larger than the minimum capacity of the tier). - rpc CreateInstance(CreateInstanceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/instances" - body: "instance" - }; - option (google.api.method_signature) = "parent,instance,instance_id"; - option (google.longrunning.operation_info) = { - response_type: "Instance" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Updates the settings of a specific instance. - rpc UpdateInstance(UpdateInstanceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{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: "google.cloud.common.OperationMetadata" - }; - } - - // Restores an existing instance's file share from a backup. - // - // The capacity of the instance needs to be equal to or larger than the - // capacity of the backup (and also equal to or larger than the minimum - // capacity of the tier). - rpc RestoreInstance(RestoreInstanceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/instances/*}:restore" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Instance" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Deletes an instance. - rpc DeleteInstance(DeleteInstanceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/instances/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Lists all backups in a project for either a specified location or for all - // locations. - rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backups" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a specific backup. - rpc GetBackup(GetBackupRequest) returns (Backup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a backup. - rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backups" - body: "backup" - }; - option (google.api.method_signature) = "parent,backup,backup_id"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Deletes a backup. - rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Updates the settings of a specific backup. - rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{backup.name=projects/*/locations/*/backups/*}" - body: "backup" - }; - option (google.api.method_signature) = "backup,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } -} - -// Network configuration for the instance. -message NetworkConfig { - // Internet protocol versions supported by Cloud Filestore. - enum AddressMode { - // Internet protocol not set. - ADDRESS_MODE_UNSPECIFIED = 0; - - // Use the IPv4 internet protocol. - MODE_IPV4 = 1; - } - - // The name of the Google Compute Engine - // [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - // instance is connected. - string network = 1; - - // Internet protocol versions for which the instance has IP addresses - // assigned. For this version, only MODE_IPV4 is supported. - repeated AddressMode modes = 3; - - // A /29 CIDR block in one of the - // [internal IP address - // ranges](https://www.arin.net/reference/research/statistics/address_filters/) - // that identifies the range of IP addresses reserved for this instance. For - // example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap - // with either existing subnets or assigned IP address ranges for other Cloud - // Filestore instances in the selected VPC network. - string reserved_ip_range = 4; - - // Output only. IPv4 addresses in the format - // IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or - // IPv6 addresses in the format - // `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - repeated string ip_addresses = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// File share configuration for the instance. -message FileShareConfig { - // The name of the file share (must be 16 characters or less). - string name = 1; - - // File share capacity in gigabytes (GB). - // Cloud Filestore defines 1 GB as 1024^3 bytes. - int64 capacity_gb = 2; - - // The source that this file share has been restored from. Empty if the file - // share is created from scratch. - oneof source { - // The resource name of the backup, in the format - // `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, - // that this file share has been restored from. - string source_backup = 8 [ - (google.api.resource_reference) = { type: "file.googleapis.com/Backup" } - ]; - } - - // Nfs Export Options. - // There is a limit of 10 export options per file share. - repeated NfsExportOptions nfs_export_options = 7; -} - -// NFS export options specifications. -message NfsExportOptions { - // The access mode. - enum AccessMode { - // AccessMode not set. - ACCESS_MODE_UNSPECIFIED = 0; - - // The client can only read the file share. - READ_ONLY = 1; - - // The client can read and write the file share (default). - READ_WRITE = 2; - } - - // The squash mode. - enum SquashMode { - // SquashMode not set. - SQUASH_MODE_UNSPECIFIED = 0; - - // The Root user has root access to the file share (default). - NO_ROOT_SQUASH = 1; - - // The Root user has squashed access to the anonymous uid/gid. - ROOT_SQUASH = 2; - } - - // List of either an IPv4 addresses in the format - // `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - // `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - // file share. - // Overlapping IP ranges are not allowed, both within and across - // NfsExportOptions. An error will be returned. - // The limit is 64 IP ranges/addresses for each FileShareConfig among all - // NfsExportOptions. - repeated string ip_ranges = 1; - - // Either READ_ONLY, for allowing only read requests on the exported - // directory, or READ_WRITE, for allowing both read and write requests. - // The default is READ_WRITE. - AccessMode access_mode = 2; - - // Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - // or ROOT_SQUASH, for not allowing root access. The default is - // NO_ROOT_SQUASH. - SquashMode squash_mode = 3; - - // An integer representing the anonymous user id with a default value of - // 65534. - // Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - // returned if this field is specified for other squash_mode settings. - int64 anon_uid = 4; - - // An integer representing the anonymous group id with a default value of - // 65534. - // Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - // returned if this field is specified for other squash_mode settings. - int64 anon_gid = 5; -} - -// A Cloud Filestore instance. -message Instance { - option (google.api.resource) = { - type: "file.googleapis.com/Instance" - pattern: "projects/{project}/locations/{location}/instances/{instance}" - }; - - // The instance state. - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // The instance is being created. - CREATING = 1; - - // The instance is available for use. - READY = 2; - - // Work is being done on the instance. You can get further details from the - // `statusMessage` field of the `Instance` resource. - REPAIRING = 3; - - // The instance is shutting down. - DELETING = 4; - - // The instance is experiencing an issue and might be unusable. You can get - // further details from the `statusMessage` field of the `Instance` - // resource. - ERROR = 6; - - // The instance is restoring a backup to an existing file share and may be - // unusable during this time. - RESTORING = 7; - } - - // Available service tiers. - enum Tier { - // Not set. - TIER_UNSPECIFIED = 0; - - // STANDARD tier. - STANDARD = 1; - - // PREMIUM tier. - PREMIUM = 2; - - // BASIC instances offer a maximum capacity of 63.9 TB. - // BASIC_HDD is an alias for STANDARD Tier, offering economical - // performance backed by HDD. - BASIC_HDD = 3; - - // BASIC instances offer a maximum capacity of 63.9 TB. - // BASIC_SSD is an alias for PREMIUM Tier, and offers improved - // performance backed by SSD. - BASIC_SSD = 4; - - // HIGH_SCALE instances offer expanded capacity and performance scaling - // capabilities. - HIGH_SCALE_SSD = 5; - } - - // Output only. The resource name of the instance, in the format - // `projects/{project}/locations/{location}/instances/{instance}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The description of the instance (2048 characters or less). - string description = 2; - - // Output only. The instance state. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the instance state, if available. - string status_message = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was created. - google.protobuf.Timestamp create_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The service tier of the instance. - Tier tier = 8; - - // Resource labels to represent user provided metadata. - map labels = 9; - - // File system shares on the instance. - // For this version, only a single file share is supported. - repeated FileShareConfig file_shares = 10; - - // VPC networks to which the instance is connected. - // For this version, only a single network is supported. - repeated NetworkConfig networks = 11; - - // Server-specified ETag for the instance resource to prevent simultaneous - // updates from overwriting each other. - string etag = 12; - - // Output only. Reserved for future use. - google.protobuf.BoolValue satisfies_pzs = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// CreateInstanceRequest creates an instance. -message CreateInstanceRequest { - // Required. The instance's project and location, in the format - // `projects/{project_id}/locations/{location}`. In Cloud Filestore, - // locations map to GCP zones, for example **us-west1-b**. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The name of the instance to create. - // The name must be unique for the specified project and location. - string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. An [instance resource][google.cloud.filestore.v1.Instance] - Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// GetInstanceRequest gets the state of an instance. -message GetInstanceRequest { - // Required. The instance resource name, in the format - // `projects/{project_id}/locations/{location}/instances/{instance_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "file.googleapis.com/Instance" } - ]; -} - -// UpdateInstanceRequest updates the settings of an instance. -message UpdateInstanceRequest { - // Mask of fields to update. At least one path must be supplied in this - // field. The elements of the repeated paths field may only include these - // fields: - // - // * "description" - // * "file_shares" - // * "labels" - google.protobuf.FieldMask update_mask = 1; - - // Only fields specified in update_mask are updated. - Instance instance = 2; -} - -// RestoreInstanceRequest restores an existing instances's file share from a -// backup. -message RestoreInstanceRequest { - // Required. The resource name of the instance, in the format - // `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "file.googleapis.com/Instance" } - ]; - - // Required. Name of the file share in the Cloud Filestore instance that the - // backup is being restored to. - string file_share = 2 [(google.api.field_behavior) = REQUIRED]; - - oneof source { - // The resource name of the backup, in the format - // `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - string source_backup = 3 [ - (google.api.resource_reference) = { type: "file.googleapis.com/Backup" } - ]; - } -} - -// DeleteInstanceRequest deletes an instance. -message DeleteInstanceRequest { - // Required. The instance resource name, in the format - // `projects/{project_id}/locations/{location}/instances/{instance_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "file.googleapis.com/Instance" } - ]; -} - -// ListInstancesRequest lists instances. -message ListInstancesRequest { - // Required. The project and location for which to retrieve instance - // information, in the format `projects/{project_id}/locations/{location}`. In - // Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To - // retrieve instance information for all locations, use "-" for the - // `{location}` value. - 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 to use if there are additional - // results to retrieve for this list request. - string page_token = 3; - - // Sort results. Supported values are "name", "name desc" or "" (unsorted). - string order_by = 4; - - // List filter. - string filter = 5; -} - -// ListInstancesResponse is the result of ListInstancesRequest. -message ListInstancesResponse { - // A list of instances in the project for the specified location. - // - // If the `{location}` value in the request is "-", the response contains a - // list of instances from all locations. If any location is unreachable, the - // response will only return instances in reachable locations and the - // "unreachable" field will be populated with a list of unreachable locations. - repeated Instance instances = 1; - - // The token you can use to retrieve the next page of results. Not returned - // if there are no more results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// A Cloud Filestore backup. -message Backup { - option (google.api.resource) = { - type: "file.googleapis.com/Backup" - pattern: "projects/{project}/locations/{location}/backups/{backup}" - }; - - // The backup state. - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // Backup is being created. - CREATING = 1; - - // Backup has been taken and the operation is being finalized. At this - // point, changes to the file share will not be reflected in the backup. - FINALIZING = 2; - - // Backup is available for use. - READY = 3; - - // Backup is being deleted. - DELETING = 4; - } - - // Output only. The resource name of the backup, in the format - // `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A description of the backup with 2048 characters or less. - // Requests with longer descriptions will be rejected. - string description = 2; - - // Output only. The backup state. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the backup was created. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user provided metadata. - map labels = 5; - - // Output only. Capacity of the source file share when the backup was created. - int64 capacity_gb = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The size of the storage used by the backup. As backups share - // storage, this number is expected to change with backup creation/deletion. - int64 storage_bytes = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The resource name of the source Cloud Filestore instance, in the format - // `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - // used to create this backup. - string source_instance = 8 [ - (google.api.resource_reference) = { type: "file.googleapis.com/Instance" } - ]; - - // Name of the file share in the source Cloud Filestore instance that the - // backup is created from. - string source_file_share = 9; - - // Output only. The service tier of the source Cloud Filestore instance that - // this backup is created from. - Instance.Tier source_instance_tier = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Amount of bytes that will be downloaded if the backup is - // restored. This may be different than storage bytes, since sequential - // backups of the same disk will share storage. - int64 download_bytes = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - google.protobuf.BoolValue satisfies_pzs = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// CreateBackupRequest creates a backup. -message CreateBackupRequest { - // Required. The backup's project and location, in the format - // `projects/{project_number}/locations/{location}`. In Cloud Filestore, - // backup locations map to GCP regions, for example **us-west1**. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. A [backup resource][google.cloud.filestore.v1.Backup] - Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the backup. - // The ID must be unique within the specified project and location. - // - // This value must start with a lowercase letter followed by up to 62 - // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - // Values that do not match this pattern will trigger an INVALID_ARGUMENT - // error. - string backup_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteBackupRequest deletes a backup. -message DeleteBackupRequest { - // Required. The backup resource name, in the format - // `projects/{project_number}/locations/{location}/backups/{backup_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "file.googleapis.com/Backup" } - ]; -} - -// UpdateBackupRequest updates description and/or labels for a backup. -message UpdateBackupRequest { - // Required. A [backup resource][google.cloud.filestore.v1.Backup] - Backup backup = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Mask of fields to update. At least one path must be supplied in - // this field. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// GetBackupRequest gets the state of a backup. -message GetBackupRequest { - // Required. The backup resource name, in the format - // `projects/{project_number}/locations/{location}/backups/{backup_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "file.googleapis.com/Backup" } - ]; -} - -// ListBackupsRequest lists backups. -message ListBackupsRequest { - // Required. The project and location for which to retrieve backup - // information, in the format - // `projects/{project_number}/locations/{location}`. In Cloud Filestore, - // backup locations map to GCP regions, for example **us-west1**. To retrieve - // backup information for all locations, use "-" for the - // `{location}` value. - 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 to use if there are additional - // results to retrieve for this list request. - string page_token = 3; - - // Sort results. Supported values are "name", "name desc" or "" (unsorted). - string order_by = 4; - - // List filter. - string filter = 5; -} - -// ListBackupsResponse is the result of ListBackupsRequest. -message ListBackupsResponse { - // A list of backups in the project for the specified location. - // - // If the `{location}` value in the request is "-", the response contains a - // list of backups from all locations. If any location is unreachable, the - // response will only return backups in reachable locations and the - // "unreachable" field will be populated with a list of unreachable - // locations. - repeated Backup backups = 1; - - // The token you can use to retrieve the next page of results. Not returned - // if there are no more results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index f7c59763e18f..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,42 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.CloudFilestoreManagerSettings; -import com.google.cloud.filestore.v1.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. - CloudFilestoreManagerSettings cloudFilestoreManagerSettings = - CloudFilestoreManagerSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings); - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index c55967c33347..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,41 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_create_setcredentialsprovider1_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.CloudFilestoreManagerSettings; - -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. - CloudFilestoreManagerSettings cloudFilestoreManagerSettings = - CloudFilestoreManagerSettings.newBuilder() - .setTransportChannelProvider( - CloudFilestoreManagerSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings); - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index f1c0f646bddf..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,39 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_create_setendpoint_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.CloudFilestoreManagerSettings; -import com.google.cloud.filestore.v1.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. - CloudFilestoreManagerSettings cloudFilestoreManagerSettings = - CloudFilestoreManagerSettings.newBuilder().setEndpoint(myEndpoint).build(); - CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings); - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackup.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackup.java deleted file mode 100644 index 64e3055769ba..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackup.java +++ /dev/null @@ -1,51 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createbackup_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.CreateBackupRequest; -import com.google.cloud.filestore.v1.LocationName; -import com.google.longrunning.Operation; - -public class AsyncCreateBackup { - - public static void main(String[] args) throws Exception { - asyncCreateBackup(); - } - - public static void asyncCreateBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setBackup(Backup.newBuilder().build()) - .setBackupId("backupId2121930365") - .build(); - ApiFuture future = - cloudFilestoreManagerClient.createBackupCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createbackup_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackupLRO.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackupLRO.java deleted file mode 100644 index 3d6e54a1b02f..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackupLRO.java +++ /dev/null @@ -1,51 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createbackup_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.CreateBackupRequest; -import com.google.cloud.filestore.v1.LocationName; - -public class AsyncCreateBackupLRO { - - public static void main(String[] args) throws Exception { - asyncCreateBackupLRO(); - } - - public static void asyncCreateBackupLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setBackup(Backup.newBuilder().build()) - .setBackupId("backupId2121930365") - .build(); - OperationFuture future = - cloudFilestoreManagerClient.createBackupOperationCallable().futureCall(request); - // Do something. - Backup response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createbackup_lro_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/SyncCreateBackup.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/SyncCreateBackup.java deleted file mode 100644 index aec63e4ba426..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/SyncCreateBackup.java +++ /dev/null @@ -1,46 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createbackup_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.CreateBackupRequest; -import com.google.cloud.filestore.v1.LocationName; - -public class SyncCreateBackup { - - public static void main(String[] args) throws Exception { - syncCreateBackup(); - } - - public static void syncCreateBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setBackup(Backup.newBuilder().build()) - .setBackupId("backupId2121930365") - .build(); - Backup response = cloudFilestoreManagerClient.createBackupAsync(request).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createbackup_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupLocationnameBackupString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupLocationnameBackupString.java deleted file mode 100644 index 0177177955dd..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupLocationnameBackupString.java +++ /dev/null @@ -1,43 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createbackup_locationnamebackupstring_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.LocationName; - -public class SyncCreateBackupLocationnameBackupString { - - public static void main(String[] args) throws Exception { - syncCreateBackupLocationnameBackupString(); - } - - public static void syncCreateBackupLocationnameBackupString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - Backup response = - cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createbackup_locationnamebackupstring_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupStringBackupString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupStringBackupString.java deleted file mode 100644 index edc2d57381a0..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupStringBackupString.java +++ /dev/null @@ -1,43 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createbackup_stringbackupstring_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.LocationName; - -public class SyncCreateBackupStringBackupString { - - public static void main(String[] args) throws Exception { - syncCreateBackupStringBackupString(); - } - - public static void syncCreateBackupStringBackupString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - Backup response = - cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createbackup_stringbackupstring_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstance.java deleted file mode 100644 index 7a1001f26c0e..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstance.java +++ /dev/null @@ -1,51 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.CreateInstanceRequest; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.LocationName; -import com.google.longrunning.Operation; - -public class AsyncCreateInstance { - - public static void main(String[] args) throws Exception { - asyncCreateInstance(); - } - - public static void asyncCreateInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInstanceId("instanceId902024336") - .setInstance(Instance.newBuilder().build()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.createInstanceCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createinstance_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstanceLRO.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstanceLRO.java deleted file mode 100644 index d94f5c806fac..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstanceLRO.java +++ /dev/null @@ -1,51 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.CreateInstanceRequest; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.LocationName; - -public class AsyncCreateInstanceLRO { - - public static void main(String[] args) throws Exception { - asyncCreateInstanceLRO(); - } - - public static void asyncCreateInstanceLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInstanceId("instanceId902024336") - .setInstance(Instance.newBuilder().build()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.createInstanceOperationCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createinstance_lro_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/SyncCreateInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/SyncCreateInstance.java deleted file mode 100644 index 36f8b59f6adf..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/SyncCreateInstance.java +++ /dev/null @@ -1,46 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createinstance_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.CreateInstanceRequest; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.LocationName; - -public class SyncCreateInstance { - - public static void main(String[] args) throws Exception { - syncCreateInstance(); - } - - public static void syncCreateInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInstanceId("instanceId902024336") - .setInstance(Instance.newBuilder().build()) - .build(); - Instance response = cloudFilestoreManagerClient.createInstanceAsync(request).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java deleted file mode 100644 index 835069fca853..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java +++ /dev/null @@ -1,43 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createinstance_locationnameinstancestring_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.LocationName; - -public class SyncCreateInstanceLocationnameInstanceString { - - public static void main(String[] args) throws Exception { - syncCreateInstanceLocationnameInstanceString(); - } - - public static void syncCreateInstanceLocationnameInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - Instance response = - cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createinstance_locationnameinstancestring_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceStringInstanceString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceStringInstanceString.java deleted file mode 100644 index 3cb633834c1b..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceStringInstanceString.java +++ /dev/null @@ -1,43 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_createinstance_stringinstancestring_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.LocationName; - -public class SyncCreateInstanceStringInstanceString { - - public static void main(String[] args) throws Exception { - syncCreateInstanceStringInstanceString(); - } - - public static void syncCreateInstanceStringInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - Instance response = - cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_createinstance_stringinstancestring_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackup.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackup.java deleted file mode 100644 index b9f25d5e6ca2..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackup.java +++ /dev/null @@ -1,48 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.BackupName; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.DeleteBackupRequest; -import com.google.longrunning.Operation; - -public class AsyncDeleteBackup { - - public static void main(String[] args) throws Exception { - asyncDeleteBackup(); - } - - public static void asyncDeleteBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.deleteBackupCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackupLRO.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackupLRO.java deleted file mode 100644 index e6be2f41e8b0..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackupLRO.java +++ /dev/null @@ -1,49 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1.BackupName; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.DeleteBackupRequest; -import com.google.protobuf.Empty; - -public class AsyncDeleteBackupLRO { - - public static void main(String[] args) throws Exception { - asyncDeleteBackupLRO(); - } - - public static void asyncDeleteBackupLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.deleteBackupOperationCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_lro_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackup.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackup.java deleted file mode 100644 index 9eec9ced95ee..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackup.java +++ /dev/null @@ -1,44 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_sync] -import com.google.cloud.filestore.v1.BackupName; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.DeleteBackupRequest; -import com.google.protobuf.Empty; - -public class SyncDeleteBackup { - - public static void main(String[] args) throws Exception { - syncDeleteBackup(); - } - - public static void syncDeleteBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - cloudFilestoreManagerClient.deleteBackupAsync(request).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupBackupname.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupBackupname.java deleted file mode 100644 index 95d66590e76b..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupBackupname.java +++ /dev/null @@ -1,40 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_backupname_sync] -import com.google.cloud.filestore.v1.BackupName; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.protobuf.Empty; - -public class SyncDeleteBackupBackupname { - - public static void main(String[] args) throws Exception { - syncDeleteBackupBackupname(); - } - - public static void syncDeleteBackupBackupname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - cloudFilestoreManagerClient.deleteBackupAsync(name).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_backupname_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupString.java deleted file mode 100644 index 97365ed8df3f..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupString.java +++ /dev/null @@ -1,40 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_string_sync] -import com.google.cloud.filestore.v1.BackupName; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.protobuf.Empty; - -public class SyncDeleteBackupString { - - public static void main(String[] args) throws Exception { - syncDeleteBackupString(); - } - - public static void syncDeleteBackupString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString(); - cloudFilestoreManagerClient.deleteBackupAsync(name).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deletebackup_string_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstance.java deleted file mode 100644 index ad2a0d10a814..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstance.java +++ /dev/null @@ -1,48 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1.InstanceName; -import com.google.longrunning.Operation; - -public class AsyncDeleteInstance { - - public static void main(String[] args) throws Exception { - asyncDeleteInstance(); - } - - public static void asyncDeleteInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.deleteInstanceCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstanceLRO.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstanceLRO.java deleted file mode 100644 index 88f81e368baf..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstanceLRO.java +++ /dev/null @@ -1,49 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1.InstanceName; -import com.google.protobuf.Empty; - -public class AsyncDeleteInstanceLRO { - - public static void main(String[] args) throws Exception { - asyncDeleteInstanceLRO(); - } - - public static void asyncDeleteInstanceLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.deleteInstanceOperationCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_lro_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstance.java deleted file mode 100644 index dd5fb0299365..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstance.java +++ /dev/null @@ -1,44 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1.InstanceName; -import com.google.protobuf.Empty; - -public class SyncDeleteInstance { - - public static void main(String[] args) throws Exception { - syncDeleteInstance(); - } - - public static void syncDeleteInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - cloudFilestoreManagerClient.deleteInstanceAsync(request).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceInstancename.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceInstancename.java deleted file mode 100644 index e3a317efcdf8..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceInstancename.java +++ /dev/null @@ -1,40 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_instancename_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.InstanceName; -import com.google.protobuf.Empty; - -public class SyncDeleteInstanceInstancename { - - public static void main(String[] args) throws Exception { - syncDeleteInstanceInstancename(); - } - - public static void syncDeleteInstanceInstancename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - cloudFilestoreManagerClient.deleteInstanceAsync(name).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_instancename_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceString.java deleted file mode 100644 index 61a641e965f5..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceString.java +++ /dev/null @@ -1,40 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_string_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.InstanceName; -import com.google.protobuf.Empty; - -public class SyncDeleteInstanceString { - - public static void main(String[] args) throws Exception { - syncDeleteInstanceString(); - } - - public static void syncDeleteInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); - cloudFilestoreManagerClient.deleteInstanceAsync(name).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_deleteinstance_string_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/AsyncGetBackup.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/AsyncGetBackup.java deleted file mode 100644 index b4df3bc56d16..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/AsyncGetBackup.java +++ /dev/null @@ -1,48 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_getbackup_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.BackupName; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.GetBackupRequest; - -public class AsyncGetBackup { - - public static void main(String[] args) throws Exception { - asyncGetBackup(); - } - - public static void asyncGetBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - GetBackupRequest request = - GetBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.getBackupCallable().futureCall(request); - // Do something. - Backup response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_getbackup_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/SyncGetBackup.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/SyncGetBackup.java deleted file mode 100644 index 61f3b96d4e6c..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/SyncGetBackup.java +++ /dev/null @@ -1,44 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_getbackup_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.BackupName; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.GetBackupRequest; - -public class SyncGetBackup { - - public static void main(String[] args) throws Exception { - syncGetBackup(); - } - - public static void syncGetBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - GetBackupRequest request = - GetBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - Backup response = cloudFilestoreManagerClient.getBackup(request); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_getbackup_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/SyncGetBackupBackupname.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/SyncGetBackupBackupname.java deleted file mode 100644 index 5dc063ec4093..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/SyncGetBackupBackupname.java +++ /dev/null @@ -1,40 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_getbackup_backupname_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.BackupName; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; - -public class SyncGetBackupBackupname { - - public static void main(String[] args) throws Exception { - syncGetBackupBackupname(); - } - - public static void syncGetBackupBackupname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - Backup response = cloudFilestoreManagerClient.getBackup(name); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_getbackup_backupname_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/SyncGetBackupString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/SyncGetBackupString.java deleted file mode 100644 index fcef05c8be43..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getbackup/SyncGetBackupString.java +++ /dev/null @@ -1,40 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_getbackup_string_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.BackupName; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; - -public class SyncGetBackupString { - - public static void main(String[] args) throws Exception { - syncGetBackupString(); - } - - public static void syncGetBackupString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString(); - Backup response = cloudFilestoreManagerClient.getBackup(name); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_getbackup_string_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/AsyncGetInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/AsyncGetInstance.java deleted file mode 100644 index a236b2de15d7..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/AsyncGetInstance.java +++ /dev/null @@ -1,48 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_getinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.GetInstanceRequest; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - GetInstanceRequest request = - GetInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.getInstanceCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_getinstance_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/SyncGetInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/SyncGetInstance.java deleted file mode 100644 index 2496ef246696..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/SyncGetInstance.java +++ /dev/null @@ -1,44 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_getinstance_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.GetInstanceRequest; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - GetInstanceRequest request = - GetInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - Instance response = cloudFilestoreManagerClient.getInstance(request); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_getinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceInstancename.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceInstancename.java deleted file mode 100644 index 89cd872e8508..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceInstancename.java +++ /dev/null @@ -1,40 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_getinstance_instancename_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - Instance response = cloudFilestoreManagerClient.getInstance(name); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_getinstance_instancename_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceString.java deleted file mode 100644 index 410ea25abdd3..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceString.java +++ /dev/null @@ -1,40 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_getinstance_string_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); - Instance response = cloudFilestoreManagerClient.getInstance(name); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_getinstance_string_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/AsyncListBackups.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/AsyncListBackups.java deleted file mode 100644 index c9cce4dde56e..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/AsyncListBackups.java +++ /dev/null @@ -1,54 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listbackups_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.ListBackupsRequest; -import com.google.cloud.filestore.v1.LocationName; - -public class AsyncListBackups { - - public static void main(String[] args) throws Exception { - asyncListBackups(); - } - - public static void asyncListBackups() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListBackupsRequest request = - ListBackupsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - ApiFuture future = - cloudFilestoreManagerClient.listBackupsPagedCallable().futureCall(request); - // Do something. - for (Backup element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_listbackups_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/AsyncListBackupsPaged.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/AsyncListBackupsPaged.java deleted file mode 100644 index 9f07bf3c0aaf..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/AsyncListBackupsPaged.java +++ /dev/null @@ -1,62 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listbackups_paged_async] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.ListBackupsRequest; -import com.google.cloud.filestore.v1.ListBackupsResponse; -import com.google.cloud.filestore.v1.LocationName; -import com.google.common.base.Strings; - -public class AsyncListBackupsPaged { - - public static void main(String[] args) throws Exception { - asyncListBackupsPaged(); - } - - public static void asyncListBackupsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListBackupsRequest request = - ListBackupsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - while (true) { - ListBackupsResponse response = - cloudFilestoreManagerClient.listBackupsCallable().call(request); - for (Backup element : response.getBackupsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_listbackups_paged_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/SyncListBackups.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/SyncListBackups.java deleted file mode 100644 index b0ae8f307b56..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/SyncListBackups.java +++ /dev/null @@ -1,50 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listbackups_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.ListBackupsRequest; -import com.google.cloud.filestore.v1.LocationName; - -public class SyncListBackups { - - public static void main(String[] args) throws Exception { - syncListBackups(); - } - - public static void syncListBackups() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListBackupsRequest request = - ListBackupsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - for (Backup element : cloudFilestoreManagerClient.listBackups(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_listbackups_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/SyncListBackupsLocationname.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/SyncListBackupsLocationname.java deleted file mode 100644 index ee03bf0d6985..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/SyncListBackupsLocationname.java +++ /dev/null @@ -1,42 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listbackups_locationname_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.LocationName; - -public class SyncListBackupsLocationname { - - public static void main(String[] args) throws Exception { - syncListBackupsLocationname(); - } - - public static void syncListBackupsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_listbackups_locationname_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/SyncListBackupsString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/SyncListBackupsString.java deleted file mode 100644 index 36fb5015e8ac..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listbackups/SyncListBackupsString.java +++ /dev/null @@ -1,42 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listbackups_string_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.LocationName; - -public class SyncListBackupsString { - - public static void main(String[] args) throws Exception { - syncListBackupsString(); - } - - public static void syncListBackupsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_listbackups_string_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/AsyncListInstances.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/AsyncListInstances.java deleted file mode 100644 index 213c1f7e64b5..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/AsyncListInstances.java +++ /dev/null @@ -1,54 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listinstances_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.ListInstancesRequest; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListInstancesRequest request = - ListInstancesRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - ApiFuture future = - cloudFilestoreManagerClient.listInstancesPagedCallable().futureCall(request); - // Do something. - for (Instance element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_listinstances_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/AsyncListInstancesPaged.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/AsyncListInstancesPaged.java deleted file mode 100644 index 215d2f2c86cf..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/AsyncListInstancesPaged.java +++ /dev/null @@ -1,62 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listinstances_paged_async] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.ListInstancesRequest; -import com.google.cloud.filestore.v1.ListInstancesResponse; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListInstancesRequest request = - ListInstancesRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - while (true) { - ListInstancesResponse response = - cloudFilestoreManagerClient.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 filestore_v1_generated_cloudfilestoremanagerclient_listinstances_paged_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/SyncListInstances.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/SyncListInstances.java deleted file mode 100644 index e93dc20221c3..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/SyncListInstances.java +++ /dev/null @@ -1,50 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listinstances_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.ListInstancesRequest; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListInstancesRequest request = - ListInstancesRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - for (Instance element : cloudFilestoreManagerClient.listInstances(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_listinstances_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/SyncListInstancesLocationname.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/SyncListInstancesLocationname.java deleted file mode 100644 index 53d9f9b19c8d..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/SyncListInstancesLocationname.java +++ /dev/null @@ -1,42 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listinstances_locationname_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_listinstances_locationname_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/SyncListInstancesString.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/SyncListInstancesString.java deleted file mode 100644 index e6e99ef78eb7..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/listinstances/SyncListInstancesString.java +++ /dev/null @@ -1,42 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_listinstances_string_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_listinstances_string_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstance.java deleted file mode 100644 index 627e73e257bc..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstance.java +++ /dev/null @@ -1,49 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_restoreinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.InstanceName; -import com.google.cloud.filestore.v1.RestoreInstanceRequest; -import com.google.longrunning.Operation; - -public class AsyncRestoreInstance { - - public static void main(String[] args) throws Exception { - asyncRestoreInstance(); - } - - public static void asyncRestoreInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - ApiFuture future = - cloudFilestoreManagerClient.restoreInstanceCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_restoreinstance_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstanceLRO.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstanceLRO.java deleted file mode 100644 index d29e8e1e9325..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstanceLRO.java +++ /dev/null @@ -1,50 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_restoreinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.InstanceName; -import com.google.cloud.filestore.v1.RestoreInstanceRequest; - -public class AsyncRestoreInstanceLRO { - - public static void main(String[] args) throws Exception { - asyncRestoreInstanceLRO(); - } - - public static void asyncRestoreInstanceLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - OperationFuture future = - cloudFilestoreManagerClient.restoreInstanceOperationCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_restoreinstance_lro_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/restoreinstance/SyncRestoreInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/restoreinstance/SyncRestoreInstance.java deleted file mode 100644 index 63896d2aff37..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/restoreinstance/SyncRestoreInstance.java +++ /dev/null @@ -1,45 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_restoreinstance_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.InstanceName; -import com.google.cloud.filestore.v1.RestoreInstanceRequest; - -public class SyncRestoreInstance { - - public static void main(String[] args) throws Exception { - syncRestoreInstance(); - } - - public static void syncRestoreInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - Instance response = cloudFilestoreManagerClient.restoreInstanceAsync(request).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_restoreinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackup.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackup.java deleted file mode 100644 index 7c1d803980ae..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackup.java +++ /dev/null @@ -1,50 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_updatebackup_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.UpdateBackupRequest; -import com.google.longrunning.Operation; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateBackup { - - public static void main(String[] args) throws Exception { - asyncUpdateBackup(); - } - - public static void asyncUpdateBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateBackupRequest request = - UpdateBackupRequest.newBuilder() - .setBackup(Backup.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.updateBackupCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_updatebackup_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackupLRO.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackupLRO.java deleted file mode 100644 index 8cc923ba6445..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackupLRO.java +++ /dev/null @@ -1,50 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_updatebackup_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.UpdateBackupRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateBackupLRO { - - public static void main(String[] args) throws Exception { - asyncUpdateBackupLRO(); - } - - public static void asyncUpdateBackupLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateBackupRequest request = - UpdateBackupRequest.newBuilder() - .setBackup(Backup.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.updateBackupOperationCallable().futureCall(request); - // Do something. - Backup response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_updatebackup_lro_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackup.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackup.java deleted file mode 100644 index efacf6f4070c..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackup.java +++ /dev/null @@ -1,45 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_updatebackup_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.UpdateBackupRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateBackup { - - public static void main(String[] args) throws Exception { - syncUpdateBackup(); - } - - public static void syncUpdateBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateBackupRequest request = - UpdateBackupRequest.newBuilder() - .setBackup(Backup.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Backup response = cloudFilestoreManagerClient.updateBackupAsync(request).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_updatebackup_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackupBackupFieldmask.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackupBackupFieldmask.java deleted file mode 100644 index e872c1effa10..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackupBackupFieldmask.java +++ /dev/null @@ -1,41 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_updatebackup_backupfieldmask_sync] -import com.google.cloud.filestore.v1.Backup; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateBackupBackupFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateBackupBackupFieldmask(); - } - - public static void syncUpdateBackupBackupFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - Backup backup = Backup.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Backup response = cloudFilestoreManagerClient.updateBackupAsync(backup, updateMask).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_updatebackup_backupfieldmask_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstance.java deleted file mode 100644 index e49d70925f4b..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstance.java +++ /dev/null @@ -1,50 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_updateinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateInstanceRequest request = - UpdateInstanceRequest.newBuilder() - .setUpdateMask(FieldMask.newBuilder().build()) - .setInstance(Instance.newBuilder().build()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.updateInstanceCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_updateinstance_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstanceLRO.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstanceLRO.java deleted file mode 100644 index 0cbeb2de2bd3..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstanceLRO.java +++ /dev/null @@ -1,50 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_updateinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateInstanceRequest request = - UpdateInstanceRequest.newBuilder() - .setUpdateMask(FieldMask.newBuilder().build()) - .setInstance(Instance.newBuilder().build()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.updateInstanceOperationCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_updateinstance_lro_async] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstance.java deleted file mode 100644 index 7ce812372947..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstance.java +++ /dev/null @@ -1,45 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_updateinstance_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.Instance; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateInstanceRequest request = - UpdateInstanceRequest.newBuilder() - .setUpdateMask(FieldMask.newBuilder().build()) - .setInstance(Instance.newBuilder().build()) - .build(); - Instance response = cloudFilestoreManagerClient.updateInstanceAsync(request).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_updateinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstanceInstanceFieldmask.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstanceInstanceFieldmask.java deleted file mode 100644 index 42dbce80ffc4..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstanceInstanceFieldmask.java +++ /dev/null @@ -1,42 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerclient_updateinstance_instancefieldmask_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - Instance instance = Instance.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Instance response = - cloudFilestoreManagerClient.updateInstanceAsync(instance, updateMask).get(); - } - } -} -// [END filestore_v1_generated_cloudfilestoremanagerclient_updateinstance_instancefieldmask_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagersettings/getinstance/SyncGetInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagersettings/getinstance/SyncGetInstance.java deleted file mode 100644 index ff44b8b7bc81..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/cloudfilestoremanagersettings/getinstance/SyncGetInstance.java +++ /dev/null @@ -1,47 +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.filestore.v1.samples; - -// [START filestore_v1_generated_cloudfilestoremanagersettings_getinstance_sync] -import com.google.cloud.filestore.v1.CloudFilestoreManagerSettings; -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. - CloudFilestoreManagerSettings.Builder cloudFilestoreManagerSettingsBuilder = - CloudFilestoreManagerSettings.newBuilder(); - cloudFilestoreManagerSettingsBuilder - .getInstanceSettings() - .setRetrySettings( - cloudFilestoreManagerSettingsBuilder - .getInstanceSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - CloudFilestoreManagerSettings cloudFilestoreManagerSettings = - cloudFilestoreManagerSettingsBuilder.build(); - } -} -// [END filestore_v1_generated_cloudfilestoremanagersettings_getinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/stub/cloudfilestoremanagerstubsettings/getinstance/SyncGetInstance.java b/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/stub/cloudfilestoremanagerstubsettings/getinstance/SyncGetInstance.java deleted file mode 100644 index d8a10e166341..000000000000 --- a/owl-bot-staging/java-filestore/v1/samples/snippets/generated/com/google/cloud/filestore/v1/stub/cloudfilestoremanagerstubsettings/getinstance/SyncGetInstance.java +++ /dev/null @@ -1,47 +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.filestore.v1.stub.samples; - -// [START filestore_v1_generated_cloudfilestoremanagerstubsettings_getinstance_sync] -import com.google.cloud.filestore.v1.stub.CloudFilestoreManagerStubSettings; -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. - CloudFilestoreManagerStubSettings.Builder cloudFilestoreManagerSettingsBuilder = - CloudFilestoreManagerStubSettings.newBuilder(); - cloudFilestoreManagerSettingsBuilder - .getInstanceSettings() - .setRetrySettings( - cloudFilestoreManagerSettingsBuilder - .getInstanceSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - CloudFilestoreManagerStubSettings cloudFilestoreManagerSettings = - cloudFilestoreManagerSettingsBuilder.build(); - } -} -// [END filestore_v1_generated_cloudfilestoremanagerstubsettings_getinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerClient.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerClient.java deleted file mode 100644 index 97849804b67c..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerClient.java +++ /dev/null @@ -1,1857 +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.filestore.v1beta1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.stub.CloudFilestoreManagerStub; -import com.google.cloud.filestore.v1beta1.stub.CloudFilestoreManagerStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Configures and manages Cloud Filestore resources. - * - *

Cloud Filestore Manager v1beta1. - * - *

The `file.googleapis.com` service implements the Cloud Filestore API and defines the following - * model for managing resources: - * - *

    - *
  • The service works with a collection of cloud projects, named: `/projects/*` - *
  • Each project has a collection of available locations, named: `/locations/*` - *
  • Each location has a collection of instances and backups, named: `/instances/*` and - * `/backups/*` respectively. - *
  • As such, Cloud Filestore instances are resources of the form: - * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` backups are - * resources of the form: `/projects/{project_id}/locations/{location_id}/backup/{backup_id}` - *
- * - *

Note that location_id can represent a GCP `zone` or `region` depending on the resource. for - * example: A zonal Filestore instance: - * - *

    - *
  • `projects/my-project/locations/us-central1-c/instances/my-basic-tier-filer` A regional - * Filestore instance: - *
  • `projects/my-project/locations/us-central1/instances/my-enterprise-filer` - *
- * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create()) {
- *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
- *   Instance response = cloudFilestoreManagerClient.getInstance(name);
- * }
- * }
- * - *

Note: close() needs to be called on the CloudFilestoreManagerClient object to clean up - * resources such as threads. In the example above, try-with-resources is used, which automatically - * calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of CloudFilestoreManagerSettings - * to create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
- *     CloudFilestoreManagerSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
- *     CloudFilestoreManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
- * }
- * - *

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.
- * CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
- *     CloudFilestoreManagerSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             CloudFilestoreManagerSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class CloudFilestoreManagerClient implements BackgroundResource { - private final CloudFilestoreManagerSettings settings; - private final CloudFilestoreManagerStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of CloudFilestoreManagerClient with default settings. */ - public static final CloudFilestoreManagerClient create() throws IOException { - return create(CloudFilestoreManagerSettings.newBuilder().build()); - } - - /** - * Constructs an instance of CloudFilestoreManagerClient, using the given settings. The channels - * are created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final CloudFilestoreManagerClient create(CloudFilestoreManagerSettings settings) - throws IOException { - return new CloudFilestoreManagerClient(settings); - } - - /** - * Constructs an instance of CloudFilestoreManagerClient, using the given stub for making calls. - * This is for advanced usage - prefer using create(CloudFilestoreManagerSettings). - */ - public static final CloudFilestoreManagerClient create(CloudFilestoreManagerStub stub) { - return new CloudFilestoreManagerClient(stub); - } - - /** - * Constructs an instance of CloudFilestoreManagerClient, 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 CloudFilestoreManagerClient(CloudFilestoreManagerSettings settings) throws IOException { - this.settings = settings; - this.stub = ((CloudFilestoreManagerStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected CloudFilestoreManagerClient(CloudFilestoreManagerStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final CloudFilestoreManagerSettings getSettings() { - return settings; - } - - public CloudFilestoreManagerStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project and location for which to retrieve instance information, in - * the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map - * to GCP zones, for example **us-west1-b**. To retrieve instance information - * for all locations, use "-" for the `{location}` value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInstancesPagedResponse listInstances(LocationName parent) { - ListInstancesRequest request = - ListInstancesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listInstances(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project and location for which to retrieve instance information, in - * the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map - * to GCP zones, for example **us-west1-b**. To retrieve instance information - * for all locations, use "-" for the `{location}` value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInstancesPagedResponse listInstances(String parent) { - ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); - return listInstances(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListInstancesRequest request =
-   *       ListInstancesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (Instance element : cloudFilestoreManagerClient.listInstances(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 ListInstancesPagedResponse listInstances(ListInstancesRequest request) { - return listInstancesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListInstancesRequest request =
-   *       ListInstancesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.listInstancesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Instance element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listInstancesPagedCallable() { - return stub.listInstancesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all instances in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListInstancesRequest request =
-   *       ListInstancesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListInstancesResponse response =
-   *         cloudFilestoreManagerClient.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;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listInstancesCallable() { - return stub.listInstancesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   Instance response = cloudFilestoreManagerClient.getInstance(name);
-   * }
-   * }
- * - * @param name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Instance getInstance(InstanceName name) { - GetInstanceRequest request = - GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getInstance(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
-   *   Instance response = cloudFilestoreManagerClient.getInstance(name);
-   * }
-   * }
- * - * @param name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Instance getInstance(String name) { - GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); - return getInstance(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   GetInstanceRequest request =
-   *       GetInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   Instance response = cloudFilestoreManagerClient.getInstance(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 Instance getInstance(GetInstanceRequest request) { - return getInstanceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   GetInstanceRequest request =
-   *       GetInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.getInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getInstanceCallable() { - return stub.getInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Instance instance = Instance.newBuilder().build();
-   *   String instanceId = "instanceId902024336";
-   *   Instance response =
-   *       cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get();
-   * }
-   * }
- * - * @param parent Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map to GCP - * zones, for example **us-west1-b**. - * @param instance Required. An [instance resource][google.cloud.filestore.v1beta1.Instance] - * @param instanceId Required. The ID of the instance to create. The ID must be unique within the - * specified project and location. - *

This value must start with a lowercase letter followed by up to 62 lowercase letters, - * numbers, or hyphens, and cannot end with a hyphen. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createInstanceAsync( - LocationName parent, Instance instance, String instanceId) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInstance(instance) - .setInstanceId(instanceId) - .build(); - return createInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Instance instance = Instance.newBuilder().build();
-   *   String instanceId = "instanceId902024336";
-   *   Instance response =
-   *       cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get();
-   * }
-   * }
- * - * @param parent Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map to GCP - * zones, for example **us-west1-b**. - * @param instance Required. An [instance resource][google.cloud.filestore.v1beta1.Instance] - * @param instanceId Required. The ID of the instance to create. The ID must be unique within the - * specified project and location. - *

This value must start with a lowercase letter followed by up to 62 lowercase letters, - * numbers, or hyphens, and cannot end with a hyphen. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createInstanceAsync( - String parent, Instance instance, String instanceId) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(parent) - .setInstance(instance) - .setInstanceId(instanceId) - .build(); - return createInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateInstanceRequest request =
-   *       CreateInstanceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInstanceId("instanceId902024336")
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   Instance response = cloudFilestoreManagerClient.createInstanceAsync(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 createInstanceAsync( - CreateInstanceRequest request) { - return createInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateInstanceRequest request =
-   *       CreateInstanceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInstanceId("instanceId902024336")
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.createInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createInstanceOperationCallable() { - return stub.createInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an instance. When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or larger than the - * minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateInstanceRequest request =
-   *       CreateInstanceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInstanceId("instanceId902024336")
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.createInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createInstanceCallable() { - return stub.createInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   Instance instance = Instance.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Instance response =
-   *       cloudFilestoreManagerClient.updateInstanceAsync(instance, updateMask).get();
-   * }
-   * }
- * - * @param instance Required. Only fields specified in update_mask are updated. - * @param updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these fields: - *
    - *
  • "description" - *
  • "file_shares" - *
  • "labels" - *
- * - * @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. - /** - * Updates the settings of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateInstanceRequest request =
-   *       UpdateInstanceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   Instance response = cloudFilestoreManagerClient.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. - /** - * Updates the settings of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateInstanceRequest request =
-   *       UpdateInstanceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.updateInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateInstanceOperationCallable() { - return stub.updateInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateInstanceRequest request =
-   *       UpdateInstanceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setInstance(Instance.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.updateInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateInstanceCallable() { - return stub.updateInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores an existing instance's file share from a backup. - * - *

The capacity of the instance needs to be equal to or larger than the capacity of the backup - * (and also equal to or larger than the minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   RestoreInstanceRequest request =
-   *       RestoreInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .setFileShare("fileShare-1327728701")
-   *           .build();
-   *   Instance response = cloudFilestoreManagerClient.restoreInstanceAsync(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 restoreInstanceAsync( - RestoreInstanceRequest request) { - return restoreInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores an existing instance's file share from a backup. - * - *

The capacity of the instance needs to be equal to or larger than the capacity of the backup - * (and also equal to or larger than the minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   RestoreInstanceRequest request =
-   *       RestoreInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .setFileShare("fileShare-1327728701")
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.restoreInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Instance response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - restoreInstanceOperationCallable() { - return stub.restoreInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores an existing instance's file share from a backup. - * - *

The capacity of the instance needs to be equal to or larger than the capacity of the backup - * (and also equal to or larger than the minimum capacity of the tier). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   RestoreInstanceRequest request =
-   *       RestoreInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .setFileShare("fileShare-1327728701")
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.restoreInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable restoreInstanceCallable() { - return stub.restoreInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   cloudFilestoreManagerClient.deleteInstanceAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteInstanceAsync(InstanceName name) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
-   *   cloudFilestoreManagerClient.deleteInstanceAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteInstanceAsync(String name) { - DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); - return deleteInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   cloudFilestoreManagerClient.deleteInstanceAsync(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 deleteInstanceAsync( - DeleteInstanceRequest request) { - return deleteInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.deleteInstanceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteInstanceOperationCallable() { - return stub.deleteInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an instance. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder()
-   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.deleteInstanceCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteInstanceCallable() { - return stub.deleteInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project and location for which to retrieve backup information, in - * the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, backup - * locations map to GCP regions, for example **us-west1**. To retrieve backup - * information for all locations, use "-" for the `{location}` value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBackupsPagedResponse listBackups(LocationName parent) { - ListBackupsRequest request = - ListBackupsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listBackups(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project and location for which to retrieve backup information, in - * the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, backup - * locations map to GCP regions, for example **us-west1**. To retrieve backup - * information for all locations, use "-" for the `{location}` value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBackupsPagedResponse listBackups(String parent) { - ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build(); - return listBackups(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListBackupsRequest request =
-   *       ListBackupsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (Backup element : cloudFilestoreManagerClient.listBackups(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 ListBackupsPagedResponse listBackups(ListBackupsRequest request) { - return listBackupsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListBackupsRequest request =
-   *       ListBackupsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.listBackupsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Backup element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listBackupsPagedCallable() { - return stub.listBackupsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all backups in a project for either a specified location or for all locations. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   ListBackupsRequest request =
-   *       ListBackupsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListBackupsResponse response =
-   *         cloudFilestoreManagerClient.listBackupsCallable().call(request);
-   *     for (Backup element : response.getBackupsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listBackupsCallable() { - return stub.listBackupsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
-   *   Backup response = cloudFilestoreManagerClient.getBackup(name);
-   * }
-   * }
- * - * @param name Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backups/{backup_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Backup getBackup(BackupName name) { - GetBackupRequest request = - GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getBackup(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
-   *   Backup response = cloudFilestoreManagerClient.getBackup(name);
-   * }
-   * }
- * - * @param name Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backups/{backup_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Backup getBackup(String name) { - GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build(); - return getBackup(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   GetBackupRequest request =
-   *       GetBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   Backup response = cloudFilestoreManagerClient.getBackup(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 Backup getBackup(GetBackupRequest request) { - return getBackupCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   GetBackupRequest request =
-   *       GetBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.getBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getBackupCallable() { - return stub.getBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Backup backup = Backup.newBuilder().build();
-   *   String backupId = "backupId2121930365";
-   *   Backup response =
-   *       cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get();
-   * }
-   * }
- * - * @param parent Required. The backup's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, backup locations map to - * GCP regions, for example **us-west1**. - * @param backup Required. A [backup resource][google.cloud.filestore.v1beta1.Backup] - * @param backupId Required. The ID to use for the backup. The ID must be unique within the - * specified project and location. - *

This value must start with a lowercase letter followed by up to 62 lowercase letters, - * numbers, or hyphens, and cannot end with a hyphen. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createBackupAsync( - LocationName parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Backup backup = Backup.newBuilder().build();
-   *   String backupId = "backupId2121930365";
-   *   Backup response =
-   *       cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get();
-   * }
-   * }
- * - * @param parent Required. The backup's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, backup locations map to - * GCP regions, for example **us-west1**. - * @param backup Required. A [backup resource][google.cloud.filestore.v1beta1.Backup] - * @param backupId Required. The ID to use for the backup. The ID must be unique within the - * specified project and location. - *

This value must start with a lowercase letter followed by up to 62 lowercase letters, - * numbers, or hyphens, and cannot end with a hyphen. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createBackupAsync( - String parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateBackupRequest request =
-   *       CreateBackupRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setBackupId("backupId2121930365")
-   *           .build();
-   *   Backup response = cloudFilestoreManagerClient.createBackupAsync(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 createBackupAsync( - CreateBackupRequest request) { - return createBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateBackupRequest request =
-   *       CreateBackupRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setBackupId("backupId2121930365")
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.createBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createBackupOperationCallable() { - return stub.createBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   CreateBackupRequest request =
-   *       CreateBackupRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setBackupId("backupId2121930365")
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.createBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createBackupCallable() { - return stub.createBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
-   *   cloudFilestoreManagerClient.deleteBackupAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backups/{backup_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteBackupAsync(BackupName name) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
-   *   cloudFilestoreManagerClient.deleteBackupAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backups/{backup_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteBackupAsync(String name) { - DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   cloudFilestoreManagerClient.deleteBackupAsync(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 deleteBackupAsync( - DeleteBackupRequest request) { - return deleteBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.deleteBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteBackupOperationCallable() { - return stub.deleteBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.deleteBackupCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteBackupCallable() { - return stub.deleteBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   Backup backup = Backup.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Backup response = cloudFilestoreManagerClient.updateBackupAsync(backup, updateMask).get();
-   * }
-   * }
- * - * @param backup Required. A [backup resource][google.cloud.filestore.v1beta1.Backup] - * @param updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture updateBackupAsync( - Backup backup, FieldMask updateMask) { - UpdateBackupRequest request = - UpdateBackupRequest.newBuilder().setBackup(backup).setUpdateMask(updateMask).build(); - return updateBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateBackupRequest request =
-   *       UpdateBackupRequest.newBuilder()
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Backup response = cloudFilestoreManagerClient.updateBackupAsync(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 updateBackupAsync( - UpdateBackupRequest request) { - return updateBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateBackupRequest request =
-   *       UpdateBackupRequest.newBuilder()
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       cloudFilestoreManagerClient.updateBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateBackupOperationCallable() { - return stub.updateBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the settings of a specific backup. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
-   *     CloudFilestoreManagerClient.create()) {
-   *   UpdateBackupRequest request =
-   *       UpdateBackupRequest.newBuilder()
-   *           .setBackup(Backup.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       cloudFilestoreManagerClient.updateBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateBackupCallable() { - return stub.updateBackupCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListInstancesPagedResponse - extends AbstractPagedListResponse< - ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage, - ListInstancesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListInstancesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListInstancesPagedResponse(ListInstancesPage page) { - super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListInstancesPage - extends AbstractPage< - ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { - - private ListInstancesPage( - PageContext context, - ListInstancesResponse response) { - super(context, response); - } - - private static ListInstancesPage createEmptyPage() { - return new ListInstancesPage(null, null); - } - - @Override - protected ListInstancesPage createPage( - PageContext context, - ListInstancesResponse response) { - return new ListInstancesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListInstancesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage, - ListInstancesFixedSizeCollection> { - - private ListInstancesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListInstancesFixedSizeCollection createEmptyCollection() { - return new ListInstancesFixedSizeCollection(null, 0); - } - - @Override - protected ListInstancesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListInstancesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListBackupsPagedResponse - extends AbstractPagedListResponse< - ListBackupsRequest, ListBackupsResponse, Backup, ListBackupsPage, - ListBackupsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListBackupsPagedResponse(ListBackupsPage page) { - super(page, ListBackupsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListBackupsPage - extends AbstractPage { - - private ListBackupsPage( - PageContext context, - ListBackupsResponse response) { - super(context, response); - } - - private static ListBackupsPage createEmptyPage() { - return new ListBackupsPage(null, null); - } - - @Override - protected ListBackupsPage createPage( - PageContext context, - ListBackupsResponse response) { - return new ListBackupsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListBackupsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListBackupsRequest, ListBackupsResponse, Backup, ListBackupsPage, - ListBackupsFixedSizeCollection> { - - private ListBackupsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListBackupsFixedSizeCollection createEmptyCollection() { - return new ListBackupsFixedSizeCollection(null, 0); - } - - @Override - protected ListBackupsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListBackupsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerSettings.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerSettings.java deleted file mode 100644 index 22179fe9397a..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerSettings.java +++ /dev/null @@ -1,408 +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.filestore.v1beta1; - -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -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; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.stub.CloudFilestoreManagerStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link CloudFilestoreManagerClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (file.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getInstance to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * CloudFilestoreManagerSettings.Builder cloudFilestoreManagerSettingsBuilder =
- *     CloudFilestoreManagerSettings.newBuilder();
- * cloudFilestoreManagerSettingsBuilder
- *     .getInstanceSettings()
- *     .setRetrySettings(
- *         cloudFilestoreManagerSettingsBuilder
- *             .getInstanceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
- *     cloudFilestoreManagerSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class CloudFilestoreManagerSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listInstances. */ - public PagedCallSettings - listInstancesSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).listInstancesSettings(); - } - - /** Returns the object with the settings used for calls to getInstance. */ - public UnaryCallSettings getInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).getInstanceSettings(); - } - - /** Returns the object with the settings used for calls to createInstance. */ - public UnaryCallSettings createInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).createInstanceSettings(); - } - - /** Returns the object with the settings used for calls to createInstance. */ - public OperationCallSettings - createInstanceOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()) - .createInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateInstance. */ - public UnaryCallSettings updateInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).updateInstanceSettings(); - } - - /** Returns the object with the settings used for calls to updateInstance. */ - public OperationCallSettings - updateInstanceOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()) - .updateInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to restoreInstance. */ - public UnaryCallSettings restoreInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).restoreInstanceSettings(); - } - - /** Returns the object with the settings used for calls to restoreInstance. */ - public OperationCallSettings - restoreInstanceOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()) - .restoreInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public UnaryCallSettings deleteInstanceSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).deleteInstanceSettings(); - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public OperationCallSettings - deleteInstanceOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()) - .deleteInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).listBackupsSettings(); - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).getBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).createBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).createBackupOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).deleteBackupSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).deleteBackupOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateBackup. */ - public UnaryCallSettings updateBackupSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).updateBackupSettings(); - } - - /** Returns the object with the settings used for calls to updateBackup. */ - public OperationCallSettings - updateBackupOperationSettings() { - return ((CloudFilestoreManagerStubSettings) getStubSettings()).updateBackupOperationSettings(); - } - - public static final CloudFilestoreManagerSettings create(CloudFilestoreManagerStubSettings stub) - throws IOException { - return new CloudFilestoreManagerSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return CloudFilestoreManagerStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return CloudFilestoreManagerStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return CloudFilestoreManagerStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return CloudFilestoreManagerStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** 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); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected CloudFilestoreManagerSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for CloudFilestoreManagerSettings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(CloudFilestoreManagerStubSettings.newBuilder(clientContext)); - } - - protected Builder(CloudFilestoreManagerSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(CloudFilestoreManagerStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(CloudFilestoreManagerStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(CloudFilestoreManagerStubSettings.newHttpJsonBuilder()); - } - - public CloudFilestoreManagerStubSettings.Builder getStubSettingsBuilder() { - return ((CloudFilestoreManagerStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listInstances. */ - public PagedCallSettings.Builder< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - listInstancesSettings() { - return getStubSettingsBuilder().listInstancesSettings(); - } - - /** Returns the builder for the settings used for calls to getInstance. */ - public UnaryCallSettings.Builder getInstanceSettings() { - return getStubSettingsBuilder().getInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to createInstance. */ - public UnaryCallSettings.Builder createInstanceSettings() { - return getStubSettingsBuilder().createInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to createInstance. */ - public OperationCallSettings.Builder - createInstanceOperationSettings() { - return getStubSettingsBuilder().createInstanceOperationSettings(); - } - - /** 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 restoreInstance. */ - public UnaryCallSettings.Builder restoreInstanceSettings() { - return getStubSettingsBuilder().restoreInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to restoreInstance. */ - public OperationCallSettings.Builder - restoreInstanceOperationSettings() { - return getStubSettingsBuilder().restoreInstanceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - public UnaryCallSettings.Builder deleteInstanceSettings() { - return getStubSettingsBuilder().deleteInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - public OperationCallSettings.Builder - deleteInstanceOperationSettings() { - return getStubSettingsBuilder().deleteInstanceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return getStubSettingsBuilder().listBackupsSettings(); - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getStubSettingsBuilder().getBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return getStubSettingsBuilder().createBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public OperationCallSettings.Builder - createBackupOperationSettings() { - return getStubSettingsBuilder().createBackupOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return getStubSettingsBuilder().deleteBackupSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return getStubSettingsBuilder().deleteBackupOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateBackup. */ - public UnaryCallSettings.Builder updateBackupSettings() { - return getStubSettingsBuilder().updateBackupSettings(); - } - - /** Returns the builder for the settings used for calls to updateBackup. */ - public OperationCallSettings.Builder - updateBackupOperationSettings() { - return getStubSettingsBuilder().updateBackupOperationSettings(); - } - - @Override - public CloudFilestoreManagerSettings build() throws IOException { - return new CloudFilestoreManagerSettings(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/gapic_metadata.json b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/gapic_metadata.json deleted file mode 100644 index 6cac37774ee6..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/gapic_metadata.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.filestore.v1beta1", - "libraryPackage": "com.google.cloud.filestore.v1beta1", - "services": { - "CloudFilestoreManager": { - "clients": { - "grpc": { - "libraryClient": "CloudFilestoreManagerClient", - "rpcs": { - "CreateBackup": { - "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] - }, - "CreateInstance": { - "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] - }, - "DeleteBackup": { - "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] - }, - "DeleteInstance": { - "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] - }, - "GetBackup": { - "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] - }, - "GetInstance": { - "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"] - }, - "ListBackups": { - "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] - }, - "ListInstances": { - "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] - }, - "RestoreInstance": { - "methods": ["restoreInstanceAsync", "restoreInstanceOperationCallable", "restoreInstanceCallable"] - }, - "UpdateBackup": { - "methods": ["updateBackupAsync", "updateBackupAsync", "updateBackupOperationCallable", "updateBackupCallable"] - }, - "UpdateInstance": { - "methods": ["updateInstanceAsync", "updateInstanceAsync", "updateInstanceOperationCallable", "updateInstanceCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/package-info.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/package-info.java deleted file mode 100644 index 14f38a5691fc..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/package-info.java +++ /dev/null @@ -1,63 +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. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= CloudFilestoreManagerClient ======================= - * - *

Service Description: Configures and manages Cloud Filestore resources. - * - *

Cloud Filestore Manager v1beta1. - * - *

The `file.googleapis.com` service implements the Cloud Filestore API and defines the following - * model for managing resources: - * - *

    - *
  • The service works with a collection of cloud projects, named: `/projects/*` - *
  • Each project has a collection of available locations, named: `/locations/*` - *
  • Each location has a collection of instances and backups, named: `/instances/*` and - * `/backups/*` respectively. - *
  • As such, Cloud Filestore instances are resources of the form: - * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` backups are - * resources of the form: `/projects/{project_id}/locations/{location_id}/backup/{backup_id}` - *
- * - *

Note that location_id can represent a GCP `zone` or `region` depending on the resource. for - * example: A zonal Filestore instance: - * - *

    - *
  • `projects/my-project/locations/us-central1-c/instances/my-basic-tier-filer` A regional - * Filestore instance: - *
  • `projects/my-project/locations/us-central1/instances/my-enterprise-filer` - *
- * - *

Sample for CloudFilestoreManagerClient: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
- *     CloudFilestoreManagerClient.create()) {
- *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
- *   Instance response = cloudFilestoreManagerClient.getInstance(name);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.filestore.v1beta1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStub.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStub.java deleted file mode 100644 index 22e27ef5ad94..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStub.java +++ /dev/null @@ -1,155 +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.filestore.v1beta1.stub; - -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -import com.google.api.core.BetaApi; -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.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CreateBackupRequest; -import com.google.cloud.filestore.v1beta1.CreateInstanceRequest; -import com.google.cloud.filestore.v1beta1.DeleteBackupRequest; -import com.google.cloud.filestore.v1beta1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1beta1.GetBackupRequest; -import com.google.cloud.filestore.v1beta1.GetInstanceRequest; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.ListBackupsRequest; -import com.google.cloud.filestore.v1beta1.ListBackupsResponse; -import com.google.cloud.filestore.v1beta1.ListInstancesRequest; -import com.google.cloud.filestore.v1beta1.ListInstancesResponse; -import com.google.cloud.filestore.v1beta1.RestoreInstanceRequest; -import com.google.cloud.filestore.v1beta1.UpdateBackupRequest; -import com.google.cloud.filestore.v1beta1.UpdateInstanceRequest; -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. -/** - * Base stub class for the CloudFilestoreManager service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class CloudFilestoreManagerStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable - listInstancesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listInstancesPagedCallable()"); - } - - public UnaryCallable listInstancesCallable() { - throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); - } - - public UnaryCallable getInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); - } - - public OperationCallable - createInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createInstanceOperationCallable()"); - } - - public UnaryCallable createInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: createInstanceCallable()"); - } - - public OperationCallable - updateInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateInstanceOperationCallable()"); - } - - public UnaryCallable updateInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: updateInstanceCallable()"); - } - - public OperationCallable - restoreInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: restoreInstanceOperationCallable()"); - } - - public UnaryCallable restoreInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: restoreInstanceCallable()"); - } - - public OperationCallable - deleteInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteInstanceOperationCallable()"); - } - - public UnaryCallable deleteInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); - } - - public UnaryCallable listBackupsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); - } - - public UnaryCallable listBackupsCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); - } - - public UnaryCallable getBackupCallable() { - throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); - } - - public OperationCallable - createBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupOperationCallable()"); - } - - public UnaryCallable createBackupCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); - } - - public OperationCallable - deleteBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); - } - - public UnaryCallable deleteBackupCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); - } - - public OperationCallable - updateBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateBackupOperationCallable()"); - } - - public UnaryCallable updateBackupCallable() { - throw new UnsupportedOperationException("Not implemented: updateBackupCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStubSettings.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStubSettings.java deleted file mode 100644 index 10e0abdbc6b6..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStubSettings.java +++ /dev/null @@ -1,1046 +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.filestore.v1beta1.stub; - -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -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; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -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.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CreateBackupRequest; -import com.google.cloud.filestore.v1beta1.CreateInstanceRequest; -import com.google.cloud.filestore.v1beta1.DeleteBackupRequest; -import com.google.cloud.filestore.v1beta1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1beta1.GetBackupRequest; -import com.google.cloud.filestore.v1beta1.GetInstanceRequest; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.ListBackupsRequest; -import com.google.cloud.filestore.v1beta1.ListBackupsResponse; -import com.google.cloud.filestore.v1beta1.ListInstancesRequest; -import com.google.cloud.filestore.v1beta1.ListInstancesResponse; -import com.google.cloud.filestore.v1beta1.RestoreInstanceRequest; -import com.google.cloud.filestore.v1beta1.UpdateBackupRequest; -import com.google.cloud.filestore.v1beta1.UpdateInstanceRequest; -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; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link CloudFilestoreManagerStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (file.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of getInstance to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * CloudFilestoreManagerStubSettings.Builder cloudFilestoreManagerSettingsBuilder =
- *     CloudFilestoreManagerStubSettings.newBuilder();
- * cloudFilestoreManagerSettingsBuilder
- *     .getInstanceSettings()
- *     .setRetrySettings(
- *         cloudFilestoreManagerSettingsBuilder
- *             .getInstanceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * CloudFilestoreManagerStubSettings cloudFilestoreManagerSettings =
- *     cloudFilestoreManagerSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class CloudFilestoreManagerStubSettings - extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - listInstancesSettings; - private final UnaryCallSettings getInstanceSettings; - private final UnaryCallSettings createInstanceSettings; - private final OperationCallSettings - createInstanceOperationSettings; - private final UnaryCallSettings updateInstanceSettings; - private final OperationCallSettings - updateInstanceOperationSettings; - private final UnaryCallSettings restoreInstanceSettings; - private final OperationCallSettings - restoreInstanceOperationSettings; - private final UnaryCallSettings deleteInstanceSettings; - private final OperationCallSettings - deleteInstanceOperationSettings; - private final PagedCallSettings - listBackupsSettings; - private final UnaryCallSettings getBackupSettings; - private final UnaryCallSettings createBackupSettings; - private final OperationCallSettings - createBackupOperationSettings; - private final UnaryCallSettings deleteBackupSettings; - private final OperationCallSettings - deleteBackupOperationSettings; - private final UnaryCallSettings updateBackupSettings; - private final OperationCallSettings - updateBackupOperationSettings; - - private static final PagedListDescriptor - LIST_INSTANCES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListInstancesRequest injectToken(ListInstancesRequest payload, String token) { - return ListInstancesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListInstancesRequest injectPageSize(ListInstancesRequest payload, int pageSize) { - return ListInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListInstancesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListInstancesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListInstancesResponse payload) { - return payload.getInstancesList() == null - ? ImmutableList.of() - : payload.getInstancesList(); - } - }; - - private static final PagedListDescriptor - LIST_BACKUPS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListBackupsRequest injectToken(ListBackupsRequest payload, String token) { - return ListBackupsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListBackupsRequest injectPageSize(ListBackupsRequest payload, int pageSize) { - return ListBackupsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListBackupsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListBackupsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListBackupsResponse payload) { - return payload.getBackupsList() == null - ? ImmutableList.of() - : payload.getBackupsList(); - } - }; - - private static final PagedListResponseFactory< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - LIST_INSTANCES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListInstancesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_INSTANCES_PAGE_STR_DESC, request, context); - return ListInstancesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - LIST_BACKUPS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListBackupsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_BACKUPS_PAGE_STR_DESC, request, context); - return ListBackupsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listInstances. */ - public PagedCallSettings - listInstancesSettings() { - return listInstancesSettings; - } - - /** Returns the object with the settings used for calls to getInstance. */ - public UnaryCallSettings getInstanceSettings() { - return getInstanceSettings; - } - - /** Returns the object with the settings used for calls to createInstance. */ - public UnaryCallSettings createInstanceSettings() { - return createInstanceSettings; - } - - /** Returns the object with the settings used for calls to createInstance. */ - public OperationCallSettings - createInstanceOperationSettings() { - return createInstanceOperationSettings; - } - - /** 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 restoreInstance. */ - public UnaryCallSettings restoreInstanceSettings() { - return restoreInstanceSettings; - } - - /** Returns the object with the settings used for calls to restoreInstance. */ - public OperationCallSettings - restoreInstanceOperationSettings() { - return restoreInstanceOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public UnaryCallSettings deleteInstanceSettings() { - return deleteInstanceSettings; - } - - /** Returns the object with the settings used for calls to deleteInstance. */ - public OperationCallSettings - deleteInstanceOperationSettings() { - return deleteInstanceOperationSettings; - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return getBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return createBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - /** Returns the object with the settings used for calls to updateBackup. */ - public UnaryCallSettings updateBackupSettings() { - return updateBackupSettings; - } - - /** Returns the object with the settings used for calls to updateBackup. */ - public OperationCallSettings - updateBackupOperationSettings() { - return updateBackupOperationSettings; - } - - public CloudFilestoreManagerStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcCloudFilestoreManagerStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonCloudFilestoreManagerStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "file.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "file.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** 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 defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(CloudFilestoreManagerStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @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(CloudFilestoreManagerStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return CloudFilestoreManagerStubSettings.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); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected CloudFilestoreManagerStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listInstancesSettings = settingsBuilder.listInstancesSettings().build(); - getInstanceSettings = settingsBuilder.getInstanceSettings().build(); - createInstanceSettings = settingsBuilder.createInstanceSettings().build(); - createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build(); - updateInstanceSettings = settingsBuilder.updateInstanceSettings().build(); - updateInstanceOperationSettings = settingsBuilder.updateInstanceOperationSettings().build(); - restoreInstanceSettings = settingsBuilder.restoreInstanceSettings().build(); - restoreInstanceOperationSettings = settingsBuilder.restoreInstanceOperationSettings().build(); - deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); - deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); - listBackupsSettings = settingsBuilder.listBackupsSettings().build(); - getBackupSettings = settingsBuilder.getBackupSettings().build(); - createBackupSettings = settingsBuilder.createBackupSettings().build(); - createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); - deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); - deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); - updateBackupSettings = settingsBuilder.updateBackupSettings().build(); - updateBackupOperationSettings = settingsBuilder.updateBackupOperationSettings().build(); - } - - /** Builder for CloudFilestoreManagerStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - listInstancesSettings; - private final UnaryCallSettings.Builder getInstanceSettings; - private final UnaryCallSettings.Builder - createInstanceSettings; - private final OperationCallSettings.Builder - createInstanceOperationSettings; - private final UnaryCallSettings.Builder - updateInstanceSettings; - private final OperationCallSettings.Builder - updateInstanceOperationSettings; - private final UnaryCallSettings.Builder - restoreInstanceSettings; - private final OperationCallSettings.Builder - restoreInstanceOperationSettings; - private final UnaryCallSettings.Builder - deleteInstanceSettings; - private final OperationCallSettings.Builder - deleteInstanceOperationSettings; - private final PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings; - private final UnaryCallSettings.Builder getBackupSettings; - private final UnaryCallSettings.Builder createBackupSettings; - private final OperationCallSettings.Builder - createBackupOperationSettings; - private final UnaryCallSettings.Builder deleteBackupSettings; - private final OperationCallSettings.Builder - deleteBackupOperationSettings; - private final UnaryCallSettings.Builder updateBackupSettings; - private final OperationCallSettings.Builder - updateBackupOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(250L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(32000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000000L)) - .setTotalTimeout(Duration.ofMillis(60000000L)) - .build(); - definitions.put("no_retry_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(14400000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(14400000L)) - .setTotalTimeout(Duration.ofMillis(14400000L)) - .build(); - definitions.put("no_retry_2_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("no_retry_3_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); - getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createInstanceOperationSettings = OperationCallSettings.newBuilder(); - updateInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateInstanceOperationSettings = OperationCallSettings.newBuilder(); - restoreInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - restoreInstanceOperationSettings = OperationCallSettings.newBuilder(); - deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); - listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); - getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupOperationSettings = OperationCallSettings.newBuilder(); - deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteBackupOperationSettings = OperationCallSettings.newBuilder(); - updateBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateBackupOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listInstancesSettings, - getInstanceSettings, - createInstanceSettings, - updateInstanceSettings, - restoreInstanceSettings, - deleteInstanceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings, - updateBackupSettings); - initDefaults(this); - } - - protected Builder(CloudFilestoreManagerStubSettings settings) { - super(settings); - - listInstancesSettings = settings.listInstancesSettings.toBuilder(); - getInstanceSettings = settings.getInstanceSettings.toBuilder(); - createInstanceSettings = settings.createInstanceSettings.toBuilder(); - createInstanceOperationSettings = settings.createInstanceOperationSettings.toBuilder(); - updateInstanceSettings = settings.updateInstanceSettings.toBuilder(); - updateInstanceOperationSettings = settings.updateInstanceOperationSettings.toBuilder(); - restoreInstanceSettings = settings.restoreInstanceSettings.toBuilder(); - restoreInstanceOperationSettings = settings.restoreInstanceOperationSettings.toBuilder(); - deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); - deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); - listBackupsSettings = settings.listBackupsSettings.toBuilder(); - getBackupSettings = settings.getBackupSettings.toBuilder(); - createBackupSettings = settings.createBackupSettings.toBuilder(); - createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); - deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); - deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); - updateBackupSettings = settings.updateBackupSettings.toBuilder(); - updateBackupOperationSettings = settings.updateBackupOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listInstancesSettings, - getInstanceSettings, - createInstanceSettings, - updateInstanceSettings, - restoreInstanceSettings, - deleteInstanceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings, - updateBackupSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - 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() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); - - builder - .restoreInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); - - builder - .listBackupsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); - - builder - .updateBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); - - builder - .createInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(360000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(7200000L)) - .build())); - - builder - .updateInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(360000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(900000L)) - .build())); - - builder - .restoreInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(360000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(7200000L)) - .build())); - - builder - .deleteInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(360000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(900000L)) - .build())); - - builder - .createBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Backup.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 - .deleteBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.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 - .updateBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Backup.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())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listInstances. */ - public PagedCallSettings.Builder< - ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> - listInstancesSettings() { - return listInstancesSettings; - } - - /** Returns the builder for the settings used for calls to getInstance. */ - public UnaryCallSettings.Builder getInstanceSettings() { - return getInstanceSettings; - } - - /** Returns the builder for the settings used for calls to createInstance. */ - public UnaryCallSettings.Builder createInstanceSettings() { - return createInstanceSettings; - } - - /** Returns the builder for the settings used for calls to createInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createInstanceOperationSettings() { - return createInstanceOperationSettings; - } - - /** 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 restoreInstance. */ - public UnaryCallSettings.Builder restoreInstanceSettings() { - return restoreInstanceSettings; - } - - /** Returns the builder for the settings used for calls to restoreInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - restoreInstanceOperationSettings() { - return restoreInstanceOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - public UnaryCallSettings.Builder deleteInstanceSettings() { - return deleteInstanceSettings; - } - - /** Returns the builder for the settings used for calls to deleteInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteInstanceOperationSettings() { - return deleteInstanceOperationSettings; - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return createBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateBackup. */ - public UnaryCallSettings.Builder updateBackupSettings() { - return updateBackupSettings; - } - - /** Returns the builder for the settings used for calls to updateBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateBackupOperationSettings() { - return updateBackupOperationSettings; - } - - @Override - public CloudFilestoreManagerStubSettings build() throws IOException { - return new CloudFilestoreManagerStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/GrpcCloudFilestoreManagerCallableFactory.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/GrpcCloudFilestoreManagerCallableFactory.java deleted file mode 100644 index 725912662c3b..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/GrpcCloudFilestoreManagerCallableFactory.java +++ /dev/null @@ -1,115 +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.filestore.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -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.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the CloudFilestoreManager service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcCloudFilestoreManagerCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/GrpcCloudFilestoreManagerStub.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/GrpcCloudFilestoreManagerStub.java deleted file mode 100644 index dee2e0e551f1..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/GrpcCloudFilestoreManagerStub.java +++ /dev/null @@ -1,596 +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.filestore.v1beta1.stub; - -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -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.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CreateBackupRequest; -import com.google.cloud.filestore.v1beta1.CreateInstanceRequest; -import com.google.cloud.filestore.v1beta1.DeleteBackupRequest; -import com.google.cloud.filestore.v1beta1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1beta1.GetBackupRequest; -import com.google.cloud.filestore.v1beta1.GetInstanceRequest; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.ListBackupsRequest; -import com.google.cloud.filestore.v1beta1.ListBackupsResponse; -import com.google.cloud.filestore.v1beta1.ListInstancesRequest; -import com.google.cloud.filestore.v1beta1.ListInstancesResponse; -import com.google.cloud.filestore.v1beta1.RestoreInstanceRequest; -import com.google.cloud.filestore.v1beta1.UpdateBackupRequest; -import com.google.cloud.filestore.v1beta1.UpdateInstanceRequest; -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; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the CloudFilestoreManager service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcCloudFilestoreManagerStub extends CloudFilestoreManagerStub { - private static final MethodDescriptor - listInstancesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/ListInstances") - .setRequestMarshaller( - ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1beta1.CloudFilestoreManager/GetInstance") - .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/CreateInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/UpdateInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - restoreInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/RestoreInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(RestoreInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/DeleteInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listBackupsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1beta1.CloudFilestoreManager/ListBackups") - .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.filestore.v1beta1.CloudFilestoreManager/GetBackup") - .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/CreateBackup") - .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/DeleteBackup") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/UpdateBackup") - .setRequestMarshaller(ProtoUtils.marshaller(UpdateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable listInstancesCallable; - private final UnaryCallable - listInstancesPagedCallable; - private final UnaryCallable getInstanceCallable; - private final UnaryCallable createInstanceCallable; - private final OperationCallable - createInstanceOperationCallable; - private final UnaryCallable updateInstanceCallable; - private final OperationCallable - updateInstanceOperationCallable; - private final UnaryCallable restoreInstanceCallable; - private final OperationCallable - restoreInstanceOperationCallable; - private final UnaryCallable deleteInstanceCallable; - private final OperationCallable - deleteInstanceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - private final UnaryCallable updateBackupCallable; - private final OperationCallable - updateBackupOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcCloudFilestoreManagerStub create( - CloudFilestoreManagerStubSettings settings) throws IOException { - return new GrpcCloudFilestoreManagerStub(settings, ClientContext.create(settings)); - } - - public static final GrpcCloudFilestoreManagerStub create(ClientContext clientContext) - throws IOException { - return new GrpcCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcCloudFilestoreManagerStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcCloudFilestoreManagerStub, 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 GrpcCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcCloudFilestoreManagerCallableFactory()); - } - - /** - * Constructs an instance of GrpcCloudFilestoreManagerStub, 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 GrpcCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings listInstancesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listInstancesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - 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 restoreInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(restoreInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteInstanceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listBackupsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("backup.name", String.valueOf(request.getBackup().getName())); - return params.build(); - }) - .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.createInstanceCallable = - callableFactory.createUnaryCallable( - createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); - this.createInstanceOperationCallable = - callableFactory.createOperationCallable( - createInstanceTransportSettings, - settings.createInstanceOperationSettings(), - clientContext, - operationsStub); - this.updateInstanceCallable = - callableFactory.createUnaryCallable( - updateInstanceTransportSettings, settings.updateInstanceSettings(), clientContext); - this.updateInstanceOperationCallable = - callableFactory.createOperationCallable( - updateInstanceTransportSettings, - settings.updateInstanceOperationSettings(), - clientContext, - operationsStub); - this.restoreInstanceCallable = - callableFactory.createUnaryCallable( - restoreInstanceTransportSettings, settings.restoreInstanceSettings(), clientContext); - this.restoreInstanceOperationCallable = - callableFactory.createOperationCallable( - restoreInstanceTransportSettings, - settings.restoreInstanceOperationSettings(), - clientContext, - operationsStub); - this.deleteInstanceCallable = - callableFactory.createUnaryCallable( - deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); - this.deleteInstanceOperationCallable = - callableFactory.createOperationCallable( - deleteInstanceTransportSettings, - settings.deleteInstanceOperationSettings(), - clientContext, - operationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - operationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - operationsStub); - this.updateBackupCallable = - callableFactory.createUnaryCallable( - updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); - this.updateBackupOperationCallable = - callableFactory.createOperationCallable( - updateBackupTransportSettings, - settings.updateBackupOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listInstancesCallable() { - return listInstancesCallable; - } - - @Override - public UnaryCallable - listInstancesPagedCallable() { - return listInstancesPagedCallable; - } - - @Override - public UnaryCallable getInstanceCallable() { - return getInstanceCallable; - } - - @Override - public UnaryCallable createInstanceCallable() { - return createInstanceCallable; - } - - @Override - public OperationCallable - createInstanceOperationCallable() { - return createInstanceOperationCallable; - } - - @Override - public UnaryCallable updateInstanceCallable() { - return updateInstanceCallable; - } - - @Override - public OperationCallable - updateInstanceOperationCallable() { - return updateInstanceOperationCallable; - } - - @Override - public UnaryCallable restoreInstanceCallable() { - return restoreInstanceCallable; - } - - @Override - public OperationCallable - restoreInstanceOperationCallable() { - return restoreInstanceOperationCallable; - } - - @Override - public UnaryCallable deleteInstanceCallable() { - return deleteInstanceCallable; - } - - @Override - public OperationCallable - deleteInstanceOperationCallable() { - return deleteInstanceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public UnaryCallable updateBackupCallable() { - return updateBackupCallable; - } - - @Override - public OperationCallable - updateBackupOperationCallable() { - return updateBackupOperationCallable; - } - - @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/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/HttpJsonCloudFilestoreManagerCallableFactory.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/HttpJsonCloudFilestoreManagerCallableFactory.java deleted file mode 100644 index a8e8ca24d3f8..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/HttpJsonCloudFilestoreManagerCallableFactory.java +++ /dev/null @@ -1,105 +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.filestore.v1beta1.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 CloudFilestoreManager service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonCloudFilestoreManagerCallableFactory - 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/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/HttpJsonCloudFilestoreManagerStub.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/HttpJsonCloudFilestoreManagerStub.java deleted file mode 100644 index ecc17f31a523..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/HttpJsonCloudFilestoreManagerStub.java +++ /dev/null @@ -1,884 +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.filestore.v1beta1.stub; - -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -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.longrunning.OperationSnapshot; -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.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CreateBackupRequest; -import com.google.cloud.filestore.v1beta1.CreateInstanceRequest; -import com.google.cloud.filestore.v1beta1.DeleteBackupRequest; -import com.google.cloud.filestore.v1beta1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1beta1.GetBackupRequest; -import com.google.cloud.filestore.v1beta1.GetInstanceRequest; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.ListBackupsRequest; -import com.google.cloud.filestore.v1beta1.ListBackupsResponse; -import com.google.cloud.filestore.v1beta1.ListInstancesRequest; -import com.google.cloud.filestore.v1beta1.ListInstancesResponse; -import com.google.cloud.filestore.v1beta1.RestoreInstanceRequest; -import com.google.cloud.filestore.v1beta1.UpdateBackupRequest; -import com.google.cloud.filestore.v1beta1.UpdateInstanceRequest; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -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 CloudFilestoreManager service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonCloudFilestoreManagerStub extends CloudFilestoreManagerStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .add(Instance.getDescriptor()) - .add(Backup.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listInstancesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/ListInstances") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{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, "orderBy", request.getOrderBy()); - 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.filestore.v1beta1.CloudFilestoreManager/GetInstance") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{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 - createInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/CreateInstance") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{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, "instanceId", request.getInstanceId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("instance", request.getInstance())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateInstanceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/UpdateInstance") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{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 - restoreInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/RestoreInstance") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{name=projects/*/locations/*/instances/*}:restore", - 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( - (RestoreInstanceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteInstanceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/DeleteInstance") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{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(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteInstanceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - listBackupsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1beta1.CloudFilestoreManager/ListBackups") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{parent=projects/*/locations/*}/backups", - 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, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListBackupsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.filestore.v1beta1.CloudFilestoreManager/GetBackup") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{name=projects/*/locations/*/backups/*}", - 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(Backup.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/CreateBackup") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{parent=projects/*/locations/*}/backups", - 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, "backupId", request.getBackupId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create().toBody("backup", request.getBackup())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/DeleteBackup") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{name=projects/*/locations/*/backups/*}", - 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(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.filestore.v1beta1.CloudFilestoreManager/UpdateBackup") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{backup.name=projects/*/locations/*/backups/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "backup.name", request.getBackup().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("backup", request.getBackup())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable listInstancesCallable; - private final UnaryCallable - listInstancesPagedCallable; - private final UnaryCallable getInstanceCallable; - private final UnaryCallable createInstanceCallable; - private final OperationCallable - createInstanceOperationCallable; - private final UnaryCallable updateInstanceCallable; - private final OperationCallable - updateInstanceOperationCallable; - private final UnaryCallable restoreInstanceCallable; - private final OperationCallable - restoreInstanceOperationCallable; - private final UnaryCallable deleteInstanceCallable; - private final OperationCallable - deleteInstanceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - private final UnaryCallable updateBackupCallable; - private final OperationCallable - updateBackupOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonCloudFilestoreManagerStub create( - CloudFilestoreManagerStubSettings settings) throws IOException { - return new HttpJsonCloudFilestoreManagerStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonCloudFilestoreManagerStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonCloudFilestoreManagerStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonCloudFilestoreManagerStub, 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 HttpJsonCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonCloudFilestoreManagerCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonCloudFilestoreManagerStub, 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 HttpJsonCloudFilestoreManagerStub( - CloudFilestoreManagerStubSettings 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 createInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings restoreInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(restoreInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteInstanceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteInstanceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listBackupsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateBackupMethodDescriptor) - .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.createInstanceCallable = - callableFactory.createUnaryCallable( - createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); - this.createInstanceOperationCallable = - callableFactory.createOperationCallable( - createInstanceTransportSettings, - settings.createInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateInstanceCallable = - callableFactory.createUnaryCallable( - updateInstanceTransportSettings, settings.updateInstanceSettings(), clientContext); - this.updateInstanceOperationCallable = - callableFactory.createOperationCallable( - updateInstanceTransportSettings, - settings.updateInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.restoreInstanceCallable = - callableFactory.createUnaryCallable( - restoreInstanceTransportSettings, settings.restoreInstanceSettings(), clientContext); - this.restoreInstanceOperationCallable = - callableFactory.createOperationCallable( - restoreInstanceTransportSettings, - settings.restoreInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteInstanceCallable = - callableFactory.createUnaryCallable( - deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); - this.deleteInstanceOperationCallable = - callableFactory.createOperationCallable( - deleteInstanceTransportSettings, - settings.deleteInstanceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateBackupCallable = - callableFactory.createUnaryCallable( - updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); - this.updateBackupOperationCallable = - callableFactory.createOperationCallable( - updateBackupTransportSettings, - settings.updateBackupOperationSettings(), - 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(createInstanceMethodDescriptor); - methodDescriptors.add(updateInstanceMethodDescriptor); - methodDescriptors.add(restoreInstanceMethodDescriptor); - methodDescriptors.add(deleteInstanceMethodDescriptor); - methodDescriptors.add(listBackupsMethodDescriptor); - methodDescriptors.add(getBackupMethodDescriptor); - methodDescriptors.add(createBackupMethodDescriptor); - methodDescriptors.add(deleteBackupMethodDescriptor); - methodDescriptors.add(updateBackupMethodDescriptor); - 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 createInstanceCallable() { - return createInstanceCallable; - } - - @Override - public OperationCallable - createInstanceOperationCallable() { - return createInstanceOperationCallable; - } - - @Override - public UnaryCallable updateInstanceCallable() { - return updateInstanceCallable; - } - - @Override - public OperationCallable - updateInstanceOperationCallable() { - return updateInstanceOperationCallable; - } - - @Override - public UnaryCallable restoreInstanceCallable() { - return restoreInstanceCallable; - } - - @Override - public OperationCallable - restoreInstanceOperationCallable() { - return restoreInstanceOperationCallable; - } - - @Override - public UnaryCallable deleteInstanceCallable() { - return deleteInstanceCallable; - } - - @Override - public OperationCallable - deleteInstanceOperationCallable() { - return deleteInstanceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public UnaryCallable updateBackupCallable() { - return updateBackupCallable; - } - - @Override - public OperationCallable - updateBackupOperationCallable() { - return updateBackupOperationCallable; - } - - @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/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerClientHttpJsonTest.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerClientHttpJsonTest.java deleted file mode 100644 index 980eca1d9a83..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerClientHttpJsonTest.java +++ /dev/null @@ -1,1154 +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.filestore.v1beta1; - -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -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.filestore.v1beta1.stub.HttpJsonCloudFilestoreManagerStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.BoolValue; -import com.google.protobuf.Empty; -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 CloudFilestoreManagerClientHttpJsonTest { - private static MockHttpService mockService; - private static CloudFilestoreManagerClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonCloudFilestoreManagerStub.getMethodDescriptors(), - CloudFilestoreManagerSettings.getDefaultEndpoint()); - CloudFilestoreManagerSettings settings = - CloudFilestoreManagerSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - CloudFilestoreManagerSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = CloudFilestoreManagerClient.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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .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 createInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).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 createInstanceExceptionTest() 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]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createInstanceTest2() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).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 createInstanceExceptionTest2() 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"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateInstanceAsync(instance, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - - Instance actualResponse = client.restoreInstanceAsync(request).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 restoreInstanceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - client.restoreInstanceAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteInstanceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - client.deleteInstanceAsync(name).get(); - - 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 deleteInstanceExceptionTest() 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.deleteInstanceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteInstanceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; - - client.deleteInstanceAsync(name).get(); - - 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 deleteInstanceExceptionTest2() 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.deleteInstanceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().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 listBackupsExceptionTest() 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.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().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 listBackupsExceptionTest2() 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.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(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 getBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-1607/locations/location-1607/backups/backup-1607"; - - Backup actualResponse = client.getBackup(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 getBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-1607/locations/location-1607/backups/backup-1607"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).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 createBackupExceptionTest() 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]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).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 createBackupExceptionTest2() 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"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - 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 deleteBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-1607/locations/location-1607/backups/backup-1607"; - - client.deleteBackupAsync(name).get(); - - 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 deleteBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-1607/locations/location-1607/backups/backup-1607"; - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Backup backup = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Backup actualResponse = client.updateBackupAsync(backup, 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 updateBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Backup backup = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance( - InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateBackupAsync(backup, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerClientTest.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerClientTest.java deleted file mode 100644 index 1ba3101b33f7..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerClientTest.java +++ /dev/null @@ -1,1044 +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.filestore.v1beta1; - -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListBackupsPagedResponse; -import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListInstancesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.BoolValue; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -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 CloudFilestoreManagerClientTest { - private static MockCloudFilestoreManager mockCloudFilestoreManager; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private CloudFilestoreManagerClient client; - - @BeforeClass - public static void startStaticServer() { - mockCloudFilestoreManager = new MockCloudFilestoreManager(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockCloudFilestoreManager)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - CloudFilestoreManagerSettings settings = - CloudFilestoreManagerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = CloudFilestoreManagerClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listInstancesTest() throws Exception { - Instance responsesElement = Instance.newBuilder().build(); - ListInstancesResponse expectedResponse = - ListInstancesResponse.newBuilder() - .setNextPageToken("") - .addAllInstances(Arrays.asList(responsesElement)) - .build(); - mockCloudFilestoreManager.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 = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInstancesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.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(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - 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 = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInstancesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String parent = "parent-995424086"; - 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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - Instance actualResponse = client.getInstance(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.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()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - String name = "name3373707"; - - Instance actualResponse = client.getInstance(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getInstanceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String name = "name3373707"; - client.getInstance(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(instance, actualRequest.getInstance()); - Assert.assertEquals(instanceId, actualRequest.getInstanceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).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()); - } - } - - @Test - public void createInstanceTest2() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - String parent = "parent-995424086"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - - Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(instance, actualRequest.getInstance()); - Assert.assertEquals(instanceId, actualRequest.getInstanceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInstanceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String parent = "parent-995424086"; - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - client.createInstanceAsync(parent, instance, instanceId).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()); - } - } - - @Test - public void updateInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - Instance instance = Instance.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Instance actualResponse = client.updateInstanceAsync(instance, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateInstanceRequest actualRequest = ((UpdateInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(instance, actualRequest.getInstance()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - 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()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreInstanceTest() throws Exception { - Instance expectedResponse = - Instance.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setDescription("description-1724546052") - .setStatusMessage("statusMessage-958704715") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllFileShares(new ArrayList()) - .addAllNetworks(new ArrayList()) - .setEtag("etag3123477") - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - - Instance actualResponse = client.restoreInstanceAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreInstanceRequest actualRequest = ((RestoreInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertEquals(request.getFileShare(), actualRequest.getFileShare()); - Assert.assertEquals(request.getSourceSnapshot(), actualRequest.getSourceSnapshot()); - Assert.assertEquals(request.getSourceBackup(), actualRequest.getSourceBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - client.restoreInstanceAsync(request).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()); - } - } - - @Test - public void deleteInstanceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - - client.deleteInstanceAsync(name).get(); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - client.deleteInstanceAsync(name).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()); - } - } - - @Test - public void deleteInstanceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteInstanceAsync(name).get(); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteInstanceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String name = "name3373707"; - client.deleteInstanceAsync(name).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()); - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String parent = "parent-995424086"; - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - mockCloudFilestoreManager.addResponse(expectedResponse); - - String name = "name3373707"; - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String name = "name3373707"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).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()); - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).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()); - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - client.deleteBackupAsync(name).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()); - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - String name = "name3373707"; - client.deleteBackupAsync(name).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()); - } - } - - @Test - public void updateBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setCapacityGb(-1923585408) - .setStorageBytes(2035244455) - .setSourceInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setSourceFileShare("sourceFileShare-646832664") - .setDownloadBytes(971924980) - .setSatisfiesPzs(BoolValue.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudFilestoreManager.addResponse(resultOperation); - - Backup backup = Backup.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Backup actualResponse = client.updateBackupAsync(backup, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudFilestoreManager.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateBackupRequest actualRequest = ((UpdateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockCloudFilestoreManager.addException(exception); - - try { - Backup backup = Backup.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateBackupAsync(backup, 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/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/MockCloudFilestoreManager.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/MockCloudFilestoreManager.java deleted file mode 100644 index 4849c519bbd8..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/MockCloudFilestoreManager.java +++ /dev/null @@ -1,59 +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.filestore.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockCloudFilestoreManager implements MockGrpcService { - private final MockCloudFilestoreManagerImpl serviceImpl; - - public MockCloudFilestoreManager() { - serviceImpl = new MockCloudFilestoreManagerImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/MockCloudFilestoreManagerImpl.java b/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/MockCloudFilestoreManagerImpl.java deleted file mode 100644 index e8d3f63369b6..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/google-cloud-filestore/src/test/java/com/google/cloud/filestore/v1beta1/MockCloudFilestoreManagerImpl.java +++ /dev/null @@ -1,290 +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.filestore.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerGrpc.CloudFilestoreManagerImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockCloudFilestoreManagerImpl extends CloudFilestoreManagerImplBase { - private List requests; - private Queue responses; - - public MockCloudFilestoreManagerImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void listInstances( - ListInstancesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListInstancesResponse) { - requests.add(request); - responseObserver.onNext(((ListInstancesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListInstances, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListInstancesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Instance) { - requests.add(request); - responseObserver.onNext(((Instance) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Instance.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createInstance( - CreateInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateInstance( - UpdateInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void restoreInstance( - RestoreInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method RestoreInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteInstance( - DeleteInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteInstance, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listBackups( - ListBackupsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListBackupsResponse) { - requests.add(request); - responseObserver.onNext(((ListBackupsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListBackups, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListBackupsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getBackup(GetBackupRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Backup) { - requests.add(request); - responseObserver.onNext(((Backup) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetBackup, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Backup.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createBackup( - CreateBackupRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateBackup, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteBackup( - DeleteBackupRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteBackup, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateBackup( - UpdateBackupRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateBackup, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/grpc-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerGrpc.java b/owl-bot-staging/java-filestore/v1beta1/grpc-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerGrpc.java deleted file mode 100644 index c5d91e61d85e..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/grpc-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreManagerGrpc.java +++ /dev/null @@ -1,1285 +0,0 @@ -package com.google.cloud.filestore.v1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Configures and manages Cloud Filestore resources.
- * Cloud Filestore Manager v1beta1.
- * The `file.googleapis.com` service implements the Cloud Filestore API and
- * defines the following model for managing resources:
- * * The service works with a collection of cloud projects, named: `/projects/*`
- * * Each project has a collection of available locations, named: `/locations/*`
- * * Each location has a collection of instances and backups, named:
- * `/instances/*` and `/backups/*` respectively.
- * * As such, Cloud Filestore instances are resources of the form:
- *   `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
- *   backups are resources of the form:
- *   `/projects/{project_id}/locations/{location_id}/backup/{backup_id}`
- * Note that location_id can represent a GCP `zone` or `region` depending on the
- * resource.
- * for example:
- * A zonal Filestore instance:
- * * `projects/my-project/locations/us-central1-c/instances/my-basic-tier-filer`
- * A regional Filestore instance:
- * * `projects/my-project/locations/us-central1/instances/my-enterprise-filer`
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class CloudFilestoreManagerGrpc { - - private CloudFilestoreManagerGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.filestore.v1beta1.CloudFilestoreManager"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getListInstancesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListInstances", - requestType = com.google.cloud.filestore.v1beta1.ListInstancesRequest.class, - responseType = com.google.cloud.filestore.v1beta1.ListInstancesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListInstancesMethod() { - io.grpc.MethodDescriptor getListInstancesMethod; - if ((getListInstancesMethod = CloudFilestoreManagerGrpc.getListInstancesMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getListInstancesMethod = CloudFilestoreManagerGrpc.getListInstancesMethod) == null) { - CloudFilestoreManagerGrpc.getListInstancesMethod = getListInstancesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.ListInstancesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.ListInstancesResponse.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("ListInstances")) - .build(); - } - } - } - return getListInstancesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetInstance", - requestType = com.google.cloud.filestore.v1beta1.GetInstanceRequest.class, - responseType = com.google.cloud.filestore.v1beta1.Instance.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetInstanceMethod() { - io.grpc.MethodDescriptor getGetInstanceMethod; - if ((getGetInstanceMethod = CloudFilestoreManagerGrpc.getGetInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getGetInstanceMethod = CloudFilestoreManagerGrpc.getGetInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getGetInstanceMethod = getGetInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.GetInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("GetInstance")) - .build(); - } - } - } - return getGetInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateInstance", - requestType = com.google.cloud.filestore.v1beta1.CreateInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateInstanceMethod() { - io.grpc.MethodDescriptor getCreateInstanceMethod; - if ((getCreateInstanceMethod = CloudFilestoreManagerGrpc.getCreateInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getCreateInstanceMethod = CloudFilestoreManagerGrpc.getCreateInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getCreateInstanceMethod = getCreateInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.CreateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("CreateInstance")) - .build(); - } - } - } - return getCreateInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateInstance", - requestType = com.google.cloud.filestore.v1beta1.UpdateInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateInstanceMethod() { - io.grpc.MethodDescriptor getUpdateInstanceMethod; - if ((getUpdateInstanceMethod = CloudFilestoreManagerGrpc.getUpdateInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getUpdateInstanceMethod = CloudFilestoreManagerGrpc.getUpdateInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getUpdateInstanceMethod = getUpdateInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.UpdateInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("UpdateInstance")) - .build(); - } - } - } - return getUpdateInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getRestoreInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RestoreInstance", - requestType = com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRestoreInstanceMethod() { - io.grpc.MethodDescriptor getRestoreInstanceMethod; - if ((getRestoreInstanceMethod = CloudFilestoreManagerGrpc.getRestoreInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getRestoreInstanceMethod = CloudFilestoreManagerGrpc.getRestoreInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getRestoreInstanceMethod = getRestoreInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("RestoreInstance")) - .build(); - } - } - } - return getRestoreInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", - requestType = com.google.cloud.filestore.v1beta1.DeleteInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteInstanceMethod() { - io.grpc.MethodDescriptor getDeleteInstanceMethod; - if ((getDeleteInstanceMethod = CloudFilestoreManagerGrpc.getDeleteInstanceMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getDeleteInstanceMethod = CloudFilestoreManagerGrpc.getDeleteInstanceMethod) == null) { - CloudFilestoreManagerGrpc.getDeleteInstanceMethod = getDeleteInstanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.DeleteInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("DeleteInstance")) - .build(); - } - } - } - return getDeleteInstanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListBackupsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListBackups", - requestType = com.google.cloud.filestore.v1beta1.ListBackupsRequest.class, - responseType = com.google.cloud.filestore.v1beta1.ListBackupsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListBackupsMethod() { - io.grpc.MethodDescriptor getListBackupsMethod; - if ((getListBackupsMethod = CloudFilestoreManagerGrpc.getListBackupsMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getListBackupsMethod = CloudFilestoreManagerGrpc.getListBackupsMethod) == null) { - CloudFilestoreManagerGrpc.getListBackupsMethod = getListBackupsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackups")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.ListBackupsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.ListBackupsResponse.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("ListBackups")) - .build(); - } - } - } - return getListBackupsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBackup", - requestType = com.google.cloud.filestore.v1beta1.GetBackupRequest.class, - responseType = com.google.cloud.filestore.v1beta1.Backup.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetBackupMethod() { - io.grpc.MethodDescriptor getGetBackupMethod; - if ((getGetBackupMethod = CloudFilestoreManagerGrpc.getGetBackupMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getGetBackupMethod = CloudFilestoreManagerGrpc.getGetBackupMethod) == null) { - CloudFilestoreManagerGrpc.getGetBackupMethod = getGetBackupMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.GetBackupRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("GetBackup")) - .build(); - } - } - } - return getGetBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateBackup", - requestType = com.google.cloud.filestore.v1beta1.CreateBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateBackupMethod() { - io.grpc.MethodDescriptor getCreateBackupMethod; - if ((getCreateBackupMethod = CloudFilestoreManagerGrpc.getCreateBackupMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getCreateBackupMethod = CloudFilestoreManagerGrpc.getCreateBackupMethod) == null) { - CloudFilestoreManagerGrpc.getCreateBackupMethod = getCreateBackupMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.CreateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("CreateBackup")) - .build(); - } - } - } - return getCreateBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", - requestType = com.google.cloud.filestore.v1beta1.DeleteBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteBackupMethod() { - io.grpc.MethodDescriptor getDeleteBackupMethod; - if ((getDeleteBackupMethod = CloudFilestoreManagerGrpc.getDeleteBackupMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getDeleteBackupMethod = CloudFilestoreManagerGrpc.getDeleteBackupMethod) == null) { - CloudFilestoreManagerGrpc.getDeleteBackupMethod = getDeleteBackupMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.DeleteBackupRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("DeleteBackup")) - .build(); - } - } - } - return getDeleteBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateBackup", - requestType = com.google.cloud.filestore.v1beta1.UpdateBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateBackupMethod() { - io.grpc.MethodDescriptor getUpdateBackupMethod; - if ((getUpdateBackupMethod = CloudFilestoreManagerGrpc.getUpdateBackupMethod) == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - if ((getUpdateBackupMethod = CloudFilestoreManagerGrpc.getUpdateBackupMethod) == null) { - CloudFilestoreManagerGrpc.getUpdateBackupMethod = getUpdateBackupMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.filestore.v1beta1.UpdateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudFilestoreManagerMethodDescriptorSupplier("UpdateBackup")) - .build(); - } - } - } - return getUpdateBackupMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static CloudFilestoreManagerStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public CloudFilestoreManagerStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerStub(channel, callOptions); - } - }; - return CloudFilestoreManagerStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static CloudFilestoreManagerBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public CloudFilestoreManagerBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerBlockingStub(channel, callOptions); - } - }; - return CloudFilestoreManagerBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static CloudFilestoreManagerFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public CloudFilestoreManagerFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerFutureStub(channel, callOptions); - } - }; - return CloudFilestoreManagerFutureStub.newStub(factory, channel); - } - - /** - *
-   * Configures and manages Cloud Filestore resources.
-   * Cloud Filestore Manager v1beta1.
-   * The `file.googleapis.com` service implements the Cloud Filestore API and
-   * defines the following model for managing resources:
-   * * The service works with a collection of cloud projects, named: `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   * * Each location has a collection of instances and backups, named:
-   * `/instances/*` and `/backups/*` respectively.
-   * * As such, Cloud Filestore instances are resources of the form:
-   *   `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   *   backups are resources of the form:
-   *   `/projects/{project_id}/locations/{location_id}/backup/{backup_id}`
-   * Note that location_id can represent a GCP `zone` or `region` depending on the
-   * resource.
-   * for example:
-   * A zonal Filestore instance:
-   * * `projects/my-project/locations/us-central1-c/instances/my-basic-tier-filer`
-   * A regional Filestore instance:
-   * * `projects/my-project/locations/us-central1/instances/my-enterprise-filer`
-   * 
- */ - public static abstract class CloudFilestoreManagerImplBase implements io.grpc.BindableService { - - /** - *
-     * Lists all instances in a project for either a specified location
-     * or for all locations.
-     * 
- */ - public void listInstances(com.google.cloud.filestore.v1beta1.ListInstancesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListInstancesMethod(), responseObserver); - } - - /** - *
-     * Gets the details of a specific instance.
-     * 
- */ - public void getInstance(com.google.cloud.filestore.v1beta1.GetInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstanceMethod(), responseObserver); - } - - /** - *
-     * Creates an instance.
-     * When creating from a backup, the capacity of the new instance needs to be
-     * equal to or larger than the capacity of the backup (and also equal to or
-     * larger than the minimum capacity of the tier).
-     * 
- */ - public void createInstance(com.google.cloud.filestore.v1beta1.CreateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateInstanceMethod(), responseObserver); - } - - /** - *
-     * Updates the settings of a specific instance.
-     * 
- */ - public void updateInstance(com.google.cloud.filestore.v1beta1.UpdateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateInstanceMethod(), responseObserver); - } - - /** - *
-     * Restores an existing instance's file share from a backup.
-     * The capacity of the instance needs to be equal to or larger than the
-     * capacity of the backup (and also equal to or larger than the minimum
-     * capacity of the tier).
-     * 
- */ - public void restoreInstance(com.google.cloud.filestore.v1beta1.RestoreInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRestoreInstanceMethod(), responseObserver); - } - - /** - *
-     * Deletes an instance.
-     * 
- */ - public void deleteInstance(com.google.cloud.filestore.v1beta1.DeleteInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteInstanceMethod(), responseObserver); - } - - /** - *
-     * Lists all backups in a project for either a specified location or for all
-     * locations.
-     * 
- */ - public void listBackups(com.google.cloud.filestore.v1beta1.ListBackupsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListBackupsMethod(), responseObserver); - } - - /** - *
-     * Gets the details of a specific backup.
-     * 
- */ - public void getBackup(com.google.cloud.filestore.v1beta1.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); - } - - /** - *
-     * Creates a backup.
-     * 
- */ - public void createBackup(com.google.cloud.filestore.v1beta1.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateBackupMethod(), responseObserver); - } - - /** - *
-     * Deletes a backup.
-     * 
- */ - public void deleteBackup(com.google.cloud.filestore.v1beta1.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteBackupMethod(), responseObserver); - } - - /** - *
-     * Updates the settings of a specific backup.
-     * 
- */ - public void updateBackup(com.google.cloud.filestore.v1beta1.UpdateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateBackupMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListInstancesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.ListInstancesRequest, - com.google.cloud.filestore.v1beta1.ListInstancesResponse>( - this, METHODID_LIST_INSTANCES))) - .addMethod( - getGetInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.GetInstanceRequest, - com.google.cloud.filestore.v1beta1.Instance>( - this, METHODID_GET_INSTANCE))) - .addMethod( - getCreateInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.CreateInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_CREATE_INSTANCE))) - .addMethod( - getUpdateInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.UpdateInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_UPDATE_INSTANCE))) - .addMethod( - getRestoreInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.RestoreInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_RESTORE_INSTANCE))) - .addMethod( - getDeleteInstanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.DeleteInstanceRequest, - com.google.longrunning.Operation>( - this, METHODID_DELETE_INSTANCE))) - .addMethod( - getListBackupsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.ListBackupsRequest, - com.google.cloud.filestore.v1beta1.ListBackupsResponse>( - this, METHODID_LIST_BACKUPS))) - .addMethod( - getGetBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.GetBackupRequest, - com.google.cloud.filestore.v1beta1.Backup>( - this, METHODID_GET_BACKUP))) - .addMethod( - getCreateBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.CreateBackupRequest, - com.google.longrunning.Operation>( - this, METHODID_CREATE_BACKUP))) - .addMethod( - getDeleteBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.DeleteBackupRequest, - com.google.longrunning.Operation>( - this, METHODID_DELETE_BACKUP))) - .addMethod( - getUpdateBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.filestore.v1beta1.UpdateBackupRequest, - com.google.longrunning.Operation>( - this, METHODID_UPDATE_BACKUP))) - .build(); - } - } - - /** - *
-   * Configures and manages Cloud Filestore resources.
-   * Cloud Filestore Manager v1beta1.
-   * The `file.googleapis.com` service implements the Cloud Filestore API and
-   * defines the following model for managing resources:
-   * * The service works with a collection of cloud projects, named: `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   * * Each location has a collection of instances and backups, named:
-   * `/instances/*` and `/backups/*` respectively.
-   * * As such, Cloud Filestore instances are resources of the form:
-   *   `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   *   backups are resources of the form:
-   *   `/projects/{project_id}/locations/{location_id}/backup/{backup_id}`
-   * Note that location_id can represent a GCP `zone` or `region` depending on the
-   * resource.
-   * for example:
-   * A zonal Filestore instance:
-   * * `projects/my-project/locations/us-central1-c/instances/my-basic-tier-filer`
-   * A regional Filestore instance:
-   * * `projects/my-project/locations/us-central1/instances/my-enterprise-filer`
-   * 
- */ - public static final class CloudFilestoreManagerStub extends io.grpc.stub.AbstractAsyncStub { - private CloudFilestoreManagerStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected CloudFilestoreManagerStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerStub(channel, callOptions); - } - - /** - *
-     * Lists all instances in a project for either a specified location
-     * or for all locations.
-     * 
- */ - public void listInstances(com.google.cloud.filestore.v1beta1.ListInstancesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListInstancesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the details of a specific instance.
-     * 
- */ - public void getInstance(com.google.cloud.filestore.v1beta1.GetInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates an instance.
-     * When creating from a backup, the capacity of the new instance needs to be
-     * equal to or larger than the capacity of the backup (and also equal to or
-     * larger than the minimum capacity of the tier).
-     * 
- */ - public void createInstance(com.google.cloud.filestore.v1beta1.CreateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the settings of a specific instance.
-     * 
- */ - public void updateInstance(com.google.cloud.filestore.v1beta1.UpdateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Restores an existing instance's file share from a backup.
-     * The capacity of the instance needs to be equal to or larger than the
-     * capacity of the backup (and also equal to or larger than the minimum
-     * capacity of the tier).
-     * 
- */ - public void restoreInstance(com.google.cloud.filestore.v1beta1.RestoreInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRestoreInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes an instance.
-     * 
- */ - public void deleteInstance(com.google.cloud.filestore.v1beta1.DeleteInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists all backups in a project for either a specified location or for all
-     * locations.
-     * 
- */ - public void listBackups(com.google.cloud.filestore.v1beta1.ListBackupsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the details of a specific backup.
-     * 
- */ - public void getBackup(com.google.cloud.filestore.v1beta1.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a backup.
-     * 
- */ - public void createBackup(com.google.cloud.filestore.v1beta1.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a backup.
-     * 
- */ - public void deleteBackup(com.google.cloud.filestore.v1beta1.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the settings of a specific backup.
-     * 
- */ - public void updateBackup(com.google.cloud.filestore.v1beta1.UpdateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Configures and manages Cloud Filestore resources.
-   * Cloud Filestore Manager v1beta1.
-   * The `file.googleapis.com` service implements the Cloud Filestore API and
-   * defines the following model for managing resources:
-   * * The service works with a collection of cloud projects, named: `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   * * Each location has a collection of instances and backups, named:
-   * `/instances/*` and `/backups/*` respectively.
-   * * As such, Cloud Filestore instances are resources of the form:
-   *   `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   *   backups are resources of the form:
-   *   `/projects/{project_id}/locations/{location_id}/backup/{backup_id}`
-   * Note that location_id can represent a GCP `zone` or `region` depending on the
-   * resource.
-   * for example:
-   * A zonal Filestore instance:
-   * * `projects/my-project/locations/us-central1-c/instances/my-basic-tier-filer`
-   * A regional Filestore instance:
-   * * `projects/my-project/locations/us-central1/instances/my-enterprise-filer`
-   * 
- */ - public static final class CloudFilestoreManagerBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private CloudFilestoreManagerBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected CloudFilestoreManagerBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerBlockingStub(channel, callOptions); - } - - /** - *
-     * Lists all instances in a project for either a specified location
-     * or for all locations.
-     * 
- */ - public com.google.cloud.filestore.v1beta1.ListInstancesResponse listInstances(com.google.cloud.filestore.v1beta1.ListInstancesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListInstancesMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the details of a specific instance.
-     * 
- */ - public com.google.cloud.filestore.v1beta1.Instance getInstance(com.google.cloud.filestore.v1beta1.GetInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates an instance.
-     * When creating from a backup, the capacity of the new instance needs to be
-     * equal to or larger than the capacity of the backup (and also equal to or
-     * larger than the minimum capacity of the tier).
-     * 
- */ - public com.google.longrunning.Operation createInstance(com.google.cloud.filestore.v1beta1.CreateInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the settings of a specific instance.
-     * 
- */ - public com.google.longrunning.Operation updateInstance(com.google.cloud.filestore.v1beta1.UpdateInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Restores an existing instance's file share from a backup.
-     * The capacity of the instance needs to be equal to or larger than the
-     * capacity of the backup (and also equal to or larger than the minimum
-     * capacity of the tier).
-     * 
- */ - public com.google.longrunning.Operation restoreInstance(com.google.cloud.filestore.v1beta1.RestoreInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRestoreInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes an instance.
-     * 
- */ - public com.google.longrunning.Operation deleteInstance(com.google.cloud.filestore.v1beta1.DeleteInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists all backups in a project for either a specified location or for all
-     * locations.
-     * 
- */ - public com.google.cloud.filestore.v1beta1.ListBackupsResponse listBackups(com.google.cloud.filestore.v1beta1.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListBackupsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the details of a specific backup.
-     * 
- */ - public com.google.cloud.filestore.v1beta1.Backup getBackup(com.google.cloud.filestore.v1beta1.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBackupMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a backup.
-     * 
- */ - public com.google.longrunning.Operation createBackup(com.google.cloud.filestore.v1beta1.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateBackupMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes a backup.
-     * 
- */ - public com.google.longrunning.Operation deleteBackup(com.google.cloud.filestore.v1beta1.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteBackupMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the settings of a specific backup.
-     * 
- */ - public com.google.longrunning.Operation updateBackup(com.google.cloud.filestore.v1beta1.UpdateBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateBackupMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Configures and manages Cloud Filestore resources.
-   * Cloud Filestore Manager v1beta1.
-   * The `file.googleapis.com` service implements the Cloud Filestore API and
-   * defines the following model for managing resources:
-   * * The service works with a collection of cloud projects, named: `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   * * Each location has a collection of instances and backups, named:
-   * `/instances/*` and `/backups/*` respectively.
-   * * As such, Cloud Filestore instances are resources of the form:
-   *   `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   *   backups are resources of the form:
-   *   `/projects/{project_id}/locations/{location_id}/backup/{backup_id}`
-   * Note that location_id can represent a GCP `zone` or `region` depending on the
-   * resource.
-   * for example:
-   * A zonal Filestore instance:
-   * * `projects/my-project/locations/us-central1-c/instances/my-basic-tier-filer`
-   * A regional Filestore instance:
-   * * `projects/my-project/locations/us-central1/instances/my-enterprise-filer`
-   * 
- */ - public static final class CloudFilestoreManagerFutureStub extends io.grpc.stub.AbstractFutureStub { - private CloudFilestoreManagerFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected CloudFilestoreManagerFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new CloudFilestoreManagerFutureStub(channel, callOptions); - } - - /** - *
-     * Lists all instances in a project for either a specified location
-     * or for all locations.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listInstances( - com.google.cloud.filestore.v1beta1.ListInstancesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the details of a specific instance.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getInstance( - com.google.cloud.filestore.v1beta1.GetInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates an instance.
-     * When creating from a backup, the capacity of the new instance needs to be
-     * equal to or larger than the capacity of the backup (and also equal to or
-     * larger than the minimum capacity of the tier).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createInstance( - com.google.cloud.filestore.v1beta1.CreateInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the settings of a specific instance.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateInstance( - com.google.cloud.filestore.v1beta1.UpdateInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Restores an existing instance's file share from a backup.
-     * The capacity of the instance needs to be equal to or larger than the
-     * capacity of the backup (and also equal to or larger than the minimum
-     * capacity of the tier).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture restoreInstance( - com.google.cloud.filestore.v1beta1.RestoreInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRestoreInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes an instance.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteInstance( - com.google.cloud.filestore.v1beta1.DeleteInstanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists all backups in a project for either a specified location or for all
-     * locations.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listBackups( - com.google.cloud.filestore.v1beta1.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the details of a specific backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getBackup( - com.google.cloud.filestore.v1beta1.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createBackup( - com.google.cloud.filestore.v1beta1.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteBackup( - com.google.cloud.filestore.v1beta1.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the settings of a specific backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateBackup( - com.google.cloud.filestore.v1beta1.UpdateBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_INSTANCES = 0; - private static final int METHODID_GET_INSTANCE = 1; - private static final int METHODID_CREATE_INSTANCE = 2; - private static final int METHODID_UPDATE_INSTANCE = 3; - private static final int METHODID_RESTORE_INSTANCE = 4; - private static final int METHODID_DELETE_INSTANCE = 5; - private static final int METHODID_LIST_BACKUPS = 6; - private static final int METHODID_GET_BACKUP = 7; - private static final int METHODID_CREATE_BACKUP = 8; - private static final int METHODID_DELETE_BACKUP = 9; - private static final int METHODID_UPDATE_BACKUP = 10; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final CloudFilestoreManagerImplBase serviceImpl; - private final int methodId; - - MethodHandlers(CloudFilestoreManagerImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_INSTANCES: - serviceImpl.listInstances((com.google.cloud.filestore.v1beta1.ListInstancesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_INSTANCE: - serviceImpl.getInstance((com.google.cloud.filestore.v1beta1.GetInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_INSTANCE: - serviceImpl.createInstance((com.google.cloud.filestore.v1beta1.CreateInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_INSTANCE: - serviceImpl.updateInstance((com.google.cloud.filestore.v1beta1.UpdateInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_RESTORE_INSTANCE: - serviceImpl.restoreInstance((com.google.cloud.filestore.v1beta1.RestoreInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_INSTANCE: - serviceImpl.deleteInstance((com.google.cloud.filestore.v1beta1.DeleteInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_BACKUPS: - serviceImpl.listBackups((com.google.cloud.filestore.v1beta1.ListBackupsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_BACKUP: - serviceImpl.getBackup((com.google.cloud.filestore.v1beta1.GetBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_BACKUP: - serviceImpl.createBackup((com.google.cloud.filestore.v1beta1.CreateBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_BACKUP: - serviceImpl.deleteBackup((com.google.cloud.filestore.v1beta1.DeleteBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_BACKUP: - serviceImpl.updateBackup((com.google.cloud.filestore.v1beta1.UpdateBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class CloudFilestoreManagerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - CloudFilestoreManagerBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("CloudFilestoreManager"); - } - } - - private static final class CloudFilestoreManagerFileDescriptorSupplier - extends CloudFilestoreManagerBaseDescriptorSupplier { - CloudFilestoreManagerFileDescriptorSupplier() {} - } - - private static final class CloudFilestoreManagerMethodDescriptorSupplier - extends CloudFilestoreManagerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - CloudFilestoreManagerMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (CloudFilestoreManagerGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new CloudFilestoreManagerFileDescriptorSupplier()) - .addMethod(getListInstancesMethod()) - .addMethod(getGetInstanceMethod()) - .addMethod(getCreateInstanceMethod()) - .addMethod(getUpdateInstanceMethod()) - .addMethod(getRestoreInstanceMethod()) - .addMethod(getDeleteInstanceMethod()) - .addMethod(getListBackupsMethod()) - .addMethod(getGetBackupMethod()) - .addMethod(getCreateBackupMethod()) - .addMethod(getDeleteBackupMethod()) - .addMethod(getUpdateBackupMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/common/OperationMetadata.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/common/OperationMetadata.java deleted file mode 100644 index 22af5772faab..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/common/OperationMetadata.java +++ /dev/null @@ -1,1658 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/common/operation_metadata.proto - -package com.google.cloud.common; - -/** - *
- * Represents the metadata of the long-running operation.
- * 
- * - * Protobuf type {@code google.cloud.common.OperationMetadata} - */ -public final class OperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.common.OperationMetadata) - OperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OperationMetadata() { - target_ = ""; - verb_ = ""; - statusDetail_ = ""; - apiVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OperationMetadata( - 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.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 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - statusDetail_ = s; - break; - } - case 48: { - - cancelRequested_ = input.readBool(); - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = 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.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.common.OperationMetadata.class, com.google.cloud.common.OperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int TARGET_FIELD_NUMBER = 3; - private volatile java.lang.Object target_; - /** - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The target. - */ - @java.lang.Override - public java.lang.String getTarget() { - java.lang.Object ref = target_; - 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(); - target_ = s; - return s; - } - } - /** - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for target. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERB_FIELD_NUMBER = 4; - private volatile java.lang.Object verb_; - /** - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The verb. - */ - @java.lang.Override - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - 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(); - verb_ = s; - return s; - } - } - /** - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for verb. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_DETAIL_FIELD_NUMBER = 5; - private volatile java.lang.Object statusDetail_; - /** - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusDetail. - */ - @java.lang.Override - public java.lang.String getStatusDetail() { - java.lang.Object ref = statusDetail_; - 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(); - statusDetail_ = s; - return s; - } - } - /** - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusDetail. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStatusDetailBytes() { - java.lang.Object ref = statusDetail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - statusDetail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CANCEL_REQUESTED_FIELD_NUMBER = 6; - private boolean cancelRequested_; - /** - *
-   * Output only. Identifies whether the user has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-   * corresponding to `Code.CANCELLED`.
-   * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cancelRequested. - */ - @java.lang.Override - public boolean getCancelRequested() { - return cancelRequested_; - } - - public static final int API_VERSION_FIELD_NUMBER = 7; - private volatile java.lang.Object apiVersion_; - /** - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The apiVersion. - */ - @java.lang.Override - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - 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(); - apiVersion_ = s; - return s; - } - } - /** - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for apiVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiVersion_ = 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 (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusDetail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusDetail_); - } - if (cancelRequested_ != false) { - output.writeBool(6, cancelRequested_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusDetail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusDetail_); - } - if (cancelRequested_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, cancelRequested_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); - } - 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.common.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.common.OperationMetadata other = (com.google.cloud.common.OperationMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!getTarget() - .equals(other.getTarget())) return false; - if (!getVerb() - .equals(other.getVerb())) return false; - if (!getStatusDetail() - .equals(other.getStatusDetail())) return false; - if (getCancelRequested() - != other.getCancelRequested()) return false; - if (!getApiVersion() - .equals(other.getApiVersion())) 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 (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget().hashCode(); - hash = (37 * hash) + VERB_FIELD_NUMBER; - hash = (53 * hash) + getVerb().hashCode(); - hash = (37 * hash) + STATUS_DETAIL_FIELD_NUMBER; - hash = (53 * hash) + getStatusDetail().hashCode(); - hash = (37 * hash) + CANCEL_REQUESTED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getCancelRequested()); - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.common.OperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.common.OperationMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.common.OperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.common.OperationMetadata 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.common.OperationMetadata 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 the metadata of the long-running operation.
-   * 
- * - * Protobuf type {@code google.cloud.common.OperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.common.OperationMetadata) - com.google.cloud.common.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.common.OperationMetadata.class, com.google.cloud.common.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.common.OperationMetadata.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 (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - target_ = ""; - - verb_ = ""; - - statusDetail_ = ""; - - cancelRequested_ = false; - - apiVersion_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.common.OperationMetadataOuterClass.internal_static_google_cloud_common_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.common.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.common.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.common.OperationMetadata build() { - com.google.cloud.common.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.common.OperationMetadata buildPartial() { - com.google.cloud.common.OperationMetadata result = new com.google.cloud.common.OperationMetadata(this); - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - result.target_ = target_; - result.verb_ = verb_; - result.statusDetail_ = statusDetail_; - result.cancelRequested_ = cancelRequested_; - result.apiVersion_ = apiVersion_; - 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.common.OperationMetadata) { - return mergeFrom((com.google.cloud.common.OperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.common.OperationMetadata other) { - if (other == com.google.cloud.common.OperationMetadata.getDefaultInstance()) return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - onChanged(); - } - if (!other.getVerb().isEmpty()) { - verb_ = other.verb_; - onChanged(); - } - if (!other.getStatusDetail().isEmpty()) { - statusDetail_ = other.statusDetail_; - onChanged(); - } - if (other.getCancelRequested() != false) { - setCancelRequested(other.getCancelRequested()); - } - if (!other.getApiVersion().isEmpty()) { - apiVersion_ = other.apiVersion_; - 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.common.OperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.common.OperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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(); - } - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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 com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object target_ = ""; - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The target. - */ - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for target. - */ - public com.google.protobuf.ByteString - getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The target to set. - * @return This builder for chaining. - */ - public Builder setTarget( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - target_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearTarget() { - - target_ = getDefaultInstance().getTarget(); - onChanged(); - return this; - } - /** - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for target to set. - * @return This builder for chaining. - */ - public Builder setTargetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - target_ = value; - onChanged(); - return this; - } - - private java.lang.Object verb_ = ""; - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The verb. - */ - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for verb. - */ - public com.google.protobuf.ByteString - getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The verb to set. - * @return This builder for chaining. - */ - public Builder setVerb( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - verb_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearVerb() { - - verb_ = getDefaultInstance().getVerb(); - onChanged(); - return this; - } - /** - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for verb to set. - * @return This builder for chaining. - */ - public Builder setVerbBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - verb_ = value; - onChanged(); - return this; - } - - private java.lang.Object statusDetail_ = ""; - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusDetail. - */ - public java.lang.String getStatusDetail() { - java.lang.Object ref = statusDetail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusDetail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusDetail. - */ - public com.google.protobuf.ByteString - getStatusDetailBytes() { - java.lang.Object ref = statusDetail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - statusDetail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The statusDetail to set. - * @return This builder for chaining. - */ - public Builder setStatusDetail( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - statusDetail_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearStatusDetail() { - - statusDetail_ = getDefaultInstance().getStatusDetail(); - onChanged(); - return this; - } - /** - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for statusDetail to set. - * @return This builder for chaining. - */ - public Builder setStatusDetailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - statusDetail_ = value; - onChanged(); - return this; - } - - private boolean cancelRequested_ ; - /** - *
-     * Output only. Identifies whether the user has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cancelRequested. - */ - @java.lang.Override - public boolean getCancelRequested() { - return cancelRequested_; - } - /** - *
-     * Output only. Identifies whether the user has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The cancelRequested to set. - * @return This builder for chaining. - */ - public Builder setCancelRequested(boolean value) { - - cancelRequested_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Identifies whether the user has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearCancelRequested() { - - cancelRequested_ = false; - onChanged(); - return this; - } - - private java.lang.Object apiVersion_ = ""; - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The apiVersion. - */ - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for apiVersion. - */ - public com.google.protobuf.ByteString - getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - apiVersion_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearApiVersion() { - - apiVersion_ = getDefaultInstance().getApiVersion(); - onChanged(); - return this; - } - /** - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - apiVersion_ = 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.common.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.common.OperationMetadata) - private static final com.google.cloud.common.OperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.common.OperationMetadata(); - } - - public static com.google.cloud.common.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(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.common.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/common/OperationMetadataOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/common/OperationMetadataOrBuilder.java deleted file mode 100644 index 03b8d68c0be5..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/common/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,156 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/common/operation_metadata.proto - -package com.google.cloud.common; - -public interface OperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.common.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The target. - */ - java.lang.String getTarget(); - /** - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for target. - */ - com.google.protobuf.ByteString - getTargetBytes(); - - /** - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The verb. - */ - java.lang.String getVerb(); - /** - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for verb. - */ - com.google.protobuf.ByteString - getVerbBytes(); - - /** - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusDetail. - */ - java.lang.String getStatusDetail(); - /** - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusDetail. - */ - com.google.protobuf.ByteString - getStatusDetailBytes(); - - /** - *
-   * Output only. Identifies whether the user has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a [google.rpc.Status.code][] of 1,
-   * corresponding to `Code.CANCELLED`.
-   * 
- * - * bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The cancelRequested. - */ - boolean getCancelRequested(); - - /** - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The apiVersion. - */ - java.lang.String getApiVersion(); - /** - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for apiVersion. - */ - com.google.protobuf.ByteString - getApiVersionBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/common/OperationMetadataOuterClass.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/common/OperationMetadataOuterClass.java deleted file mode 100644 index 8b00f4c11630..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/common/OperationMetadataOuterClass.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/common/operation_metadata.proto - -package com.google.cloud.common; - -public final class OperationMetadataOuterClass { - private OperationMetadataOuterClass() {} - 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_common_OperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_common_OperationMetadata_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/common/operation_metadata" + - ".proto\022\023google.cloud.common\032\037google/api/" + - "field_behavior.proto\032\037google/protobuf/ti" + - "mestamp.proto\"\371\001\n\021OperationMetadata\0224\n\013c" + - "reate_time\030\001 \001(\0132\032.google.protobuf.Times" + - "tampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.pro" + - "tobuf.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\032\n\rstatus_detail\030\005 " + - "\001(\tB\003\340A\003\022\035\n\020cancel_requested\030\006 \001(\010B\003\340A\003\022" + - "\030\n\013api_version\030\007 \001(\tB\003\340A\003BV\n\027com.google." + - "cloud.commonP\001Z9google.golang.org/genpro" + - "to/googleapis/cloud/common;commonb\006proto" + - "3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_common_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_common_OperationMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_common_OperationMetadata_descriptor, - new java.lang.String[] { "CreateTime", "EndTime", "Target", "Verb", "StatusDetail", "CancelRequested", "ApiVersion", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/Backup.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/Backup.java deleted file mode 100644 index a4ada2d9ee93..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/Backup.java +++ /dev/null @@ -1,2616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * A Cloud Filestore backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.Backup} - */ -public final class Backup extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.Backup) - BackupOrBuilder { -private static final long serialVersionUID = 0L; - // Use Backup.newBuilder() to construct. - private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Backup() { - name_ = ""; - description_ = ""; - state_ = 0; - sourceInstance_ = ""; - sourceFileShare_ = ""; - sourceInstanceTier_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Backup(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Backup( - 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 24: { - int rawValue = input.readEnum(); - - state_ = rawValue; - 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: { - 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 48: { - - capacityGb_ = input.readInt64(); - break; - } - case 56: { - - storageBytes_ = input.readInt64(); - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceInstance_ = s; - break; - } - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceFileShare_ = s; - break; - } - case 80: { - int rawValue = input.readEnum(); - - sourceInstanceTier_ = rawValue; - break; - } - case 88: { - - downloadBytes_ = input.readInt64(); - break; - } - case 98: { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (satisfiesPzs_ != null) { - subBuilder = satisfiesPzs_.toBuilder(); - } - satisfiesPzs_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(satisfiesPzs_); - satisfiesPzs_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Backup_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.Backup.class, com.google.cloud.filestore.v1beta1.Backup.Builder.class); - } - - /** - *
-   * The backup state.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1beta1.Backup.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Backup is being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - *
-     * Backup has been taken and the operation is being finalized. At this
-     * point, changes to the file share will not be reflected in the backup.
-     * 
- * - * FINALIZING = 2; - */ - FINALIZING(2), - /** - *
-     * Backup is available for use.
-     * 
- * - * READY = 3; - */ - READY(3), - /** - *
-     * Backup is being deleted.
-     * 
- * - * DELETING = 4; - */ - DELETING(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Backup is being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - *
-     * Backup has been taken and the operation is being finalized. At this
-     * point, changes to the file share will not be reflected in the backup.
-     * 
- * - * FINALIZING = 2; - */ - public static final int FINALIZING_VALUE = 2; - /** - *
-     * Backup is available for use.
-     * 
- * - * READY = 3; - */ - public static final int READY_VALUE = 3; - /** - *
-     * Backup is being deleted.
-     * 
- * - * DELETING = 4; - */ - public static final int DELETING_VALUE = 4; - - - 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 CREATING; - case 2: return FINALIZING; - case 3: return READY; - case 4: return DELETING; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> 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.filestore.v1beta1.Backup.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.filestore.v1beta1.Backup.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Output only. The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * 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 resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * 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_; - /** - *
-   * A description of the backup with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * 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; - } - } - /** - *
-   * A description of the backup with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * 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 STATE_FIELD_NUMBER = 3; - private int state_; - /** - *
-   * Output only. The backup state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Output only. The backup state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override public com.google.cloud.filestore.v1beta1.Backup.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Backup.State result = com.google.cloud.filestore.v1beta1.Backup.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1beta1.Backup.State.UNRECOGNIZED : result; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int LABELS_FIELD_NUMBER = 5; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Backup_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - - @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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - @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; - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - @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 CAPACITY_GB_FIELD_NUMBER = 6; - private long capacityGb_; - /** - *
-   * Output only. Capacity of the source file share when the backup was created.
-   * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The capacityGb. - */ - @java.lang.Override - public long getCapacityGb() { - return capacityGb_; - } - - public static final int STORAGE_BYTES_FIELD_NUMBER = 7; - private long storageBytes_; - /** - *
-   * Output only. The size of the storage used by the backup. As backups share storage,
-   * this number is expected to change with backup creation/deletion.
-   * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The storageBytes. - */ - @java.lang.Override - public long getStorageBytes() { - return storageBytes_; - } - - public static final int SOURCE_INSTANCE_FIELD_NUMBER = 8; - private volatile java.lang.Object sourceInstance_; - /** - *
-   * The resource name of the source Cloud Filestore instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
-   * used to create this backup.
-   * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The sourceInstance. - */ - @java.lang.Override - public java.lang.String getSourceInstance() { - java.lang.Object ref = sourceInstance_; - 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(); - sourceInstance_ = s; - return s; - } - } - /** - *
-   * The resource name of the source Cloud Filestore instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
-   * used to create this backup.
-   * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceInstance. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceInstanceBytes() { - java.lang.Object ref = sourceInstance_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceInstance_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_FILE_SHARE_FIELD_NUMBER = 9; - private volatile java.lang.Object sourceFileShare_; - /** - *
-   * Name of the file share in the source Cloud Filestore instance that the
-   * backup is created from.
-   * 
- * - * string source_file_share = 9; - * @return The sourceFileShare. - */ - @java.lang.Override - public java.lang.String getSourceFileShare() { - java.lang.Object ref = sourceFileShare_; - 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(); - sourceFileShare_ = s; - return s; - } - } - /** - *
-   * Name of the file share in the source Cloud Filestore instance that the
-   * backup is created from.
-   * 
- * - * string source_file_share = 9; - * @return The bytes for sourceFileShare. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceFileShareBytes() { - java.lang.Object ref = sourceFileShare_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceFileShare_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_INSTANCE_TIER_FIELD_NUMBER = 10; - private int sourceInstanceTier_; - /** - *
-   * Output only. The service tier of the source Cloud Filestore instance that this backup
-   * is created from.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for sourceInstanceTier. - */ - @java.lang.Override public int getSourceInstanceTierValue() { - return sourceInstanceTier_; - } - /** - *
-   * Output only. The service tier of the source Cloud Filestore instance that this backup
-   * is created from.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sourceInstanceTier. - */ - @java.lang.Override public com.google.cloud.filestore.v1beta1.Instance.Tier getSourceInstanceTier() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Instance.Tier result = com.google.cloud.filestore.v1beta1.Instance.Tier.valueOf(sourceInstanceTier_); - return result == null ? com.google.cloud.filestore.v1beta1.Instance.Tier.UNRECOGNIZED : result; - } - - public static final int DOWNLOAD_BYTES_FIELD_NUMBER = 11; - private long downloadBytes_; - /** - *
-   * Output only. Amount of bytes that will be downloaded if the backup is restored
-   * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The downloadBytes. - */ - @java.lang.Override - public long getDownloadBytes() { - return downloadBytes_; - } - - public static final int SATISFIES_PZS_FIELD_NUMBER = 12; - private com.google.protobuf.BoolValue satisfiesPzs_; - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - @java.lang.Override - public boolean hasSatisfiesPzs() { - return satisfiesPzs_ != null; - } - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - @java.lang.Override - public com.google.protobuf.BoolValue getSatisfiesPzs() { - return satisfiesPzs_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { - return getSatisfiesPzs(); - } - - 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 (state_ != com.google.cloud.filestore.v1beta1.Backup.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (createTime_ != null) { - output.writeMessage(4, getCreateTime()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 5); - if (capacityGb_ != 0L) { - output.writeInt64(6, capacityGb_); - } - if (storageBytes_ != 0L) { - output.writeInt64(7, storageBytes_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceInstance_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, sourceInstance_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceFileShare_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, sourceFileShare_); - } - if (sourceInstanceTier_ != com.google.cloud.filestore.v1beta1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - output.writeEnum(10, sourceInstanceTier_); - } - if (downloadBytes_ != 0L) { - output.writeInt64(11, downloadBytes_); - } - if (satisfiesPzs_ != null) { - output.writeMessage(12, getSatisfiesPzs()); - } - 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 (state_ != com.google.cloud.filestore.v1beta1.Backup.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, state_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCreateTime()); - } - 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(5, labels__); - } - if (capacityGb_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(6, capacityGb_); - } - if (storageBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(7, storageBytes_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceInstance_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, sourceInstance_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceFileShare_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, sourceFileShare_); - } - if (sourceInstanceTier_ != com.google.cloud.filestore.v1beta1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, sourceInstanceTier_); - } - if (downloadBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(11, downloadBytes_); - } - if (satisfiesPzs_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getSatisfiesPzs()); - } - 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.filestore.v1beta1.Backup)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.Backup other = (com.google.cloud.filestore.v1beta1.Backup) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (state_ != other.state_) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (getCapacityGb() - != other.getCapacityGb()) return false; - if (getStorageBytes() - != other.getStorageBytes()) return false; - if (!getSourceInstance() - .equals(other.getSourceInstance())) return false; - if (!getSourceFileShare() - .equals(other.getSourceFileShare())) return false; - if (sourceInstanceTier_ != other.sourceInstanceTier_) return false; - if (getDownloadBytes() - != other.getDownloadBytes()) return false; - if (hasSatisfiesPzs() != other.hasSatisfiesPzs()) return false; - if (hasSatisfiesPzs()) { - if (!getSatisfiesPzs() - .equals(other.getSatisfiesPzs())) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + CAPACITY_GB_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCapacityGb()); - hash = (37 * hash) + STORAGE_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getStorageBytes()); - hash = (37 * hash) + SOURCE_INSTANCE_FIELD_NUMBER; - hash = (53 * hash) + getSourceInstance().hashCode(); - hash = (37 * hash) + SOURCE_FILE_SHARE_FIELD_NUMBER; - hash = (53 * hash) + getSourceFileShare().hashCode(); - hash = (37 * hash) + SOURCE_INSTANCE_TIER_FIELD_NUMBER; - hash = (53 * hash) + sourceInstanceTier_; - hash = (37 * hash) + DOWNLOAD_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getDownloadBytes()); - if (hasSatisfiesPzs()) { - hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; - hash = (53 * hash) + getSatisfiesPzs().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.Backup parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.Backup 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.filestore.v1beta1.Backup parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.Backup 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.filestore.v1beta1.Backup parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.Backup parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.Backup parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.Backup 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.filestore.v1beta1.Backup parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.Backup 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.filestore.v1beta1.Backup parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.Backup 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.filestore.v1beta1.Backup 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 Cloud Filestore backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.Backup} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.Backup) - com.google.cloud.filestore.v1beta1.BackupOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Backup_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 5: - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.Backup.class, com.google.cloud.filestore.v1beta1.Backup.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.Backup.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_ = ""; - - state_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - capacityGb_ = 0L; - - storageBytes_ = 0L; - - sourceInstance_ = ""; - - sourceFileShare_ = ""; - - sourceInstanceTier_ = 0; - - downloadBytes_ = 0L; - - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = null; - } else { - satisfiesPzs_ = null; - satisfiesPzsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Backup_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Backup getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Backup build() { - com.google.cloud.filestore.v1beta1.Backup result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Backup buildPartial() { - com.google.cloud.filestore.v1beta1.Backup result = new com.google.cloud.filestore.v1beta1.Backup(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - result.state_ = state_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.capacityGb_ = capacityGb_; - result.storageBytes_ = storageBytes_; - result.sourceInstance_ = sourceInstance_; - result.sourceFileShare_ = sourceFileShare_; - result.sourceInstanceTier_ = sourceInstanceTier_; - result.downloadBytes_ = downloadBytes_; - if (satisfiesPzsBuilder_ == null) { - result.satisfiesPzs_ = satisfiesPzs_; - } else { - result.satisfiesPzs_ = satisfiesPzsBuilder_.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.filestore.v1beta1.Backup) { - return mergeFrom((com.google.cloud.filestore.v1beta1.Backup)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.Backup other) { - if (other == com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (other.getCapacityGb() != 0L) { - setCapacityGb(other.getCapacityGb()); - } - if (other.getStorageBytes() != 0L) { - setStorageBytes(other.getStorageBytes()); - } - if (!other.getSourceInstance().isEmpty()) { - sourceInstance_ = other.sourceInstance_; - onChanged(); - } - if (!other.getSourceFileShare().isEmpty()) { - sourceFileShare_ = other.sourceFileShare_; - onChanged(); - } - if (other.sourceInstanceTier_ != 0) { - setSourceInstanceTierValue(other.getSourceInstanceTierValue()); - } - if (other.getDownloadBytes() != 0L) { - setDownloadBytes(other.getDownloadBytes()); - } - if (other.hasSatisfiesPzs()) { - mergeSatisfiesPzs(other.getSatisfiesPzs()); - } - 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.filestore.v1beta1.Backup parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.Backup) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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 resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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 resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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 resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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 resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * 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_ = ""; - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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; - } - } - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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; - } - } - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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; - } - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * A description of the backup with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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 int state_ = 0; - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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; - } - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Backup.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Backup.State result = com.google.cloud.filestore.v1beta1.Backup.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1beta1.Backup.State.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.filestore.v1beta1.Backup.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The backup state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - 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_; - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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(); - } - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time when the backup was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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 com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - - @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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - - 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - 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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private long capacityGb_ ; - /** - *
-     * Output only. Capacity of the source file share when the backup was created.
-     * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The capacityGb. - */ - @java.lang.Override - public long getCapacityGb() { - return capacityGb_; - } - /** - *
-     * Output only. Capacity of the source file share when the backup was created.
-     * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The capacityGb to set. - * @return This builder for chaining. - */ - public Builder setCapacityGb(long value) { - - capacityGb_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Capacity of the source file share when the backup was created.
-     * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearCapacityGb() { - - capacityGb_ = 0L; - onChanged(); - return this; - } - - private long storageBytes_ ; - /** - *
-     * Output only. The size of the storage used by the backup. As backups share storage,
-     * this number is expected to change with backup creation/deletion.
-     * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The storageBytes. - */ - @java.lang.Override - public long getStorageBytes() { - return storageBytes_; - } - /** - *
-     * Output only. The size of the storage used by the backup. As backups share storage,
-     * this number is expected to change with backup creation/deletion.
-     * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The storageBytes to set. - * @return This builder for chaining. - */ - public Builder setStorageBytes(long value) { - - storageBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The size of the storage used by the backup. As backups share storage,
-     * this number is expected to change with backup creation/deletion.
-     * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearStorageBytes() { - - storageBytes_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object sourceInstance_ = ""; - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The sourceInstance. - */ - public java.lang.String getSourceInstance() { - java.lang.Object ref = sourceInstance_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceInstance_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceInstance. - */ - public com.google.protobuf.ByteString - getSourceInstanceBytes() { - java.lang.Object ref = sourceInstance_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceInstance_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @param value The sourceInstance to set. - * @return This builder for chaining. - */ - public Builder setSourceInstance( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceInstance_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearSourceInstance() { - - sourceInstance_ = getDefaultInstance().getSourceInstance(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the source Cloud Filestore instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
-     * used to create this backup.
-     * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @param value The bytes for sourceInstance to set. - * @return This builder for chaining. - */ - public Builder setSourceInstanceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceInstance_ = value; - onChanged(); - return this; - } - - private java.lang.Object sourceFileShare_ = ""; - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @return The sourceFileShare. - */ - public java.lang.String getSourceFileShare() { - java.lang.Object ref = sourceFileShare_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceFileShare_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @return The bytes for sourceFileShare. - */ - public com.google.protobuf.ByteString - getSourceFileShareBytes() { - java.lang.Object ref = sourceFileShare_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceFileShare_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @param value The sourceFileShare to set. - * @return This builder for chaining. - */ - public Builder setSourceFileShare( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceFileShare_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @return This builder for chaining. - */ - public Builder clearSourceFileShare() { - - sourceFileShare_ = getDefaultInstance().getSourceFileShare(); - onChanged(); - return this; - } - /** - *
-     * Name of the file share in the source Cloud Filestore instance that the
-     * backup is created from.
-     * 
- * - * string source_file_share = 9; - * @param value The bytes for sourceFileShare to set. - * @return This builder for chaining. - */ - public Builder setSourceFileShareBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceFileShare_ = value; - onChanged(); - return this; - } - - private int sourceInstanceTier_ = 0; - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that this backup
-     * is created from.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for sourceInstanceTier. - */ - @java.lang.Override public int getSourceInstanceTierValue() { - return sourceInstanceTier_; - } - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that this backup
-     * is created from.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The enum numeric value on the wire for sourceInstanceTier to set. - * @return This builder for chaining. - */ - public Builder setSourceInstanceTierValue(int value) { - - sourceInstanceTier_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that this backup
-     * is created from.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sourceInstanceTier. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Instance.Tier getSourceInstanceTier() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Instance.Tier result = com.google.cloud.filestore.v1beta1.Instance.Tier.valueOf(sourceInstanceTier_); - return result == null ? com.google.cloud.filestore.v1beta1.Instance.Tier.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that this backup
-     * is created from.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The sourceInstanceTier to set. - * @return This builder for chaining. - */ - public Builder setSourceInstanceTier(com.google.cloud.filestore.v1beta1.Instance.Tier value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceInstanceTier_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The service tier of the source Cloud Filestore instance that this backup
-     * is created from.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearSourceInstanceTier() { - - sourceInstanceTier_ = 0; - onChanged(); - return this; - } - - private long downloadBytes_ ; - /** - *
-     * Output only. Amount of bytes that will be downloaded if the backup is restored
-     * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The downloadBytes. - */ - @java.lang.Override - public long getDownloadBytes() { - return downloadBytes_; - } - /** - *
-     * Output only. Amount of bytes that will be downloaded if the backup is restored
-     * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The downloadBytes to set. - * @return This builder for chaining. - */ - public Builder setDownloadBytes(long value) { - - downloadBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Amount of bytes that will be downloaded if the backup is restored
-     * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearDownloadBytes() { - - downloadBytes_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.BoolValue satisfiesPzs_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> satisfiesPzsBuilder_; - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - public boolean hasSatisfiesPzs() { - return satisfiesPzsBuilder_ != null || satisfiesPzs_ != null; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - public com.google.protobuf.BoolValue getSatisfiesPzs() { - if (satisfiesPzsBuilder_ == null) { - return satisfiesPzs_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } else { - return satisfiesPzsBuilder_.getMessage(); - } - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSatisfiesPzs(com.google.protobuf.BoolValue value) { - if (satisfiesPzsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - satisfiesPzs_ = value; - onChanged(); - } else { - satisfiesPzsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSatisfiesPzs( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = builderForValue.build(); - onChanged(); - } else { - satisfiesPzsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeSatisfiesPzs(com.google.protobuf.BoolValue value) { - if (satisfiesPzsBuilder_ == null) { - if (satisfiesPzs_ != null) { - satisfiesPzs_ = - com.google.protobuf.BoolValue.newBuilder(satisfiesPzs_).mergeFrom(value).buildPartial(); - } else { - satisfiesPzs_ = value; - } - onChanged(); - } else { - satisfiesPzsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearSatisfiesPzs() { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = null; - onChanged(); - } else { - satisfiesPzs_ = null; - satisfiesPzsBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.BoolValue.Builder getSatisfiesPzsBuilder() { - - onChanged(); - return getSatisfiesPzsFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { - if (satisfiesPzsBuilder_ != null) { - return satisfiesPzsBuilder_.getMessageOrBuilder(); - } else { - return satisfiesPzs_ == null ? - com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> - getSatisfiesPzsFieldBuilder() { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( - getSatisfiesPzs(), - getParentForChildren(), - isClean()); - satisfiesPzs_ = null; - } - return satisfiesPzsBuilder_; - } - @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.filestore.v1beta1.Backup) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.Backup) - private static final com.google.cloud.filestore.v1beta1.Backup DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.Backup(); - } - - public static com.google.cloud.filestore.v1beta1.Backup getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Backup parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Backup(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.filestore.v1beta1.Backup getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/BackupName.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/BackupName.java deleted file mode 100644 index 5a1738fa1cbb..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/BackupName.java +++ /dev/null @@ -1,223 +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.filestore.v1beta1; - -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 BackupName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_BACKUP = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/backups/{backup}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String backup; - - @Deprecated - protected BackupName() { - project = null; - location = null; - backup = null; - } - - private BackupName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - backup = Preconditions.checkNotNull(builder.getBackup()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getBackup() { - return backup; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static BackupName of(String project, String location, String backup) { - return newBuilder().setProject(project).setLocation(location).setBackup(backup).build(); - } - - public static String format(String project, String location, String backup) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setBackup(backup) - .build() - .toString(); - } - - public static BackupName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_BACKUP.validatedMatch( - formattedString, "BackupName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("backup")); - } - - 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 (BackupName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_BACKUP.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 (backup != null) { - fieldMapBuilder.put("backup", backup); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_BACKUP.instantiate( - "project", project, "location", location, "backup", backup); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - BackupName that = ((BackupName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.backup, that.backup); - } - 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(backup); - return h; - } - - /** Builder for projects/{project}/locations/{location}/backups/{backup}. */ - public static class Builder { - private String project; - private String location; - private String backup; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getBackup() { - return backup; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setBackup(String backup) { - this.backup = backup; - return this; - } - - private Builder(BackupName backupName) { - this.project = backupName.project; - this.location = backupName.location; - this.backup = backupName.backup; - } - - public BackupName build() { - return new BackupName(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/BackupOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/BackupOrBuilder.java deleted file mode 100644 index 0cd4449d2ba2..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/BackupOrBuilder.java +++ /dev/null @@ -1,280 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface BackupOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.Backup) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A description of the backup with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A description of the backup with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. The backup state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Output only. The backup state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - com.google.cloud.filestore.v1beta1.Backup.State getState(); - - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time when the backup was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - int getLabelsCount(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Output only. Capacity of the source file share when the backup was created.
-   * 
- * - * int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The capacityGb. - */ - long getCapacityGb(); - - /** - *
-   * Output only. The size of the storage used by the backup. As backups share storage,
-   * this number is expected to change with backup creation/deletion.
-   * 
- * - * int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The storageBytes. - */ - long getStorageBytes(); - - /** - *
-   * The resource name of the source Cloud Filestore instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
-   * used to create this backup.
-   * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The sourceInstance. - */ - java.lang.String getSourceInstance(); - /** - *
-   * The resource name of the source Cloud Filestore instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
-   * used to create this backup.
-   * 
- * - * string source_instance = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceInstance. - */ - com.google.protobuf.ByteString - getSourceInstanceBytes(); - - /** - *
-   * Name of the file share in the source Cloud Filestore instance that the
-   * backup is created from.
-   * 
- * - * string source_file_share = 9; - * @return The sourceFileShare. - */ - java.lang.String getSourceFileShare(); - /** - *
-   * Name of the file share in the source Cloud Filestore instance that the
-   * backup is created from.
-   * 
- * - * string source_file_share = 9; - * @return The bytes for sourceFileShare. - */ - com.google.protobuf.ByteString - getSourceFileShareBytes(); - - /** - *
-   * Output only. The service tier of the source Cloud Filestore instance that this backup
-   * is created from.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for sourceInstanceTier. - */ - int getSourceInstanceTierValue(); - /** - *
-   * Output only. The service tier of the source Cloud Filestore instance that this backup
-   * is created from.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The sourceInstanceTier. - */ - com.google.cloud.filestore.v1beta1.Instance.Tier getSourceInstanceTier(); - - /** - *
-   * Output only. Amount of bytes that will be downloaded if the backup is restored
-   * 
- * - * int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The downloadBytes. - */ - long getDownloadBytes(); - - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - boolean hasSatisfiesPzs(); - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - com.google.protobuf.BoolValue getSatisfiesPzs(); - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreServiceProto.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreServiceProto.java deleted file mode 100644 index caf56b9327d3..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CloudFilestoreServiceProto.java +++ /dev/null @@ -1,500 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public final class CloudFilestoreServiceProto { - private CloudFilestoreServiceProto() {} - 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_filestore_v1beta1_NetworkConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_NetworkConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_FileShareConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_FileShareConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_Instance_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_Instance_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_Instance_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_Instance_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_Snapshot_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_Snapshot_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_Snapshot_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_Snapshot_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_Backup_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_Backup_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_Backup_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_Backup_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_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\"2/v1" + - "beta1/{parent=projects/*/locations/*}/in" + - "stances:\010instance\332A\033parent,instance,inst" + - "ance_id\312A1\n\010Instance\022%google.cloud.commo" + - "n.OperationMetadata\022\201\002\n\016UpdateInstance\0225" + - ".google.cloud.filestore.v1beta1.UpdateIn" + - "stanceRequest\032\035.google.longrunning.Opera" + - "tion\"\230\001\202\323\344\223\002G2;/v1beta1/{instance.name=p" + - "rojects/*/locations/*/instances/*}:\010inst" + - "ance\332A\024instance,update_mask\312A1\n\010Instance" + - "\022%google.cloud.common.OperationMetadata\022" + - "\343\001\n\017RestoreInstance\0226.google.cloud.files" + - "tore.v1beta1.RestoreInstanceRequest\032\035.go" + - "ogle.longrunning.Operation\"y\202\323\344\223\002?\":/v1b" + - "eta1/{name=projects/*/locations/*/instan" + - "ces/*}:restore:\001*\312A1\n\010Instance\022%google.c" + - "loud.common.OperationMetadata\022\353\001\n\016Delete" + - "Instance\0225.google.cloud.filestore.v1beta" + - "1.DeleteInstanceRequest\032\035.google.longrun" + - "ning.Operation\"\202\001\202\323\344\223\0024*2/v1beta1/{name=" + - "projects/*/locations/*/instances/*}\332A\004na" + - "me\312A>\n\025google.protobuf.Empty\022%google.clo" + - "ud.common.OperationMetadata\022\271\001\n\013ListBack" + - "ups\0222.google.cloud.filestore.v1beta1.Lis" + - "tBackupsRequest\0323.google.cloud.filestore" + - ".v1beta1.ListBackupsResponse\"A\202\323\344\223\0022\0220/v" + - "1beta1/{parent=projects/*/locations/*}/b" + - "ackups\332A\006parent\022\246\001\n\tGetBackup\0220.google.c" + - "loud.filestore.v1beta1.GetBackupRequest\032" + - "&.google.cloud.filestore.v1beta1.Backup\"" + - "?\202\323\344\223\0022\0220/v1beta1/{name=projects/*/locat" + - "ions/*/backups/*}\332A\004name\022\361\001\n\014CreateBacku" + - "p\0223.google.cloud.filestore.v1beta1.Creat" + - "eBackupRequest\032\035.google.longrunning.Oper" + - "ation\"\214\001\202\323\344\223\002:\"0/v1beta1/{parent=project" + - "s/*/locations/*}/backups:\006backup\332A\027paren" + - "t,backup,backup_id\312A/\n\006Backup\022%google.cl" + - "oud.common.OperationMetadata\022\345\001\n\014DeleteB" + - "ackup\0223.google.cloud.filestore.v1beta1.D" + - "eleteBackupRequest\032\035.google.longrunning." + - "Operation\"\200\001\202\323\344\223\0022*0/v1beta1/{name=proje" + - "cts/*/locations/*/backups/*}\332A\004name\312A>\n\025" + - "google.protobuf.Empty\022%google.cloud.comm" + - "on.OperationMetadata\022\363\001\n\014UpdateBackup\0223." + - "google.cloud.filestore.v1beta1.UpdateBac" + - "kupRequest\032\035.google.longrunning.Operatio" + - "n\"\216\001\202\323\344\223\002A27/v1beta1/{backup.name=projec" + - "ts/*/locations/*/backups/*}:\006backup\332A\022ba" + - "ckup,update_mask\312A/\n\006Backup\022%google.clou" + - "d.common.OperationMetadata\032G\312A\023file.goog" + - "leapis.com\322A.https://www.googleapis.com/" + - "auth/cloud-platformB\315\001\n\"com.google.cloud" + - ".filestore.v1beta1B\032CloudFilestoreServic" + - "eProtoP\001ZGgoogle.golang.org/genproto/goo" + - "gleapis/cloud/filestore/v1beta1;filestor" + - "e\252\002\036Google.Cloud.Filestore.V1Beta1\312\002\036Goo" + - "gle\\Cloud\\Filestore\\V1beta1b\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.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.protobuf.WrappersProto.getDescriptor(), - }); - internal_static_google_cloud_filestore_v1beta1_NetworkConfig_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_filestore_v1beta1_NetworkConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_NetworkConfig_descriptor, - new java.lang.String[] { "Network", "Modes", "ReservedIpRange", "IpAddresses", }); - internal_static_google_cloud_filestore_v1beta1_FileShareConfig_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_filestore_v1beta1_FileShareConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_FileShareConfig_descriptor, - new java.lang.String[] { "Name", "CapacityGb", "SourceBackup", "NfsExportOptions", "Source", }); - internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_descriptor, - new java.lang.String[] { "IpRanges", "AccessMode", "SquashMode", "AnonUid", "AnonGid", }); - internal_static_google_cloud_filestore_v1beta1_Instance_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_filestore_v1beta1_Instance_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_Instance_descriptor, - new java.lang.String[] { "Name", "Description", "State", "StatusMessage", "CreateTime", "Tier", "Labels", "FileShares", "Networks", "Etag", "SatisfiesPzs", }); - internal_static_google_cloud_filestore_v1beta1_Instance_LabelsEntry_descriptor = - internal_static_google_cloud_filestore_v1beta1_Instance_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_filestore_v1beta1_Instance_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_Instance_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_descriptor, - new java.lang.String[] { "Parent", "InstanceId", "Instance", }); - internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_descriptor, - new java.lang.String[] { "UpdateMask", "Instance", }); - internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_descriptor, - new java.lang.String[] { "Name", "FileShare", "SourceSnapshot", "SourceBackup", "Source", }); - internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", "OrderBy", "Filter", }); - internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_descriptor, - new java.lang.String[] { "Instances", "NextPageToken", "Unreachable", }); - internal_static_google_cloud_filestore_v1beta1_Snapshot_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_filestore_v1beta1_Snapshot_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_Snapshot_descriptor, - new java.lang.String[] { "Name", "Description", "State", "CreateTime", "Labels", "FilesystemUsedBytes", }); - internal_static_google_cloud_filestore_v1beta1_Snapshot_LabelsEntry_descriptor = - internal_static_google_cloud_filestore_v1beta1_Snapshot_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_filestore_v1beta1_Snapshot_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_Snapshot_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_filestore_v1beta1_Backup_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_filestore_v1beta1_Backup_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_Backup_descriptor, - new java.lang.String[] { "Name", "Description", "State", "CreateTime", "Labels", "CapacityGb", "StorageBytes", "SourceInstance", "SourceFileShare", "SourceInstanceTier", "DownloadBytes", "SatisfiesPzs", }); - internal_static_google_cloud_filestore_v1beta1_Backup_LabelsEntry_descriptor = - internal_static_google_cloud_filestore_v1beta1_Backup_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_filestore_v1beta1_Backup_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_Backup_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_descriptor, - new java.lang.String[] { "Parent", "Backup", "BackupId", }); - internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_descriptor, - new java.lang.String[] { "Backup", "UpdateMask", }); - internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", "OrderBy", "Filter", }); - internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_descriptor, - new java.lang.String[] { "Backups", "NextPageToken", "Unreachable", }); - 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.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.protobuf.WrappersProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateBackupRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateBackupRequest.java deleted file mode 100644 index a2f4c1575dcd..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateBackupRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * CreateBackupRequest creates a backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.CreateBackupRequest} - */ -public final class CreateBackupRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.CreateBackupRequest) - CreateBackupRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateBackupRequest.newBuilder() to construct. - private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateBackupRequest() { - parent_ = ""; - backupId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateBackupRequest( - 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.filestore.v1beta1.Backup.Builder subBuilder = null; - if (backup_ != null) { - subBuilder = backup_.toBuilder(); - } - backup_ = input.readMessage(com.google.cloud.filestore.v1beta1.Backup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backup_); - backup_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - backupId_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.CreateBackupRequest.class, com.google.cloud.filestore.v1beta1.CreateBackupRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The backup's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**.
-   * 
- * - * 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 backup's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**.
-   * 
- * - * 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 BACKUP_FIELD_NUMBER = 2; - private com.google.cloud.filestore.v1beta1.Backup backup_; - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - @java.lang.Override - public boolean hasBackup() { - return backup_ != null; - } - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Backup getBackup() { - return backup_ == null ? com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance() : backup_; - } - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.BackupOrBuilder getBackupOrBuilder() { - return getBackup(); - } - - public static final int BACKUP_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object backupId_; - /** - *
-   * Required. The ID to use for the backup.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The backupId. - */ - @java.lang.Override - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - 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(); - backupId_ = s; - return s; - } - } - /** - *
-   * Required. The ID to use for the backup.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for backupId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - backupId_ = 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 (backup_ != null) { - output.writeMessage(2, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); - } - 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 (backup_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); - } - 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.filestore.v1beta1.CreateBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.CreateBackupRequest other = (com.google.cloud.filestore.v1beta1.CreateBackupRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasBackup() != other.hasBackup()) return false; - if (hasBackup()) { - if (!getBackup() - .equals(other.getBackup())) return false; - } - if (!getBackupId() - .equals(other.getBackupId())) 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 (hasBackup()) { - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - } - hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; - hash = (53 * hash) + getBackupId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.CreateBackupRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.CreateBackupRequest 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.filestore.v1beta1.CreateBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.CreateBackupRequest 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.filestore.v1beta1.CreateBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.CreateBackupRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.CreateBackupRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.CreateBackupRequest 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.filestore.v1beta1.CreateBackupRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.CreateBackupRequest 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.filestore.v1beta1.CreateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.CreateBackupRequest 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.filestore.v1beta1.CreateBackupRequest 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; - } - /** - *
-   * CreateBackupRequest creates a backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.CreateBackupRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.CreateBackupRequest) - com.google.cloud.filestore.v1beta1.CreateBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.CreateBackupRequest.class, com.google.cloud.filestore.v1beta1.CreateBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.CreateBackupRequest.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 (backupBuilder_ == null) { - backup_ = null; - } else { - backup_ = null; - backupBuilder_ = null; - } - backupId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.CreateBackupRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.CreateBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.CreateBackupRequest build() { - com.google.cloud.filestore.v1beta1.CreateBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.CreateBackupRequest buildPartial() { - com.google.cloud.filestore.v1beta1.CreateBackupRequest result = new com.google.cloud.filestore.v1beta1.CreateBackupRequest(this); - result.parent_ = parent_; - if (backupBuilder_ == null) { - result.backup_ = backup_; - } else { - result.backup_ = backupBuilder_.build(); - } - result.backupId_ = backupId_; - 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.filestore.v1beta1.CreateBackupRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.CreateBackupRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.CreateBackupRequest other) { - if (other == com.google.cloud.filestore.v1beta1.CreateBackupRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasBackup()) { - mergeBackup(other.getBackup()); - } - if (!other.getBackupId().isEmpty()) { - backupId_ = other.backupId_; - 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.filestore.v1beta1.CreateBackupRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.CreateBackupRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The backup's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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 backup's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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 backup's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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 backup's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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 backup's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * backup locations map to GCP regions, for example **us-west1**.
-     * 
- * - * 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.filestore.v1beta1.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Backup, com.google.cloud.filestore.v1beta1.Backup.Builder, com.google.cloud.filestore.v1beta1.BackupOrBuilder> backupBuilder_; - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - public boolean hasBackup() { - return backupBuilder_ != null || backup_ != null; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - public com.google.cloud.filestore.v1beta1.Backup getBackup() { - if (backupBuilder_ == null) { - return backup_ == null ? com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance() : backup_; - } else { - return backupBuilder_.getMessage(); - } - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBackup(com.google.cloud.filestore.v1beta1.Backup value) { - if (backupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - onChanged(); - } else { - backupBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBackup( - com.google.cloud.filestore.v1beta1.Backup.Builder builderForValue) { - if (backupBuilder_ == null) { - backup_ = builderForValue.build(); - onChanged(); - } else { - backupBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeBackup(com.google.cloud.filestore.v1beta1.Backup value) { - if (backupBuilder_ == null) { - if (backup_ != null) { - backup_ = - com.google.cloud.filestore.v1beta1.Backup.newBuilder(backup_).mergeFrom(value).buildPartial(); - } else { - backup_ = value; - } - onChanged(); - } else { - backupBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearBackup() { - if (backupBuilder_ == null) { - backup_ = null; - onChanged(); - } else { - backup_ = null; - backupBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1beta1.Backup.Builder getBackupBuilder() { - - onChanged(); - return getBackupFieldBuilder().getBuilder(); - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1beta1.BackupOrBuilder getBackupOrBuilder() { - if (backupBuilder_ != null) { - return backupBuilder_.getMessageOrBuilder(); - } else { - return backup_ == null ? - com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance() : backup_; - } - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Backup, com.google.cloud.filestore.v1beta1.Backup.Builder, com.google.cloud.filestore.v1beta1.BackupOrBuilder> - getBackupFieldBuilder() { - if (backupBuilder_ == null) { - backupBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Backup, com.google.cloud.filestore.v1beta1.Backup.Builder, com.google.cloud.filestore.v1beta1.BackupOrBuilder>( - getBackup(), - getParentForChildren(), - isClean()); - backup_ = null; - } - return backupBuilder_; - } - - private java.lang.Object backupId_ = ""; - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The backupId. - */ - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backupId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for backupId. - */ - public com.google.protobuf.ByteString - getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - backupId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - backupId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearBackupId() { - - backupId_ = getDefaultInstance().getBackupId(); - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the backup.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - backupId_ = 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.filestore.v1beta1.CreateBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.CreateBackupRequest) - private static final com.google.cloud.filestore.v1beta1.CreateBackupRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.CreateBackupRequest(); - } - - public static com.google.cloud.filestore.v1beta1.CreateBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateBackupRequest(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.filestore.v1beta1.CreateBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateBackupRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateBackupRequestOrBuilder.java deleted file mode 100644 index e9b649f9600e..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateBackupRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface CreateBackupRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.CreateBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The backup's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The backup's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * backup locations map to GCP regions, for example **us-west1**.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - boolean hasBackup(); - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - com.google.cloud.filestore.v1beta1.Backup getBackup(); - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.filestore.v1beta1.BackupOrBuilder getBackupOrBuilder(); - - /** - *
-   * Required. The ID to use for the backup.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The backupId. - */ - java.lang.String getBackupId(); - /** - *
-   * Required. The ID to use for the backup.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * 
- * - * string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for backupId. - */ - com.google.protobuf.ByteString - getBackupIdBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateInstanceRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateInstanceRequest.java deleted file mode 100644 index 9c4d47303245..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateInstanceRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * CreateInstanceRequest creates an instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.CreateInstanceRequest} - */ -public final class CreateInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.CreateInstanceRequest) - CreateInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateInstanceRequest.newBuilder() to construct. - private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateInstanceRequest() { - parent_ = ""; - instanceId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateInstanceRequest( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - - instanceId_ = s; - break; - } - case 26: { - com.google.cloud.filestore.v1beta1.Instance.Builder subBuilder = null; - if (instance_ != null) { - subBuilder = instance_.toBuilder(); - } - instance_ = input.readMessage(com.google.cloud.filestore.v1beta1.Instance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instance_); - instance_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.CreateInstanceRequest.class, com.google.cloud.filestore.v1beta1.CreateInstanceRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The instance's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * locations map to GCP zones, for example **us-west1-b**.
-   * 
- * - * 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 instance's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * locations map to GCP zones, for example **us-west1-b**.
-   * 
- * - * 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 INSTANCE_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object instanceId_; - /** - *
-   * Required. The ID of the instance to create.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instanceId. - */ - @java.lang.Override - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - 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(); - instanceId_ = s; - return s; - } - } - /** - *
-   * Required. The ID of the instance to create.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for instanceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSTANCE_FIELD_NUMBER = 3; - private com.google.cloud.filestore.v1beta1.Instance instance_; - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - @java.lang.Override - public boolean hasInstance() { - return instance_ != null; - } - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Instance getInstance() { - return instance_ == null ? com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance() : instance_; - } - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { - return getInstance(); - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); - } - if (instance_ != null) { - output.writeMessage(3, getInstance()); - } - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); - } - if (instance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getInstance()); - } - 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.filestore.v1beta1.CreateInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.CreateInstanceRequest other = (com.google.cloud.filestore.v1beta1.CreateInstanceRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getInstanceId() - .equals(other.getInstanceId())) return false; - if (hasInstance() != other.hasInstance()) return false; - if (hasInstance()) { - if (!getInstance() - .equals(other.getInstance())) 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(); - hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; - hash = (53 * hash) + getInstanceId().hashCode(); - if (hasInstance()) { - hash = (37 * hash) + INSTANCE_FIELD_NUMBER; - hash = (53 * hash) + getInstance().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.CreateInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.CreateInstanceRequest 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.filestore.v1beta1.CreateInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.CreateInstanceRequest 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.filestore.v1beta1.CreateInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.CreateInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.CreateInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.CreateInstanceRequest 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.filestore.v1beta1.CreateInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.CreateInstanceRequest 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.filestore.v1beta1.CreateInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.CreateInstanceRequest 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.filestore.v1beta1.CreateInstanceRequest 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; - } - /** - *
-   * CreateInstanceRequest creates an instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.CreateInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.CreateInstanceRequest) - com.google.cloud.filestore.v1beta1.CreateInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.CreateInstanceRequest.class, com.google.cloud.filestore.v1beta1.CreateInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.CreateInstanceRequest.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_ = ""; - - instanceId_ = ""; - - if (instanceBuilder_ == null) { - instance_ = null; - } else { - instance_ = null; - instanceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_CreateInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.CreateInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.CreateInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.CreateInstanceRequest build() { - com.google.cloud.filestore.v1beta1.CreateInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.CreateInstanceRequest buildPartial() { - com.google.cloud.filestore.v1beta1.CreateInstanceRequest result = new com.google.cloud.filestore.v1beta1.CreateInstanceRequest(this); - result.parent_ = parent_; - result.instanceId_ = instanceId_; - if (instanceBuilder_ == null) { - result.instance_ = instance_; - } else { - result.instance_ = instanceBuilder_.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.filestore.v1beta1.CreateInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.CreateInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.CreateInstanceRequest other) { - if (other == com.google.cloud.filestore.v1beta1.CreateInstanceRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getInstanceId().isEmpty()) { - instanceId_ = other.instanceId_; - onChanged(); - } - if (other.hasInstance()) { - mergeInstance(other.getInstance()); - } - 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.filestore.v1beta1.CreateInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.CreateInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 instance's project and location, in the format
-     * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-     * locations map to GCP zones, for example **us-west1-b**.
-     * 
- * - * 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 java.lang.Object instanceId_ = ""; - /** - *
-     * Required. The ID of the instance to create.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instanceId. - */ - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ID of the instance to create.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for instanceId. - */ - public com.google.protobuf.ByteString - getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ID of the instance to create.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - instanceId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ID of the instance to create.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearInstanceId() { - - instanceId_ = getDefaultInstance().getInstanceId(); - onChanged(); - return this; - } - /** - *
-     * Required. The ID of the instance to create.
-     * The ID must be unique within the specified project and location.
-     * This value must start with a lowercase letter followed by up to 62
-     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-     * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - instanceId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.filestore.v1beta1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Instance, com.google.cloud.filestore.v1beta1.Instance.Builder, com.google.cloud.filestore.v1beta1.InstanceOrBuilder> instanceBuilder_; - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - public boolean hasInstance() { - return instanceBuilder_ != null || instance_ != null; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - public com.google.cloud.filestore.v1beta1.Instance getInstance() { - if (instanceBuilder_ == null) { - return instance_ == null ? com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance() : instance_; - } else { - return instanceBuilder_.getMessage(); - } - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInstance(com.google.cloud.filestore.v1beta1.Instance value) { - if (instanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instance_ = value; - onChanged(); - } else { - instanceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInstance( - com.google.cloud.filestore.v1beta1.Instance.Builder builderForValue) { - if (instanceBuilder_ == null) { - instance_ = builderForValue.build(); - onChanged(); - } else { - instanceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeInstance(com.google.cloud.filestore.v1beta1.Instance value) { - if (instanceBuilder_ == null) { - if (instance_ != null) { - instance_ = - com.google.cloud.filestore.v1beta1.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); - } else { - instance_ = value; - } - onChanged(); - } else { - instanceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearInstance() { - if (instanceBuilder_ == null) { - instance_ = null; - onChanged(); - } else { - instance_ = null; - instanceBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1beta1.Instance.Builder getInstanceBuilder() { - - onChanged(); - return getInstanceFieldBuilder().getBuilder(); - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { - if (instanceBuilder_ != null) { - return instanceBuilder_.getMessageOrBuilder(); - } else { - return instance_ == null ? - com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance() : instance_; - } - } - /** - *
-     * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Instance, com.google.cloud.filestore.v1beta1.Instance.Builder, com.google.cloud.filestore.v1beta1.InstanceOrBuilder> - getInstanceFieldBuilder() { - if (instanceBuilder_ == null) { - instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Instance, com.google.cloud.filestore.v1beta1.Instance.Builder, com.google.cloud.filestore.v1beta1.InstanceOrBuilder>( - getInstance(), - getParentForChildren(), - isClean()); - instance_ = null; - } - return instanceBuilder_; - } - @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.filestore.v1beta1.CreateInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.CreateInstanceRequest) - private static final com.google.cloud.filestore.v1beta1.CreateInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.CreateInstanceRequest(); - } - - public static com.google.cloud.filestore.v1beta1.CreateInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateInstanceRequest(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.filestore.v1beta1.CreateInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateInstanceRequestOrBuilder.java deleted file mode 100644 index 332ac57bb16e..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/CreateInstanceRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface CreateInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.CreateInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The instance's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * locations map to GCP zones, for example **us-west1-b**.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The instance's project and location, in the format
-   * `projects/{project_id}/locations/{location}`. In Cloud Filestore,
-   * locations map to GCP zones, for example **us-west1-b**.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The ID of the instance to create.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instanceId. - */ - java.lang.String getInstanceId(); - /** - *
-   * Required. The ID of the instance to create.
-   * The ID must be unique within the specified project and location.
-   * This value must start with a lowercase letter followed by up to 62
-   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
-   * 
- * - * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for instanceId. - */ - com.google.protobuf.ByteString - getInstanceIdBytes(); - - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - boolean hasInstance(); - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - com.google.cloud.filestore.v1beta1.Instance getInstance(); - /** - *
-   * Required. An [instance resource][google.cloud.filestore.v1beta1.Instance]
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.filestore.v1beta1.InstanceOrBuilder getInstanceOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteBackupRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteBackupRequest.java deleted file mode 100644 index 3775eb379f04..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteBackupRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * DeleteBackupRequest deletes a backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.DeleteBackupRequest} - */ -public final class DeleteBackupRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.DeleteBackupRequest) - DeleteBackupRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteBackupRequest.newBuilder() to construct. - private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteBackupRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteBackupRequest( - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.DeleteBackupRequest.class, com.google.cloud.filestore.v1beta1.DeleteBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_id}/locations/{location}/backups/{backup_id}`
-   * 
- * - * 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 backup resource name, in the format
-   * `projects/{project_id}/locations/{location}/backups/{backup_id}`
-   * 
- * - * 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.filestore.v1beta1.DeleteBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.DeleteBackupRequest other = (com.google.cloud.filestore.v1beta1.DeleteBackupRequest) 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.filestore.v1beta1.DeleteBackupRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.DeleteBackupRequest 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.filestore.v1beta1.DeleteBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.DeleteBackupRequest 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.filestore.v1beta1.DeleteBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.DeleteBackupRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.DeleteBackupRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.DeleteBackupRequest 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.filestore.v1beta1.DeleteBackupRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.DeleteBackupRequest 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.filestore.v1beta1.DeleteBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.DeleteBackupRequest 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.filestore.v1beta1.DeleteBackupRequest 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; - } - /** - *
-   * DeleteBackupRequest deletes a backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.DeleteBackupRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.DeleteBackupRequest) - com.google.cloud.filestore.v1beta1.DeleteBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.DeleteBackupRequest.class, com.google.cloud.filestore.v1beta1.DeleteBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.DeleteBackupRequest.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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.DeleteBackupRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.DeleteBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.DeleteBackupRequest build() { - com.google.cloud.filestore.v1beta1.DeleteBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.DeleteBackupRequest buildPartial() { - com.google.cloud.filestore.v1beta1.DeleteBackupRequest result = new com.google.cloud.filestore.v1beta1.DeleteBackupRequest(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.filestore.v1beta1.DeleteBackupRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.DeleteBackupRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.DeleteBackupRequest other) { - if (other == com.google.cloud.filestore.v1beta1.DeleteBackupRequest.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.filestore.v1beta1.DeleteBackupRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.DeleteBackupRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`
-     * 
- * - * 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.filestore.v1beta1.DeleteBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.DeleteBackupRequest) - private static final com.google.cloud.filestore.v1beta1.DeleteBackupRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.DeleteBackupRequest(); - } - - public static com.google.cloud.filestore.v1beta1.DeleteBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteBackupRequest(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.filestore.v1beta1.DeleteBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteBackupRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteBackupRequestOrBuilder.java deleted file mode 100644 index 46bf045c3ce5..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteBackupRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface DeleteBackupRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.DeleteBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_id}/locations/{location}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_id}/locations/{location}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteInstanceRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteInstanceRequest.java deleted file mode 100644 index 5fef0da65b7d..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteInstanceRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * DeleteInstanceRequest deletes an instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.DeleteInstanceRequest} - */ -public final class DeleteInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.DeleteInstanceRequest) - DeleteInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteInstanceRequest.newBuilder() to construct. - private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteInstanceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteInstanceRequest( - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.DeleteInstanceRequest.class, com.google.cloud.filestore.v1beta1.DeleteInstanceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-   * 
- * - * 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 instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-   * 
- * - * 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.filestore.v1beta1.DeleteInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.DeleteInstanceRequest other = (com.google.cloud.filestore.v1beta1.DeleteInstanceRequest) 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.filestore.v1beta1.DeleteInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.DeleteInstanceRequest 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.filestore.v1beta1.DeleteInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.DeleteInstanceRequest 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.filestore.v1beta1.DeleteInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.DeleteInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.DeleteInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.DeleteInstanceRequest 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.filestore.v1beta1.DeleteInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.DeleteInstanceRequest 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.filestore.v1beta1.DeleteInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.DeleteInstanceRequest 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.filestore.v1beta1.DeleteInstanceRequest 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; - } - /** - *
-   * DeleteInstanceRequest deletes an instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.DeleteInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.DeleteInstanceRequest) - com.google.cloud.filestore.v1beta1.DeleteInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.DeleteInstanceRequest.class, com.google.cloud.filestore.v1beta1.DeleteInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.DeleteInstanceRequest.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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_DeleteInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.DeleteInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.DeleteInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.DeleteInstanceRequest build() { - com.google.cloud.filestore.v1beta1.DeleteInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.DeleteInstanceRequest buildPartial() { - com.google.cloud.filestore.v1beta1.DeleteInstanceRequest result = new com.google.cloud.filestore.v1beta1.DeleteInstanceRequest(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.filestore.v1beta1.DeleteInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.DeleteInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.DeleteInstanceRequest other) { - if (other == com.google.cloud.filestore.v1beta1.DeleteInstanceRequest.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.filestore.v1beta1.DeleteInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.DeleteInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-     * 
- * - * 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.filestore.v1beta1.DeleteInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.DeleteInstanceRequest) - private static final com.google.cloud.filestore.v1beta1.DeleteInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.DeleteInstanceRequest(); - } - - public static com.google.cloud.filestore.v1beta1.DeleteInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstanceRequest(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.filestore.v1beta1.DeleteInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteInstanceRequestOrBuilder.java deleted file mode 100644 index eb5d1f975169..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/DeleteInstanceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface DeleteInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.DeleteInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/FileShareConfig.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/FileShareConfig.java deleted file mode 100644 index fa126678cf18..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/FileShareConfig.java +++ /dev/null @@ -1,1449 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * File share configuration for the instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.FileShareConfig} - */ -public final class FileShareConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.FileShareConfig) - FileShareConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use FileShareConfig.newBuilder() to construct. - private FileShareConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FileShareConfig() { - name_ = ""; - nfsExportOptions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FileShareConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FileShareConfig( - 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 16: { - - capacityGb_ = input.readInt64(); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - nfsExportOptions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nfsExportOptions_.add( - input.readMessage(com.google.cloud.filestore.v1beta1.NfsExportOptions.parser(), extensionRegistry)); - break; - } - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - sourceCase_ = 9; - source_ = 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)) { - nfsExportOptions_ = java.util.Collections.unmodifiableList(nfsExportOptions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_FileShareConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_FileShareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.FileShareConfig.class, com.google.cloud.filestore.v1beta1.FileShareConfig.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SOURCE_BACKUP(9), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 9: return SOURCE_BACKUP; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The name of the file share (must be 16 characters or less).
-   * 
- * - * 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; - } - } - /** - *
-   * The name of the file share (must be 16 characters or less).
-   * 
- * - * 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 CAPACITY_GB_FIELD_NUMBER = 2; - private long capacityGb_; - /** - *
-   * File share capacity in gigabytes (GB).
-   * Cloud Filestore defines 1 GB as 1024^3 bytes.
-   * 
- * - * int64 capacity_gb = 2; - * @return The capacityGb. - */ - @java.lang.Override - public long getCapacityGb() { - return capacityGb_; - } - - public static final int SOURCE_BACKUP_FIELD_NUMBER = 9; - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-   * this file share has been restored from.
-   * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - public boolean hasSourceBackup() { - return sourceCase_ == 9; - } - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-   * this file share has been restored from.
-   * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - public java.lang.String getSourceBackup() { - java.lang.Object ref = ""; - if (sourceCase_ == 9) { - ref = source_; - } - 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(); - if (sourceCase_ == 9) { - source_ = s; - } - return s; - } - } - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-   * this file share has been restored from.
-   * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - public com.google.protobuf.ByteString - getSourceBackupBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 9) { - ref = source_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 9) { - source_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NFS_EXPORT_OPTIONS_FIELD_NUMBER = 8; - private java.util.List nfsExportOptions_; - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - @java.lang.Override - public java.util.List getNfsExportOptionsList() { - return nfsExportOptions_; - } - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - @java.lang.Override - public java.util.List - getNfsExportOptionsOrBuilderList() { - return nfsExportOptions_; - } - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - @java.lang.Override - public int getNfsExportOptionsCount() { - return nfsExportOptions_.size(); - } - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NfsExportOptions getNfsExportOptions(int index) { - return nfsExportOptions_.get(index); - } - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NfsExportOptionsOrBuilder getNfsExportOptionsOrBuilder( - int index) { - return nfsExportOptions_.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 (capacityGb_ != 0L) { - output.writeInt64(2, capacityGb_); - } - for (int i = 0; i < nfsExportOptions_.size(); i++) { - output.writeMessage(8, nfsExportOptions_.get(i)); - } - if (sourceCase_ == 9) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, source_); - } - 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 (capacityGb_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, capacityGb_); - } - for (int i = 0; i < nfsExportOptions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, nfsExportOptions_.get(i)); - } - if (sourceCase_ == 9) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, source_); - } - 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.filestore.v1beta1.FileShareConfig)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.FileShareConfig other = (com.google.cloud.filestore.v1beta1.FileShareConfig) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getCapacityGb() - != other.getCapacityGb()) return false; - if (!getNfsExportOptionsList() - .equals(other.getNfsExportOptionsList())) return false; - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 9: - if (!getSourceBackup() - .equals(other.getSourceBackup())) return false; - break; - case 0: - default: - } - 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) + CAPACITY_GB_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCapacityGb()); - if (getNfsExportOptionsCount() > 0) { - hash = (37 * hash) + NFS_EXPORT_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getNfsExportOptionsList().hashCode(); - } - switch (sourceCase_) { - case 9: - hash = (37 * hash) + SOURCE_BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getSourceBackup().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.FileShareConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.FileShareConfig 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.filestore.v1beta1.FileShareConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.FileShareConfig 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.filestore.v1beta1.FileShareConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.FileShareConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.FileShareConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.FileShareConfig 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.filestore.v1beta1.FileShareConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.FileShareConfig 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.filestore.v1beta1.FileShareConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.FileShareConfig 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.filestore.v1beta1.FileShareConfig 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; - } - /** - *
-   * File share configuration for the instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.FileShareConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.FileShareConfig) - com.google.cloud.filestore.v1beta1.FileShareConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_FileShareConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_FileShareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.FileShareConfig.class, com.google.cloud.filestore.v1beta1.FileShareConfig.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.FileShareConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getNfsExportOptionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - capacityGb_ = 0L; - - if (nfsExportOptionsBuilder_ == null) { - nfsExportOptions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - nfsExportOptionsBuilder_.clear(); - } - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_FileShareConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.FileShareConfig getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.FileShareConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.FileShareConfig build() { - com.google.cloud.filestore.v1beta1.FileShareConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.FileShareConfig buildPartial() { - com.google.cloud.filestore.v1beta1.FileShareConfig result = new com.google.cloud.filestore.v1beta1.FileShareConfig(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.capacityGb_ = capacityGb_; - if (sourceCase_ == 9) { - result.source_ = source_; - } - if (nfsExportOptionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - nfsExportOptions_ = java.util.Collections.unmodifiableList(nfsExportOptions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.nfsExportOptions_ = nfsExportOptions_; - } else { - result.nfsExportOptions_ = nfsExportOptionsBuilder_.build(); - } - result.sourceCase_ = sourceCase_; - 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.filestore.v1beta1.FileShareConfig) { - return mergeFrom((com.google.cloud.filestore.v1beta1.FileShareConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.FileShareConfig other) { - if (other == com.google.cloud.filestore.v1beta1.FileShareConfig.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getCapacityGb() != 0L) { - setCapacityGb(other.getCapacityGb()); - } - if (nfsExportOptionsBuilder_ == null) { - if (!other.nfsExportOptions_.isEmpty()) { - if (nfsExportOptions_.isEmpty()) { - nfsExportOptions_ = other.nfsExportOptions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.addAll(other.nfsExportOptions_); - } - onChanged(); - } - } else { - if (!other.nfsExportOptions_.isEmpty()) { - if (nfsExportOptionsBuilder_.isEmpty()) { - nfsExportOptionsBuilder_.dispose(); - nfsExportOptionsBuilder_ = null; - nfsExportOptions_ = other.nfsExportOptions_; - bitField0_ = (bitField0_ & ~0x00000001); - nfsExportOptionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNfsExportOptionsFieldBuilder() : null; - } else { - nfsExportOptionsBuilder_.addAllMessages(other.nfsExportOptions_); - } - } - } - switch (other.getSourceCase()) { - case SOURCE_BACKUP: { - sourceCase_ = 9; - source_ = other.source_; - onChanged(); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - 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.filestore.v1beta1.FileShareConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.FileShareConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * 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; - } - } - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * 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; - } - } - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * 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; - } - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The name of the file share (must be 16 characters or less).
-     * 
- * - * 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 long capacityGb_ ; - /** - *
-     * File share capacity in gigabytes (GB).
-     * Cloud Filestore defines 1 GB as 1024^3 bytes.
-     * 
- * - * int64 capacity_gb = 2; - * @return The capacityGb. - */ - @java.lang.Override - public long getCapacityGb() { - return capacityGb_; - } - /** - *
-     * File share capacity in gigabytes (GB).
-     * Cloud Filestore defines 1 GB as 1024^3 bytes.
-     * 
- * - * int64 capacity_gb = 2; - * @param value The capacityGb to set. - * @return This builder for chaining. - */ - public Builder setCapacityGb(long value) { - - capacityGb_ = value; - onChanged(); - return this; - } - /** - *
-     * File share capacity in gigabytes (GB).
-     * Cloud Filestore defines 1 GB as 1024^3 bytes.
-     * 
- * - * int64 capacity_gb = 2; - * @return This builder for chaining. - */ - public Builder clearCapacityGb() { - - capacityGb_ = 0L; - onChanged(); - return this; - } - - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-     * this file share has been restored from.
-     * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - @java.lang.Override - public boolean hasSourceBackup() { - return sourceCase_ == 9; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-     * this file share has been restored from.
-     * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - @java.lang.Override - public java.lang.String getSourceBackup() { - java.lang.Object ref = ""; - if (sourceCase_ == 9) { - ref = source_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (sourceCase_ == 9) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-     * this file share has been restored from.
-     * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceBackupBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 9) { - ref = source_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 9) { - source_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-     * this file share has been restored from.
-     * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @param value The sourceBackup to set. - * @return This builder for chaining. - */ - public Builder setSourceBackup( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceCase_ = 9; - source_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-     * this file share has been restored from.
-     * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearSourceBackup() { - if (sourceCase_ == 9) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-     * this file share has been restored from.
-     * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @param value The bytes for sourceBackup to set. - * @return This builder for chaining. - */ - public Builder setSourceBackupBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceCase_ = 9; - source_ = value; - onChanged(); - return this; - } - - private java.util.List nfsExportOptions_ = - java.util.Collections.emptyList(); - private void ensureNfsExportOptionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - nfsExportOptions_ = new java.util.ArrayList(nfsExportOptions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.NfsExportOptions, com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder, com.google.cloud.filestore.v1beta1.NfsExportOptionsOrBuilder> nfsExportOptionsBuilder_; - - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public java.util.List getNfsExportOptionsList() { - if (nfsExportOptionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(nfsExportOptions_); - } else { - return nfsExportOptionsBuilder_.getMessageList(); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public int getNfsExportOptionsCount() { - if (nfsExportOptionsBuilder_ == null) { - return nfsExportOptions_.size(); - } else { - return nfsExportOptionsBuilder_.getCount(); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public com.google.cloud.filestore.v1beta1.NfsExportOptions getNfsExportOptions(int index) { - if (nfsExportOptionsBuilder_ == null) { - return nfsExportOptions_.get(index); - } else { - return nfsExportOptionsBuilder_.getMessage(index); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public Builder setNfsExportOptions( - int index, com.google.cloud.filestore.v1beta1.NfsExportOptions value) { - if (nfsExportOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.set(index, value); - onChanged(); - } else { - nfsExportOptionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public Builder setNfsExportOptions( - int index, com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder builderForValue) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.set(index, builderForValue.build()); - onChanged(); - } else { - nfsExportOptionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public Builder addNfsExportOptions(com.google.cloud.filestore.v1beta1.NfsExportOptions value) { - if (nfsExportOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.add(value); - onChanged(); - } else { - nfsExportOptionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public Builder addNfsExportOptions( - int index, com.google.cloud.filestore.v1beta1.NfsExportOptions value) { - if (nfsExportOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.add(index, value); - onChanged(); - } else { - nfsExportOptionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public Builder addNfsExportOptions( - com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder builderForValue) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.add(builderForValue.build()); - onChanged(); - } else { - nfsExportOptionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public Builder addNfsExportOptions( - int index, com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder builderForValue) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.add(index, builderForValue.build()); - onChanged(); - } else { - nfsExportOptionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public Builder addAllNfsExportOptions( - java.lang.Iterable values) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nfsExportOptions_); - onChanged(); - } else { - nfsExportOptionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public Builder clearNfsExportOptions() { - if (nfsExportOptionsBuilder_ == null) { - nfsExportOptions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - nfsExportOptionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public Builder removeNfsExportOptions(int index) { - if (nfsExportOptionsBuilder_ == null) { - ensureNfsExportOptionsIsMutable(); - nfsExportOptions_.remove(index); - onChanged(); - } else { - nfsExportOptionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder getNfsExportOptionsBuilder( - int index) { - return getNfsExportOptionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public com.google.cloud.filestore.v1beta1.NfsExportOptionsOrBuilder getNfsExportOptionsOrBuilder( - int index) { - if (nfsExportOptionsBuilder_ == null) { - return nfsExportOptions_.get(index); } else { - return nfsExportOptionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public java.util.List - getNfsExportOptionsOrBuilderList() { - if (nfsExportOptionsBuilder_ != null) { - return nfsExportOptionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nfsExportOptions_); - } - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder addNfsExportOptionsBuilder() { - return getNfsExportOptionsFieldBuilder().addBuilder( - com.google.cloud.filestore.v1beta1.NfsExportOptions.getDefaultInstance()); - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder addNfsExportOptionsBuilder( - int index) { - return getNfsExportOptionsFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1beta1.NfsExportOptions.getDefaultInstance()); - } - /** - *
-     * Nfs Export Options.
-     * There is a limit of 10 export options per file share.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - public java.util.List - getNfsExportOptionsBuilderList() { - return getNfsExportOptionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.NfsExportOptions, com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder, com.google.cloud.filestore.v1beta1.NfsExportOptionsOrBuilder> - getNfsExportOptionsFieldBuilder() { - if (nfsExportOptionsBuilder_ == null) { - nfsExportOptionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.NfsExportOptions, com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder, com.google.cloud.filestore.v1beta1.NfsExportOptionsOrBuilder>( - nfsExportOptions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - nfsExportOptions_ = null; - } - return nfsExportOptionsBuilder_; - } - @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.filestore.v1beta1.FileShareConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.FileShareConfig) - private static final com.google.cloud.filestore.v1beta1.FileShareConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.FileShareConfig(); - } - - public static com.google.cloud.filestore.v1beta1.FileShareConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FileShareConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FileShareConfig(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.filestore.v1beta1.FileShareConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/FileShareConfigOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/FileShareConfigOrBuilder.java deleted file mode 100644 index e2da731e6675..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/FileShareConfigOrBuilder.java +++ /dev/null @@ -1,126 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface FileShareConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.FileShareConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the file share (must be 16 characters or less).
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the file share (must be 16 characters or less).
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * File share capacity in gigabytes (GB).
-   * Cloud Filestore defines 1 GB as 1024^3 bytes.
-   * 
- * - * int64 capacity_gb = 2; - * @return The capacityGb. - */ - long getCapacityGb(); - - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-   * this file share has been restored from.
-   * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - boolean hasSourceBackup(); - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-   * this file share has been restored from.
-   * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - java.lang.String getSourceBackup(); - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
-   * this file share has been restored from.
-   * 
- * - * string source_backup = 9 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - com.google.protobuf.ByteString - getSourceBackupBytes(); - - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - java.util.List - getNfsExportOptionsList(); - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - com.google.cloud.filestore.v1beta1.NfsExportOptions getNfsExportOptions(int index); - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - int getNfsExportOptionsCount(); - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - java.util.List - getNfsExportOptionsOrBuilderList(); - /** - *
-   * Nfs Export Options.
-   * There is a limit of 10 export options per file share.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 8; - */ - com.google.cloud.filestore.v1beta1.NfsExportOptionsOrBuilder getNfsExportOptionsOrBuilder( - int index); - - public com.google.cloud.filestore.v1beta1.FileShareConfig.SourceCase getSourceCase(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetBackupRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetBackupRequest.java deleted file mode 100644 index 90f8130bc6a4..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetBackupRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * GetBackupRequest gets the state of a backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.GetBackupRequest} - */ -public final class GetBackupRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.GetBackupRequest) - GetBackupRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetBackupRequest.newBuilder() to construct. - private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBackupRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetBackupRequest( - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.GetBackupRequest.class, com.google.cloud.filestore.v1beta1.GetBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
-   * 
- * - * 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 backup resource name, in the format
-   * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
-   * 
- * - * 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.filestore.v1beta1.GetBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.GetBackupRequest other = (com.google.cloud.filestore.v1beta1.GetBackupRequest) 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.filestore.v1beta1.GetBackupRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.GetBackupRequest 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.filestore.v1beta1.GetBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.GetBackupRequest 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.filestore.v1beta1.GetBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.GetBackupRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.GetBackupRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.GetBackupRequest 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.filestore.v1beta1.GetBackupRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.GetBackupRequest 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.filestore.v1beta1.GetBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.GetBackupRequest 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.filestore.v1beta1.GetBackupRequest 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; - } - /** - *
-   * GetBackupRequest gets the state of a backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.GetBackupRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.GetBackupRequest) - com.google.cloud.filestore.v1beta1.GetBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.GetBackupRequest.class, com.google.cloud.filestore.v1beta1.GetBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.GetBackupRequest.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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.GetBackupRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.GetBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.GetBackupRequest build() { - com.google.cloud.filestore.v1beta1.GetBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.GetBackupRequest buildPartial() { - com.google.cloud.filestore.v1beta1.GetBackupRequest result = new com.google.cloud.filestore.v1beta1.GetBackupRequest(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.filestore.v1beta1.GetBackupRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.GetBackupRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.GetBackupRequest other) { - if (other == com.google.cloud.filestore.v1beta1.GetBackupRequest.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.filestore.v1beta1.GetBackupRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.GetBackupRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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 backup resource name, in the format
-     * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
-     * 
- * - * 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.filestore.v1beta1.GetBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.GetBackupRequest) - private static final com.google.cloud.filestore.v1beta1.GetBackupRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.GetBackupRequest(); - } - - public static com.google.cloud.filestore.v1beta1.GetBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetBackupRequest(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.filestore.v1beta1.GetBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetBackupRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetBackupRequestOrBuilder.java deleted file mode 100644 index a64f2b9d2fdb..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetBackupRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface GetBackupRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.GetBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The backup resource name, in the format
-   * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetInstanceRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetInstanceRequest.java deleted file mode 100644 index 6844a707a75f..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetInstanceRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * GetInstanceRequest gets the state of an instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.GetInstanceRequest} - */ -public final class GetInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.GetInstanceRequest) - GetInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetInstanceRequest.newBuilder() to construct. - private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetInstanceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetInstanceRequest( - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.GetInstanceRequest.class, com.google.cloud.filestore.v1beta1.GetInstanceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-   * 
- * - * 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 instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-   * 
- * - * 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.filestore.v1beta1.GetInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.GetInstanceRequest other = (com.google.cloud.filestore.v1beta1.GetInstanceRequest) 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.filestore.v1beta1.GetInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.GetInstanceRequest 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.filestore.v1beta1.GetInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.GetInstanceRequest 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.filestore.v1beta1.GetInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.GetInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.GetInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.GetInstanceRequest 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.filestore.v1beta1.GetInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.GetInstanceRequest 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.filestore.v1beta1.GetInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.GetInstanceRequest 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.filestore.v1beta1.GetInstanceRequest 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; - } - /** - *
-   * GetInstanceRequest gets the state of an instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.GetInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.GetInstanceRequest) - com.google.cloud.filestore.v1beta1.GetInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.GetInstanceRequest.class, com.google.cloud.filestore.v1beta1.GetInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.GetInstanceRequest.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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_GetInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.GetInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.GetInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.GetInstanceRequest build() { - com.google.cloud.filestore.v1beta1.GetInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.GetInstanceRequest buildPartial() { - com.google.cloud.filestore.v1beta1.GetInstanceRequest result = new com.google.cloud.filestore.v1beta1.GetInstanceRequest(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.filestore.v1beta1.GetInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.GetInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.GetInstanceRequest other) { - if (other == com.google.cloud.filestore.v1beta1.GetInstanceRequest.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.filestore.v1beta1.GetInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.GetInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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 instance resource name, in the format
-     * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-     * 
- * - * 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.filestore.v1beta1.GetInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.GetInstanceRequest) - private static final com.google.cloud.filestore.v1beta1.GetInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.GetInstanceRequest(); - } - - public static com.google.cloud.filestore.v1beta1.GetInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInstanceRequest(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.filestore.v1beta1.GetInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetInstanceRequestOrBuilder.java deleted file mode 100644 index 80e191742978..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/GetInstanceRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface GetInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.GetInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The instance resource name, in the format
-   * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/Instance.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/Instance.java deleted file mode 100644 index 73101c540273..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/Instance.java +++ /dev/null @@ -1,3513 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * A Cloud Filestore instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.Instance} - */ -public final class Instance extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.Instance) - InstanceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Instance.newBuilder() to construct. - private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Instance() { - name_ = ""; - description_ = ""; - state_ = 0; - statusMessage_ = ""; - tier_ = 0; - fileShares_ = java.util.Collections.emptyList(); - networks_ = java.util.Collections.emptyList(); - etag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Instance(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Instance( - 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 40: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - statusMessage_ = s; - break; - } - case 58: { - 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 64: { - int rawValue = input.readEnum(); - - tier_ = rawValue; - break; - } - case 74: { - 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 82: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fileShares_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fileShares_.add( - input.readMessage(com.google.cloud.filestore.v1beta1.FileShareConfig.parser(), extensionRegistry)); - break; - } - case 90: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - networks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - networks_.add( - input.readMessage(com.google.cloud.filestore.v1beta1.NetworkConfig.parser(), extensionRegistry)); - break; - } - case 98: { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 106: { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (satisfiesPzs_ != null) { - subBuilder = satisfiesPzs_.toBuilder(); - } - satisfiesPzs_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(satisfiesPzs_); - satisfiesPzs_ = 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 { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fileShares_ = java.util.Collections.unmodifiableList(fileShares_); - } - if (((mutable_bitField0_ & 0x00000004) != 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Instance_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 9: - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Instance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.Instance.class, com.google.cloud.filestore.v1beta1.Instance.Builder.class); - } - - /** - *
-   * The instance state.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1beta1.Instance.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * The instance is being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - *
-     * The instance is available for use.
-     * 
- * - * READY = 2; - */ - READY(2), - /** - *
-     * Work is being done on the instance. You can get further details from the
-     * `statusMessage` field of the `Instance` resource.
-     * 
- * - * REPAIRING = 3; - */ - REPAIRING(3), - /** - *
-     * The instance is shutting down.
-     * 
- * - * DELETING = 4; - */ - DELETING(4), - /** - *
-     * The instance is experiencing an issue and might be unusable. You can get
-     * further details from the `statusMessage` field of the `Instance`
-     * resource.
-     * 
- * - * ERROR = 6; - */ - ERROR(6), - /** - *
-     * The instance is restoring a snapshot or backup to an existing file share
-     * and may be unusable during this time.
-     * 
- * - * RESTORING = 7; - */ - RESTORING(7), - UNRECOGNIZED(-1), - ; - - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The instance is being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - *
-     * The instance is available for use.
-     * 
- * - * READY = 2; - */ - public static final int READY_VALUE = 2; - /** - *
-     * Work is being done on the instance. You can get further details from the
-     * `statusMessage` field of the `Instance` resource.
-     * 
- * - * REPAIRING = 3; - */ - public static final int REPAIRING_VALUE = 3; - /** - *
-     * The instance is shutting down.
-     * 
- * - * DELETING = 4; - */ - public static final int DELETING_VALUE = 4; - /** - *
-     * The instance is experiencing an issue and might be unusable. You can get
-     * further details from the `statusMessage` field of the `Instance`
-     * resource.
-     * 
- * - * ERROR = 6; - */ - public static final int ERROR_VALUE = 6; - /** - *
-     * The instance is restoring a snapshot or backup to an existing file share
-     * and may be unusable during this time.
-     * 
- * - * RESTORING = 7; - */ - public static final int RESTORING_VALUE = 7; - - - 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 CREATING; - case 2: return READY; - case 3: return REPAIRING; - case 4: return DELETING; - case 6: return ERROR; - case 7: return RESTORING; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> 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.filestore.v1beta1.Instance.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.filestore.v1beta1.Instance.State) - } - - /** - *
-   * Available service tiers.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1beta1.Instance.Tier} - */ - public enum Tier - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - TIER_UNSPECIFIED(0), - /** - *
-     * STANDARD tier. BASIC_HDD is the preferred term for this tier.
-     * 
- * - * STANDARD = 1; - */ - STANDARD(1), - /** - *
-     * PREMIUM tier. BASIC_SSD is the preferred term for this tier.
-     * 
- * - * PREMIUM = 2; - */ - PREMIUM(2), - /** - *
-     * BASIC instances offer a maximum capacity of 63.9 TB.
-     * BASIC_HDD is an alias for STANDARD Tier, offering economical
-     * performance backed by HDD.
-     * 
- * - * BASIC_HDD = 3; - */ - BASIC_HDD(3), - /** - *
-     * BASIC instances offer a maximum capacity of 63.9 TB.
-     * BASIC_SSD is an alias for PREMIUM Tier, and offers improved
-     * performance backed by SSD.
-     * 
- * - * BASIC_SSD = 4; - */ - BASIC_SSD(4), - /** - *
-     * HIGH_SCALE instances offer expanded capacity and performance scaling
-     * capabilities.
-     * 
- * - * HIGH_SCALE_SSD = 6; - */ - HIGH_SCALE_SSD(6), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - public static final int TIER_UNSPECIFIED_VALUE = 0; - /** - *
-     * STANDARD tier. BASIC_HDD is the preferred term for this tier.
-     * 
- * - * STANDARD = 1; - */ - public static final int STANDARD_VALUE = 1; - /** - *
-     * PREMIUM tier. BASIC_SSD is the preferred term for this tier.
-     * 
- * - * PREMIUM = 2; - */ - public static final int PREMIUM_VALUE = 2; - /** - *
-     * BASIC instances offer a maximum capacity of 63.9 TB.
-     * BASIC_HDD is an alias for STANDARD Tier, offering economical
-     * performance backed by HDD.
-     * 
- * - * BASIC_HDD = 3; - */ - public static final int BASIC_HDD_VALUE = 3; - /** - *
-     * BASIC instances offer a maximum capacity of 63.9 TB.
-     * BASIC_SSD is an alias for PREMIUM Tier, and offers improved
-     * performance backed by SSD.
-     * 
- * - * BASIC_SSD = 4; - */ - public static final int BASIC_SSD_VALUE = 4; - /** - *
-     * HIGH_SCALE instances offer expanded capacity and performance scaling
-     * capabilities.
-     * 
- * - * HIGH_SCALE_SSD = 6; - */ - public static final int HIGH_SCALE_SSD_VALUE = 6; - - - 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 Tier 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 Tier forNumber(int value) { - switch (value) { - case 0: return TIER_UNSPECIFIED; - case 1: return STANDARD; - case 2: return PREMIUM; - case 3: return BASIC_HDD; - case 4: return BASIC_SSD; - case 6: return HIGH_SCALE_SSD; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Tier> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Tier findValueByNumber(int number) { - return Tier.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.filestore.v1beta1.Instance.getDescriptor().getEnumTypes().get(1); - } - - private static final Tier[] VALUES = values(); - - public static Tier 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 Tier(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1beta1.Instance.Tier) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Output only. The resource name of the instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * 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 resource name of the instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * 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 instance (2048 characters or less).
-   * 
- * - * 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 instance (2048 characters or less).
-   * 
- * - * 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 STATE_FIELD_NUMBER = 5; - private int state_; - /** - *
-   * Output only. The instance state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Output only. The instance state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override public com.google.cloud.filestore.v1beta1.Instance.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Instance.State result = com.google.cloud.filestore.v1beta1.Instance.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1beta1.Instance.State.UNRECOGNIZED : result; - } - - public static final int STATUS_MESSAGE_FIELD_NUMBER = 6; - private volatile java.lang.Object statusMessage_; - /** - *
-   * Output only. Additional information about the instance state, if available.
-   * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusMessage. - */ - @java.lang.Override - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - 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(); - statusMessage_ = s; - return s; - } - } - /** - *
-   * Output only. Additional information about the instance state, if available.
-   * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int TIER_FIELD_NUMBER = 8; - private int tier_; - /** - *
-   * The service tier of the instance.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier tier = 8; - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override public int getTierValue() { - return tier_; - } - /** - *
-   * The service tier of the instance.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier tier = 8; - * @return The tier. - */ - @java.lang.Override public com.google.cloud.filestore.v1beta1.Instance.Tier getTier() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Instance.Tier result = com.google.cloud.filestore.v1beta1.Instance.Tier.valueOf(tier_); - return result == null ? com.google.cloud.filestore.v1beta1.Instance.Tier.UNRECOGNIZED : result; - } - - public static final int LABELS_FIELD_NUMBER = 9; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Instance_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - - @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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - @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; - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - @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 FILE_SHARES_FIELD_NUMBER = 10; - private java.util.List fileShares_; - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public java.util.List getFileSharesList() { - return fileShares_; - } - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public java.util.List - getFileSharesOrBuilderList() { - return fileShares_; - } - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public int getFileSharesCount() { - return fileShares_.size(); - } - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.FileShareConfig getFileShares(int index) { - return fileShares_.get(index); - } - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.FileShareConfigOrBuilder getFileSharesOrBuilder( - int index) { - return fileShares_.get(index); - } - - public static final int NETWORKS_FIELD_NUMBER = 11; - private java.util.List networks_; - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - @java.lang.Override - public java.util.List getNetworksList() { - return networks_; - } - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - @java.lang.Override - public java.util.List - getNetworksOrBuilderList() { - return networks_; - } - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - @java.lang.Override - public int getNetworksCount() { - return networks_.size(); - } - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NetworkConfig getNetworks(int index) { - return networks_.get(index); - } - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NetworkConfigOrBuilder getNetworksOrBuilder( - int index) { - return networks_.get(index); - } - - public static final int ETAG_FIELD_NUMBER = 12; - private volatile java.lang.Object etag_; - /** - *
-   * Server-specified ETag for the instance resource to prevent simultaneous
-   * updates from overwriting each other.
-   * 
- * - * string etag = 12; - * @return The etag. - */ - @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - 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(); - etag_ = s; - return s; - } - } - /** - *
-   * Server-specified ETag for the instance resource to prevent simultaneous
-   * updates from overwriting each other.
-   * 
- * - * string etag = 12; - * @return The bytes for etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SATISFIES_PZS_FIELD_NUMBER = 13; - private com.google.protobuf.BoolValue satisfiesPzs_; - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - @java.lang.Override - public boolean hasSatisfiesPzs() { - return satisfiesPzs_ != null; - } - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - @java.lang.Override - public com.google.protobuf.BoolValue getSatisfiesPzs() { - return satisfiesPzs_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { - return getSatisfiesPzs(); - } - - 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 (state_ != com.google.cloud.filestore.v1beta1.Instance.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, statusMessage_); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (tier_ != com.google.cloud.filestore.v1beta1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - output.writeEnum(8, tier_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 9); - for (int i = 0; i < fileShares_.size(); i++) { - output.writeMessage(10, fileShares_.get(i)); - } - for (int i = 0; i < networks_.size(); i++) { - output.writeMessage(11, networks_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, etag_); - } - if (satisfiesPzs_ != null) { - output.writeMessage(13, getSatisfiesPzs()); - } - 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 (state_ != com.google.cloud.filestore.v1beta1.Instance.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, statusMessage_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getCreateTime()); - } - if (tier_ != com.google.cloud.filestore.v1beta1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, tier_); - } - 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(9, labels__); - } - for (int i = 0; i < fileShares_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, fileShares_.get(i)); - } - for (int i = 0; i < networks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, networks_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, etag_); - } - if (satisfiesPzs_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getSatisfiesPzs()); - } - 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.filestore.v1beta1.Instance)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.Instance other = (com.google.cloud.filestore.v1beta1.Instance) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (state_ != other.state_) return false; - if (!getStatusMessage() - .equals(other.getStatusMessage())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (tier_ != other.tier_) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!getFileSharesList() - .equals(other.getFileSharesList())) return false; - if (!getNetworksList() - .equals(other.getNetworksList())) return false; - if (!getEtag() - .equals(other.getEtag())) return false; - if (hasSatisfiesPzs() != other.hasSatisfiesPzs()) return false; - if (hasSatisfiesPzs()) { - if (!getSatisfiesPzs() - .equals(other.getSatisfiesPzs())) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStatusMessage().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (37 * hash) + TIER_FIELD_NUMBER; - hash = (53 * hash) + tier_; - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (getFileSharesCount() > 0) { - hash = (37 * hash) + FILE_SHARES_FIELD_NUMBER; - hash = (53 * hash) + getFileSharesList().hashCode(); - } - if (getNetworksCount() > 0) { - hash = (37 * hash) + NETWORKS_FIELD_NUMBER; - hash = (53 * hash) + getNetworksList().hashCode(); - } - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - if (hasSatisfiesPzs()) { - hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; - hash = (53 * hash) + getSatisfiesPzs().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.Instance parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.Instance 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.filestore.v1beta1.Instance parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.Instance 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.filestore.v1beta1.Instance parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.Instance parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.Instance parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.Instance 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.filestore.v1beta1.Instance parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.Instance 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.filestore.v1beta1.Instance parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.Instance 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.filestore.v1beta1.Instance 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 Cloud Filestore instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.Instance} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.Instance) - com.google.cloud.filestore.v1beta1.InstanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Instance_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 9: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 9: - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Instance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.Instance.class, com.google.cloud.filestore.v1beta1.Instance.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.Instance.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFileSharesFieldBuilder(); - getNetworksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - state_ = 0; - - statusMessage_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - tier_ = 0; - - internalGetMutableLabels().clear(); - if (fileSharesBuilder_ == null) { - fileShares_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - fileSharesBuilder_.clear(); - } - if (networksBuilder_ == null) { - networks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - networksBuilder_.clear(); - } - etag_ = ""; - - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = null; - } else { - satisfiesPzs_ = null; - satisfiesPzsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Instance_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Instance getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Instance build() { - com.google.cloud.filestore.v1beta1.Instance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Instance buildPartial() { - com.google.cloud.filestore.v1beta1.Instance result = new com.google.cloud.filestore.v1beta1.Instance(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - result.state_ = state_; - result.statusMessage_ = statusMessage_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.tier_ = tier_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (fileSharesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - fileShares_ = java.util.Collections.unmodifiableList(fileShares_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fileShares_ = fileShares_; - } else { - result.fileShares_ = fileSharesBuilder_.build(); - } - if (networksBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - networks_ = java.util.Collections.unmodifiableList(networks_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.networks_ = networks_; - } else { - result.networks_ = networksBuilder_.build(); - } - result.etag_ = etag_; - if (satisfiesPzsBuilder_ == null) { - result.satisfiesPzs_ = satisfiesPzs_; - } else { - result.satisfiesPzs_ = satisfiesPzsBuilder_.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.filestore.v1beta1.Instance) { - return mergeFrom((com.google.cloud.filestore.v1beta1.Instance)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.Instance other) { - if (other == com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStatusMessage().isEmpty()) { - statusMessage_ = other.statusMessage_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.tier_ != 0) { - setTierValue(other.getTierValue()); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (fileSharesBuilder_ == null) { - if (!other.fileShares_.isEmpty()) { - if (fileShares_.isEmpty()) { - fileShares_ = other.fileShares_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFileSharesIsMutable(); - fileShares_.addAll(other.fileShares_); - } - onChanged(); - } - } else { - if (!other.fileShares_.isEmpty()) { - if (fileSharesBuilder_.isEmpty()) { - fileSharesBuilder_.dispose(); - fileSharesBuilder_ = null; - fileShares_ = other.fileShares_; - bitField0_ = (bitField0_ & ~0x00000002); - fileSharesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFileSharesFieldBuilder() : null; - } else { - fileSharesBuilder_.addAllMessages(other.fileShares_); - } - } - } - if (networksBuilder_ == null) { - if (!other.networks_.isEmpty()) { - if (networks_.isEmpty()) { - networks_ = other.networks_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureNetworksIsMutable(); - networks_.addAll(other.networks_); - } - onChanged(); - } - } else { - if (!other.networks_.isEmpty()) { - if (networksBuilder_.isEmpty()) { - networksBuilder_.dispose(); - networksBuilder_ = null; - networks_ = other.networks_; - bitField0_ = (bitField0_ & ~0x00000004); - networksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNetworksFieldBuilder() : null; - } else { - networksBuilder_.addAllMessages(other.networks_); - } - } - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - onChanged(); - } - if (other.hasSatisfiesPzs()) { - mergeSatisfiesPzs(other.getSatisfiesPzs()); - } - 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.filestore.v1beta1.Instance parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.Instance) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 instance (2048 characters or less).
-     * 
- * - * 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 instance (2048 characters or less).
-     * 
- * - * 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 instance (2048 characters or less).
-     * 
- * - * 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 instance (2048 characters or less).
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * The description of the instance (2048 characters or less).
-     * 
- * - * 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 int state_ = 0; - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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; - } - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Instance.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Instance.State result = com.google.cloud.filestore.v1beta1.Instance.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1beta1.Instance.State.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.filestore.v1beta1.Instance.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The instance state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object statusMessage_ = ""; - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusMessage. - */ - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusMessage. - */ - public com.google.protobuf.ByteString - getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - statusMessage_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearStatusMessage() { - - statusMessage_ = getDefaultInstance().getStatusMessage(); - onChanged(); - return this; - } - /** - *
-     * Output only. Additional information about the instance state, if available.
-     * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - statusMessage_ = value; - 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_; - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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(); - } - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time when the instance was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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 int tier_ = 0; - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier tier = 8; - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override public int getTierValue() { - return tier_; - } - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier tier = 8; - * @param value The enum numeric value on the wire for tier to set. - * @return This builder for chaining. - */ - public Builder setTierValue(int value) { - - tier_ = value; - onChanged(); - return this; - } - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier tier = 8; - * @return The tier. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Instance.Tier getTier() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Instance.Tier result = com.google.cloud.filestore.v1beta1.Instance.Tier.valueOf(tier_); - return result == null ? com.google.cloud.filestore.v1beta1.Instance.Tier.UNRECOGNIZED : result; - } - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier tier = 8; - * @param value The tier to set. - * @return This builder for chaining. - */ - public Builder setTier(com.google.cloud.filestore.v1beta1.Instance.Tier value) { - if (value == null) { - throw new NullPointerException(); - } - - tier_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The service tier of the instance.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier tier = 8; - * @return This builder for chaining. - */ - public Builder clearTier() { - - tier_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - - @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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - - 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - 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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 9; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private java.util.List fileShares_ = - java.util.Collections.emptyList(); - private void ensureFileSharesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - fileShares_ = new java.util.ArrayList(fileShares_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.FileShareConfig, com.google.cloud.filestore.v1beta1.FileShareConfig.Builder, com.google.cloud.filestore.v1beta1.FileShareConfigOrBuilder> fileSharesBuilder_; - - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public java.util.List getFileSharesList() { - if (fileSharesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fileShares_); - } else { - return fileSharesBuilder_.getMessageList(); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public int getFileSharesCount() { - if (fileSharesBuilder_ == null) { - return fileShares_.size(); - } else { - return fileSharesBuilder_.getCount(); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1beta1.FileShareConfig getFileShares(int index) { - if (fileSharesBuilder_ == null) { - return fileShares_.get(index); - } else { - return fileSharesBuilder_.getMessage(index); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public Builder setFileShares( - int index, com.google.cloud.filestore.v1beta1.FileShareConfig value) { - if (fileSharesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileSharesIsMutable(); - fileShares_.set(index, value); - onChanged(); - } else { - fileSharesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public Builder setFileShares( - int index, com.google.cloud.filestore.v1beta1.FileShareConfig.Builder builderForValue) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - fileShares_.set(index, builderForValue.build()); - onChanged(); - } else { - fileSharesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public Builder addFileShares(com.google.cloud.filestore.v1beta1.FileShareConfig value) { - if (fileSharesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileSharesIsMutable(); - fileShares_.add(value); - onChanged(); - } else { - fileSharesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public Builder addFileShares( - int index, com.google.cloud.filestore.v1beta1.FileShareConfig value) { - if (fileSharesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileSharesIsMutable(); - fileShares_.add(index, value); - onChanged(); - } else { - fileSharesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public Builder addFileShares( - com.google.cloud.filestore.v1beta1.FileShareConfig.Builder builderForValue) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - fileShares_.add(builderForValue.build()); - onChanged(); - } else { - fileSharesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public Builder addFileShares( - int index, com.google.cloud.filestore.v1beta1.FileShareConfig.Builder builderForValue) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - fileShares_.add(index, builderForValue.build()); - onChanged(); - } else { - fileSharesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public Builder addAllFileShares( - java.lang.Iterable values) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fileShares_); - onChanged(); - } else { - fileSharesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public Builder clearFileShares() { - if (fileSharesBuilder_ == null) { - fileShares_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - fileSharesBuilder_.clear(); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public Builder removeFileShares(int index) { - if (fileSharesBuilder_ == null) { - ensureFileSharesIsMutable(); - fileShares_.remove(index); - onChanged(); - } else { - fileSharesBuilder_.remove(index); - } - return this; - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1beta1.FileShareConfig.Builder getFileSharesBuilder( - int index) { - return getFileSharesFieldBuilder().getBuilder(index); - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1beta1.FileShareConfigOrBuilder getFileSharesOrBuilder( - int index) { - if (fileSharesBuilder_ == null) { - return fileShares_.get(index); } else { - return fileSharesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public java.util.List - getFileSharesOrBuilderList() { - if (fileSharesBuilder_ != null) { - return fileSharesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fileShares_); - } - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1beta1.FileShareConfig.Builder addFileSharesBuilder() { - return getFileSharesFieldBuilder().addBuilder( - com.google.cloud.filestore.v1beta1.FileShareConfig.getDefaultInstance()); - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public com.google.cloud.filestore.v1beta1.FileShareConfig.Builder addFileSharesBuilder( - int index) { - return getFileSharesFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1beta1.FileShareConfig.getDefaultInstance()); - } - /** - *
-     * File system shares on the instance.
-     * For this version, only a single file share is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - public java.util.List - getFileSharesBuilderList() { - return getFileSharesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.FileShareConfig, com.google.cloud.filestore.v1beta1.FileShareConfig.Builder, com.google.cloud.filestore.v1beta1.FileShareConfigOrBuilder> - getFileSharesFieldBuilder() { - if (fileSharesBuilder_ == null) { - fileSharesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.FileShareConfig, com.google.cloud.filestore.v1beta1.FileShareConfig.Builder, com.google.cloud.filestore.v1beta1.FileShareConfigOrBuilder>( - fileShares_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - fileShares_ = null; - } - return fileSharesBuilder_; - } - - private java.util.List networks_ = - java.util.Collections.emptyList(); - private void ensureNetworksIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - networks_ = new java.util.ArrayList(networks_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.NetworkConfig, com.google.cloud.filestore.v1beta1.NetworkConfig.Builder, com.google.cloud.filestore.v1beta1.NetworkConfigOrBuilder> networksBuilder_; - - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public java.util.List getNetworksList() { - if (networksBuilder_ == null) { - return java.util.Collections.unmodifiableList(networks_); - } else { - return networksBuilder_.getMessageList(); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public int getNetworksCount() { - if (networksBuilder_ == null) { - return networks_.size(); - } else { - return networksBuilder_.getCount(); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1beta1.NetworkConfig getNetworks(int index) { - if (networksBuilder_ == null) { - return networks_.get(index); - } else { - return networksBuilder_.getMessage(index); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public Builder setNetworks( - int index, com.google.cloud.filestore.v1beta1.NetworkConfig value) { - if (networksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworksIsMutable(); - networks_.set(index, value); - onChanged(); - } else { - networksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public Builder setNetworks( - int index, com.google.cloud.filestore.v1beta1.NetworkConfig.Builder builderForValue) { - if (networksBuilder_ == null) { - ensureNetworksIsMutable(); - networks_.set(index, builderForValue.build()); - onChanged(); - } else { - networksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public Builder addNetworks(com.google.cloud.filestore.v1beta1.NetworkConfig value) { - if (networksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworksIsMutable(); - networks_.add(value); - onChanged(); - } else { - networksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public Builder addNetworks( - int index, com.google.cloud.filestore.v1beta1.NetworkConfig value) { - if (networksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworksIsMutable(); - networks_.add(index, value); - onChanged(); - } else { - networksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public Builder addNetworks( - com.google.cloud.filestore.v1beta1.NetworkConfig.Builder builderForValue) { - if (networksBuilder_ == null) { - ensureNetworksIsMutable(); - networks_.add(builderForValue.build()); - onChanged(); - } else { - networksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public Builder addNetworks( - int index, com.google.cloud.filestore.v1beta1.NetworkConfig.Builder builderForValue) { - if (networksBuilder_ == null) { - ensureNetworksIsMutable(); - networks_.add(index, builderForValue.build()); - onChanged(); - } else { - networksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - 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; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public Builder clearNetworks() { - if (networksBuilder_ == null) { - networks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - networksBuilder_.clear(); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public Builder removeNetworks(int index) { - if (networksBuilder_ == null) { - ensureNetworksIsMutable(); - networks_.remove(index); - onChanged(); - } else { - networksBuilder_.remove(index); - } - return this; - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1beta1.NetworkConfig.Builder getNetworksBuilder( - int index) { - return getNetworksFieldBuilder().getBuilder(index); - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1beta1.NetworkConfigOrBuilder getNetworksOrBuilder( - int index) { - if (networksBuilder_ == null) { - return networks_.get(index); } else { - return networksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public java.util.List - getNetworksOrBuilderList() { - if (networksBuilder_ != null) { - return networksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(networks_); - } - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1beta1.NetworkConfig.Builder addNetworksBuilder() { - return getNetworksFieldBuilder().addBuilder( - com.google.cloud.filestore.v1beta1.NetworkConfig.getDefaultInstance()); - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public com.google.cloud.filestore.v1beta1.NetworkConfig.Builder addNetworksBuilder( - int index) { - return getNetworksFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1beta1.NetworkConfig.getDefaultInstance()); - } - /** - *
-     * VPC networks to which the instance is connected.
-     * For this version, only a single network is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - public java.util.List - getNetworksBuilderList() { - return getNetworksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.NetworkConfig, com.google.cloud.filestore.v1beta1.NetworkConfig.Builder, com.google.cloud.filestore.v1beta1.NetworkConfigOrBuilder> - getNetworksFieldBuilder() { - if (networksBuilder_ == null) { - networksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.NetworkConfig, com.google.cloud.filestore.v1beta1.NetworkConfig.Builder, com.google.cloud.filestore.v1beta1.NetworkConfigOrBuilder>( - networks_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - networks_ = null; - } - return networksBuilder_; - } - - private java.lang.Object etag_ = ""; - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @return The bytes for etag. - */ - public com.google.protobuf.ByteString - getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - etag_ = value; - onChanged(); - return this; - } - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @return This builder for chaining. - */ - public Builder clearEtag() { - - etag_ = getDefaultInstance().getEtag(); - onChanged(); - return this; - } - /** - *
-     * Server-specified ETag for the instance resource to prevent simultaneous
-     * updates from overwriting each other.
-     * 
- * - * string etag = 12; - * @param value The bytes for etag to set. - * @return This builder for chaining. - */ - public Builder setEtagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - etag_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.BoolValue satisfiesPzs_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> satisfiesPzsBuilder_; - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - public boolean hasSatisfiesPzs() { - return satisfiesPzsBuilder_ != null || satisfiesPzs_ != null; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - public com.google.protobuf.BoolValue getSatisfiesPzs() { - if (satisfiesPzsBuilder_ == null) { - return satisfiesPzs_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } else { - return satisfiesPzsBuilder_.getMessage(); - } - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSatisfiesPzs(com.google.protobuf.BoolValue value) { - if (satisfiesPzsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - satisfiesPzs_ = value; - onChanged(); - } else { - satisfiesPzsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setSatisfiesPzs( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = builderForValue.build(); - onChanged(); - } else { - satisfiesPzsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeSatisfiesPzs(com.google.protobuf.BoolValue value) { - if (satisfiesPzsBuilder_ == null) { - if (satisfiesPzs_ != null) { - satisfiesPzs_ = - com.google.protobuf.BoolValue.newBuilder(satisfiesPzs_).mergeFrom(value).buildPartial(); - } else { - satisfiesPzs_ = value; - } - onChanged(); - } else { - satisfiesPzsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearSatisfiesPzs() { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzs_ = null; - onChanged(); - } else { - satisfiesPzs_ = null; - satisfiesPzsBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.BoolValue.Builder getSatisfiesPzsBuilder() { - - onChanged(); - return getSatisfiesPzsFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { - if (satisfiesPzsBuilder_ != null) { - return satisfiesPzsBuilder_.getMessageOrBuilder(); - } else { - return satisfiesPzs_ == null ? - com.google.protobuf.BoolValue.getDefaultInstance() : satisfiesPzs_; - } - } - /** - *
-     * Output only. Reserved for future use.
-     * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> - getSatisfiesPzsFieldBuilder() { - if (satisfiesPzsBuilder_ == null) { - satisfiesPzsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( - getSatisfiesPzs(), - getParentForChildren(), - isClean()); - satisfiesPzs_ = null; - } - return satisfiesPzsBuilder_; - } - @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.filestore.v1beta1.Instance) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.Instance) - private static final com.google.cloud.filestore.v1beta1.Instance DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.Instance(); - } - - public static com.google.cloud.filestore.v1beta1.Instance getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Instance parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Instance(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.filestore.v1beta1.Instance getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/InstanceName.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/InstanceName.java deleted file mode 100644 index c26d46328502..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/InstanceName.java +++ /dev/null @@ -1,223 +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.filestore.v1beta1; - -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 InstanceName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_INSTANCE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/instances/{instance}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String instance; - - @Deprecated - protected InstanceName() { - project = null; - location = null; - instance = null; - } - - private InstanceName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - instance = Preconditions.checkNotNull(builder.getInstance()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getInstance() { - return instance; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static InstanceName of(String project, String location, String instance) { - return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); - } - - public static String format(String project, String location, String instance) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setInstance(instance) - .build() - .toString(); - } - - public static InstanceName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_INSTANCE.validatedMatch( - formattedString, "InstanceName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); - } - - 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 (InstanceName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_INSTANCE.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 (instance != null) { - fieldMapBuilder.put("instance", instance); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_INSTANCE.instantiate( - "project", project, "location", location, "instance", instance); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - InstanceName that = ((InstanceName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.instance, that.instance); - } - 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(instance); - return h; - } - - /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ - public static class Builder { - private String project; - private String location; - private String instance; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getInstance() { - return instance; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setInstance(String instance) { - this.instance = instance; - return this; - } - - private Builder(InstanceName instanceName) { - this.project = instanceName.project; - this.location = instanceName.location; - this.instance = instanceName.instance; - } - - public InstanceName build() { - return new InstanceName(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/InstanceOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/InstanceOrBuilder.java deleted file mode 100644 index 43e7640a259c..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/InstanceOrBuilder.java +++ /dev/null @@ -1,339 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface InstanceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.Instance) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The resource name of the instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The resource name of the instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The description of the instance (2048 characters or less).
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The description of the instance (2048 characters or less).
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. The instance state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Output only. The instance state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - com.google.cloud.filestore.v1beta1.Instance.State getState(); - - /** - *
-   * Output only. Additional information about the instance state, if available.
-   * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The statusMessage. - */ - java.lang.String getStatusMessage(); - /** - *
-   * Output only. Additional information about the instance state, if available.
-   * 
- * - * string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for statusMessage. - */ - com.google.protobuf.ByteString - getStatusMessageBytes(); - - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time when the instance was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The service tier of the instance.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier tier = 8; - * @return The enum numeric value on the wire for tier. - */ - int getTierValue(); - /** - *
-   * The service tier of the instance.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance.Tier tier = 8; - * @return The tier. - */ - com.google.cloud.filestore.v1beta1.Instance.Tier getTier(); - - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - int getLabelsCount(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 9; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - java.util.List - getFileSharesList(); - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - com.google.cloud.filestore.v1beta1.FileShareConfig getFileShares(int index); - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - int getFileSharesCount(); - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - java.util.List - getFileSharesOrBuilderList(); - /** - *
-   * File system shares on the instance.
-   * For this version, only a single file share is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.FileShareConfig file_shares = 10; - */ - com.google.cloud.filestore.v1beta1.FileShareConfigOrBuilder getFileSharesOrBuilder( - int index); - - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - java.util.List - getNetworksList(); - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - com.google.cloud.filestore.v1beta1.NetworkConfig getNetworks(int index); - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - int getNetworksCount(); - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - java.util.List - getNetworksOrBuilderList(); - /** - *
-   * VPC networks to which the instance is connected.
-   * For this version, only a single network is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig networks = 11; - */ - com.google.cloud.filestore.v1beta1.NetworkConfigOrBuilder getNetworksOrBuilder( - int index); - - /** - *
-   * Server-specified ETag for the instance resource to prevent simultaneous
-   * updates from overwriting each other.
-   * 
- * - * string etag = 12; - * @return The etag. - */ - java.lang.String getEtag(); - /** - *
-   * Server-specified ETag for the instance resource to prevent simultaneous
-   * updates from overwriting each other.
-   * 
- * - * string etag = 12; - * @return The bytes for etag. - */ - com.google.protobuf.ByteString - getEtagBytes(); - - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the satisfiesPzs field is set. - */ - boolean hasSatisfiesPzs(); - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The satisfiesPzs. - */ - com.google.protobuf.BoolValue getSatisfiesPzs(); - /** - *
-   * Output only. Reserved for future use.
-   * 
- * - * .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsRequest.java deleted file mode 100644 index a0fff493c378..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsRequest.java +++ /dev/null @@ -1,1215 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * ListBackupsRequest lists backups.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.ListBackupsRequest} - */ -public final class ListBackupsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.ListBackupsRequest) - ListBackupsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListBackupsRequest.newBuilder() to construct. - private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListBackupsRequest() { - parent_ = ""; - pageToken_ = ""; - orderBy_ = ""; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListBackupsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListBackupsRequest( - 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 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.ListBackupsRequest.class, com.google.cloud.filestore.v1beta1.ListBackupsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project and location for which to retrieve backup information,
-   * in the format `projects/{project_id}/locations/{location}`.
-   * In Cloud Filestore, backup locations map to GCP regions,
-   * for example **us-west1**.
-   * To retrieve backup information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 project and location for which to retrieve backup information,
-   * in the format `projects/{project_id}/locations/{location}`.
-   * In Cloud Filestore, backup locations map to GCP regions,
-   * for example **us-west1**.
-   * To retrieve backup information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 PAGE_SIZE_FIELD_NUMBER = 2; - 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_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - 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; - return s; - } - } - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 4; - private volatile java.lang.Object orderBy_; - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - 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(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 5; - private volatile java.lang.Object filter_; - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @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 = 5; - * @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 - 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 (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); - } - 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 (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(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); - } - 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.filestore.v1beta1.ListBackupsRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.ListBackupsRequest other = (com.google.cloud.filestore.v1beta1.ListBackupsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!getFilter() - .equals(other.getFilter())) 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(); - 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) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().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.filestore.v1beta1.ListBackupsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsRequest 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.filestore.v1beta1.ListBackupsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsRequest 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.filestore.v1beta1.ListBackupsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsRequest 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.filestore.v1beta1.ListBackupsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsRequest 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.filestore.v1beta1.ListBackupsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsRequest 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.filestore.v1beta1.ListBackupsRequest 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; - } - /** - *
-   * ListBackupsRequest lists backups.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.ListBackupsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.ListBackupsRequest) - com.google.cloud.filestore.v1beta1.ListBackupsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.ListBackupsRequest.class, com.google.cloud.filestore.v1beta1.ListBackupsRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.ListBackupsRequest.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_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - orderBy_ = ""; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListBackupsRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.ListBackupsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListBackupsRequest build() { - com.google.cloud.filestore.v1beta1.ListBackupsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListBackupsRequest buildPartial() { - com.google.cloud.filestore.v1beta1.ListBackupsRequest result = new com.google.cloud.filestore.v1beta1.ListBackupsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.orderBy_ = orderBy_; - result.filter_ = filter_; - 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.filestore.v1beta1.ListBackupsRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.ListBackupsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.ListBackupsRequest other) { - if (other == com.google.cloud.filestore.v1beta1.ListBackupsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - 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.filestore.v1beta1.ListBackupsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.ListBackupsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project and location for which to retrieve backup information,
-     * in the format `projects/{project_id}/locations/{location}`.
-     * In Cloud Filestore, backup locations map to GCP regions,
-     * for example **us-west1**.
-     * To retrieve backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve backup information,
-     * in the format `projects/{project_id}/locations/{location}`.
-     * In Cloud Filestore, backup locations map to GCP regions,
-     * for example **us-west1**.
-     * To retrieve backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve backup information,
-     * in the format `projects/{project_id}/locations/{location}`.
-     * In Cloud Filestore, backup locations map to GCP regions,
-     * for example **us-west1**.
-     * To retrieve backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve backup information,
-     * in the format `projects/{project_id}/locations/{location}`.
-     * In Cloud Filestore, backup locations map to GCP regions,
-     * for example **us-west1**.
-     * To retrieve backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve backup information,
-     * in the format `projects/{project_id}/locations/{location}`.
-     * In Cloud Filestore, backup locations map to GCP regions,
-     * for example **us-west1**.
-     * To retrieve backup information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 int pageSize_ ; - /** - *
-     * The maximum number of items to return.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return.
-     * 
- * - * 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 to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * List filter.
-     * 
- * - * string filter = 5; - * @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 = 5; - * @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 = 5; - * @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 = 5; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * List filter.
-     * 
- * - * string filter = 5; - * @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); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.filestore.v1beta1.ListBackupsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.ListBackupsRequest) - private static final com.google.cloud.filestore.v1beta1.ListBackupsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.ListBackupsRequest(); - } - - public static com.google.cloud.filestore.v1beta1.ListBackupsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBackupsRequest(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.filestore.v1beta1.ListBackupsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsRequestOrBuilder.java deleted file mode 100644 index dad46dcb1f2b..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsRequestOrBuilder.java +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface ListBackupsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.ListBackupsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project and location for which to retrieve backup information,
-   * in the format `projects/{project_id}/locations/{location}`.
-   * In Cloud Filestore, backup locations map to GCP regions,
-   * for example **us-west1**.
-   * To retrieve backup information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project and location for which to retrieve backup information,
-   * in the format `projects/{project_id}/locations/{location}`.
-   * In Cloud Filestore, backup locations map to GCP regions,
-   * for example **us-west1**.
-   * To retrieve backup information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsResponse.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsResponse.java deleted file mode 100644 index 82c89a3bf1d0..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsResponse.java +++ /dev/null @@ -1,1404 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * ListBackupsResponse is the result of ListBackupsRequest.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.ListBackupsResponse} - */ -public final class ListBackupsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.ListBackupsResponse) - ListBackupsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListBackupsResponse.newBuilder() to construct. - private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListBackupsResponse() { - backups_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListBackupsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListBackupsResponse( - 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)) { - backups_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - backups_.add( - input.readMessage(com.google.cloud.filestore.v1beta1.Backup.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - backups_ = java.util.Collections.unmodifiableList(backups_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.ListBackupsResponse.class, com.google.cloud.filestore.v1beta1.ListBackupsResponse.Builder.class); - } - - public static final int BACKUPS_FIELD_NUMBER = 1; - private java.util.List backups_; - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - @java.lang.Override - public java.util.List getBackupsList() { - return backups_; - } - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - @java.lang.Override - public java.util.List - getBackupsOrBuilderList() { - return backups_; - } - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - @java.lang.Override - public int getBackupsCount() { - return backups_.size(); - } - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Backup getBackups(int index) { - return backups_.get(index); - } - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.BackupOrBuilder getBackupsOrBuilder( - int index) { - return backups_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * 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; - } - } - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * 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; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList unreachable_; - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList - getUnreachableList() { - return unreachable_; - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString - getUnreachableBytes(int index) { - return unreachable_.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 { - for (int i = 0; i < backups_.size(); i++) { - output.writeMessage(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < backups_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().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.filestore.v1beta1.ListBackupsResponse)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.ListBackupsResponse other = (com.google.cloud.filestore.v1beta1.ListBackupsResponse) obj; - - if (!getBackupsList() - .equals(other.getBackupsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnreachableList() - .equals(other.getUnreachableList())) 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 (getBackupsCount() > 0) { - hash = (37 * hash) + BACKUPS_FIELD_NUMBER; - hash = (53 * hash) + getBackupsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.ListBackupsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsResponse 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.filestore.v1beta1.ListBackupsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsResponse 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.filestore.v1beta1.ListBackupsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsResponse 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.filestore.v1beta1.ListBackupsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsResponse 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.filestore.v1beta1.ListBackupsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListBackupsResponse 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.filestore.v1beta1.ListBackupsResponse 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; - } - /** - *
-   * ListBackupsResponse is the result of ListBackupsRequest.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.ListBackupsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.ListBackupsResponse) - com.google.cloud.filestore.v1beta1.ListBackupsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.ListBackupsResponse.class, com.google.cloud.filestore.v1beta1.ListBackupsResponse.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.ListBackupsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBackupsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - backupsBuilder_.clear(); - } - nextPageToken_ = ""; - - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListBackupsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListBackupsResponse getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.ListBackupsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListBackupsResponse build() { - com.google.cloud.filestore.v1beta1.ListBackupsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListBackupsResponse buildPartial() { - com.google.cloud.filestore.v1beta1.ListBackupsResponse result = new com.google.cloud.filestore.v1beta1.ListBackupsResponse(this); - int from_bitField0_ = bitField0_; - if (backupsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - backups_ = java.util.Collections.unmodifiableList(backups_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.backups_ = backups_; - } else { - result.backups_ = backupsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - if (((bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.unreachable_ = unreachable_; - 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.filestore.v1beta1.ListBackupsResponse) { - return mergeFrom((com.google.cloud.filestore.v1beta1.ListBackupsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.ListBackupsResponse other) { - if (other == com.google.cloud.filestore.v1beta1.ListBackupsResponse.getDefaultInstance()) return this; - if (backupsBuilder_ == null) { - if (!other.backups_.isEmpty()) { - if (backups_.isEmpty()) { - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBackupsIsMutable(); - backups_.addAll(other.backups_); - } - onChanged(); - } - } else { - if (!other.backups_.isEmpty()) { - if (backupsBuilder_.isEmpty()) { - backupsBuilder_.dispose(); - backupsBuilder_ = null; - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - backupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBackupsFieldBuilder() : null; - } else { - backupsBuilder_.addAllMessages(other.backups_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - 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.filestore.v1beta1.ListBackupsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.ListBackupsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List backups_ = - java.util.Collections.emptyList(); - private void ensureBackupsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - backups_ = new java.util.ArrayList(backups_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Backup, com.google.cloud.filestore.v1beta1.Backup.Builder, com.google.cloud.filestore.v1beta1.BackupOrBuilder> backupsBuilder_; - - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public java.util.List getBackupsList() { - if (backupsBuilder_ == null) { - return java.util.Collections.unmodifiableList(backups_); - } else { - return backupsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public int getBackupsCount() { - if (backupsBuilder_ == null) { - return backups_.size(); - } else { - return backupsBuilder_.getCount(); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1beta1.Backup getBackups(int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); - } else { - return backupsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public Builder setBackups( - int index, com.google.cloud.filestore.v1beta1.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.set(index, value); - onChanged(); - } else { - backupsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public Builder setBackups( - int index, com.google.cloud.filestore.v1beta1.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.set(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public Builder addBackups(com.google.cloud.filestore.v1beta1.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(value); - onChanged(); - } else { - backupsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public Builder addBackups( - int index, com.google.cloud.filestore.v1beta1.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(index, value); - onChanged(); - } else { - backupsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public Builder addBackups( - com.google.cloud.filestore.v1beta1.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public Builder addBackups( - int index, com.google.cloud.filestore.v1beta1.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public Builder addAllBackups( - java.lang.Iterable values) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, backups_); - onChanged(); - } else { - backupsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public Builder clearBackups() { - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - backupsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public Builder removeBackups(int index) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.remove(index); - onChanged(); - } else { - backupsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1beta1.Backup.Builder getBackupsBuilder( - int index) { - return getBackupsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1beta1.BackupOrBuilder getBackupsOrBuilder( - int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); } else { - return backupsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public java.util.List - getBackupsOrBuilderList() { - if (backupsBuilder_ != null) { - return backupsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(backups_); - } - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1beta1.Backup.Builder addBackupsBuilder() { - return getBackupsFieldBuilder().addBuilder( - com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance()); - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public com.google.cloud.filestore.v1beta1.Backup.Builder addBackupsBuilder( - int index) { - return getBackupsFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance()); - } - /** - *
-     * A list of backups in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of backups from all locations. If any location is unreachable, the
-     * response will only return backups in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable
-     * locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - public java.util.List - getBackupsBuilderList() { - return getBackupsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Backup, com.google.cloud.filestore.v1beta1.Backup.Builder, com.google.cloud.filestore.v1beta1.BackupOrBuilder> - getBackupsFieldBuilder() { - if (backupsBuilder_ == null) { - backupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Backup, com.google.cloud.filestore.v1beta1.Backup.Builder, com.google.cloud.filestore.v1beta1.BackupOrBuilder>( - backups_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - backups_ = null; - } - return backupsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - - private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList - getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString - getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable( - java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, unreachable_); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.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.filestore.v1beta1.ListBackupsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.ListBackupsResponse) - private static final com.google.cloud.filestore.v1beta1.ListBackupsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.ListBackupsResponse(); - } - - public static com.google.cloud.filestore.v1beta1.ListBackupsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBackupsResponse(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.filestore.v1beta1.ListBackupsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsResponseOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsResponseOrBuilder.java deleted file mode 100644 index affd6d463f13..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListBackupsResponseOrBuilder.java +++ /dev/null @@ -1,141 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface ListBackupsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.ListBackupsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - java.util.List - getBackupsList(); - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - com.google.cloud.filestore.v1beta1.Backup getBackups(int index); - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - int getBackupsCount(); - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - java.util.List - getBackupsOrBuilderList(); - /** - *
-   * A list of backups in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of backups from all locations. If any location is unreachable, the
-   * response will only return backups in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable
-   * locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Backup backups = 1; - */ - com.google.cloud.filestore.v1beta1.BackupOrBuilder getBackupsOrBuilder( - int index); - - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * if there are no more results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * if there are no more results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); - - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - java.util.List - getUnreachableList(); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString - getUnreachableBytes(int index); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesRequest.java deleted file mode 100644 index 1bcc3f0af2f1..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesRequest.java +++ /dev/null @@ -1,1208 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * ListInstancesRequest lists instances.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.ListInstancesRequest} - */ -public final class ListInstancesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.ListInstancesRequest) - ListInstancesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListInstancesRequest.newBuilder() to construct. - private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListInstancesRequest() { - parent_ = ""; - pageToken_ = ""; - orderBy_ = ""; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListInstancesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListInstancesRequest( - 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 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.ListInstancesRequest.class, com.google.cloud.filestore.v1beta1.ListInstancesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project and location for which to retrieve instance information,
-   * in the format `projects/{project_id}/locations/{location}`. In Cloud
-   * Filestore, locations map to GCP zones, for example **us-west1-b**. To
-   * retrieve instance information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 project and location for which to retrieve instance information,
-   * in the format `projects/{project_id}/locations/{location}`. In Cloud
-   * Filestore, locations map to GCP zones, for example **us-west1-b**. To
-   * retrieve instance information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 PAGE_SIZE_FIELD_NUMBER = 2; - 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_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - 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; - return s; - } - } - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 4; - private volatile java.lang.Object orderBy_; - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - 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(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 5; - private volatile java.lang.Object filter_; - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @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 = 5; - * @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 - 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 (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); - } - 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 (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(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); - } - 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.filestore.v1beta1.ListInstancesRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.ListInstancesRequest other = (com.google.cloud.filestore.v1beta1.ListInstancesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!getFilter() - .equals(other.getFilter())) 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(); - 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) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().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.filestore.v1beta1.ListInstancesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesRequest 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.filestore.v1beta1.ListInstancesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesRequest 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.filestore.v1beta1.ListInstancesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesRequest 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.filestore.v1beta1.ListInstancesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesRequest 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.filestore.v1beta1.ListInstancesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesRequest 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.filestore.v1beta1.ListInstancesRequest 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; - } - /** - *
-   * ListInstancesRequest lists instances.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.ListInstancesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.ListInstancesRequest) - com.google.cloud.filestore.v1beta1.ListInstancesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.ListInstancesRequest.class, com.google.cloud.filestore.v1beta1.ListInstancesRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.ListInstancesRequest.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_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - orderBy_ = ""; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListInstancesRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.ListInstancesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListInstancesRequest build() { - com.google.cloud.filestore.v1beta1.ListInstancesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListInstancesRequest buildPartial() { - com.google.cloud.filestore.v1beta1.ListInstancesRequest result = new com.google.cloud.filestore.v1beta1.ListInstancesRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.orderBy_ = orderBy_; - result.filter_ = filter_; - 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.filestore.v1beta1.ListInstancesRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.ListInstancesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.ListInstancesRequest other) { - if (other == com.google.cloud.filestore.v1beta1.ListInstancesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - 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.filestore.v1beta1.ListInstancesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.ListInstancesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project and location for which to retrieve instance information,
-     * in the format `projects/{project_id}/locations/{location}`. In Cloud
-     * Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve instance information,
-     * in the format `projects/{project_id}/locations/{location}`. In Cloud
-     * Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve instance information,
-     * in the format `projects/{project_id}/locations/{location}`. In Cloud
-     * Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve instance information,
-     * in the format `projects/{project_id}/locations/{location}`. In Cloud
-     * Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 project and location for which to retrieve instance information,
-     * in the format `projects/{project_id}/locations/{location}`. In Cloud
-     * Filestore, locations map to GCP zones, for example **us-west1-b**. To
-     * retrieve instance information for all locations, use "-" for the
-     * `{location}` value.
-     * 
- * - * 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 int pageSize_ ; - /** - *
-     * The maximum number of items to return.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return.
-     * 
- * - * 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 to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token value to use if there are additional
-     * results to retrieve for this list request.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-     * 
- * - * string order_by = 4; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * List filter.
-     * 
- * - * string filter = 5; - * @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 = 5; - * @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 = 5; - * @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 = 5; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * List filter.
-     * 
- * - * string filter = 5; - * @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); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.filestore.v1beta1.ListInstancesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.ListInstancesRequest) - private static final com.google.cloud.filestore.v1beta1.ListInstancesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.ListInstancesRequest(); - } - - public static com.google.cloud.filestore.v1beta1.ListInstancesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListInstancesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstancesRequest(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.filestore.v1beta1.ListInstancesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesRequestOrBuilder.java deleted file mode 100644 index 6e6567c49c2a..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesRequestOrBuilder.java +++ /dev/null @@ -1,109 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface ListInstancesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.ListInstancesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project and location for which to retrieve instance information,
-   * in the format `projects/{project_id}/locations/{location}`. In Cloud
-   * Filestore, locations map to GCP zones, for example **us-west1-b**. To
-   * retrieve instance information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project and location for which to retrieve instance information,
-   * in the format `projects/{project_id}/locations/{location}`. In Cloud
-   * Filestore, locations map to GCP zones, for example **us-west1-b**. To
-   * retrieve instance information for all locations, use "-" for the
-   * `{location}` value.
-   * 
- * - * 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 to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token value to use if there are additional
-   * results to retrieve for this list request.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * List filter.
-   * 
- * - * string filter = 5; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesResponse.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesResponse.java deleted file mode 100644 index f945a60adbc2..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesResponse.java +++ /dev/null @@ -1,1381 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * ListInstancesResponse is the result of ListInstancesRequest.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.ListInstancesResponse} - */ -public final class ListInstancesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.ListInstancesResponse) - ListInstancesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListInstancesResponse.newBuilder() to construct. - private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListInstancesResponse() { - instances_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListInstancesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListInstancesResponse( - 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)) { - instances_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage(com.google.cloud.filestore.v1beta1.Instance.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.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)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.ListInstancesResponse.class, com.google.cloud.filestore.v1beta1.ListInstancesResponse.Builder.class); - } - - public static final int INSTANCES_FIELD_NUMBER = 1; - private java.util.List instances_; - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - @java.lang.Override - public java.util.List getInstancesList() { - return instances_; - } - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - @java.lang.Override - public java.util.List - getInstancesOrBuilderList() { - return instances_; - } - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - @java.lang.Override - public int getInstancesCount() { - return instances_.size(); - } - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Instance getInstances(int index) { - return instances_.get(index); - } - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.InstanceOrBuilder getInstancesOrBuilder( - int index) { - return instances_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * 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; - } - } - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * 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; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList unreachable_; - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList - getUnreachableList() { - return unreachable_; - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString - getUnreachableBytes(int index) { - return unreachable_.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 { - for (int i = 0; i < instances_.size(); i++) { - output.writeMessage(1, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < instances_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().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.filestore.v1beta1.ListInstancesResponse)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.ListInstancesResponse other = (com.google.cloud.filestore.v1beta1.ListInstancesResponse) obj; - - if (!getInstancesList() - .equals(other.getInstancesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!getUnreachableList() - .equals(other.getUnreachableList())) 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 (getInstancesCount() > 0) { - hash = (37 * hash) + INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getInstancesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.ListInstancesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesResponse 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.filestore.v1beta1.ListInstancesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesResponse 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.filestore.v1beta1.ListInstancesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesResponse 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.filestore.v1beta1.ListInstancesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesResponse 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.filestore.v1beta1.ListInstancesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.ListInstancesResponse 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.filestore.v1beta1.ListInstancesResponse 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; - } - /** - *
-   * ListInstancesResponse is the result of ListInstancesRequest.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.ListInstancesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.ListInstancesResponse) - com.google.cloud.filestore.v1beta1.ListInstancesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.ListInstancesResponse.class, com.google.cloud.filestore.v1beta1.ListInstancesResponse.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.ListInstancesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInstancesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - instancesBuilder_.clear(); - } - nextPageToken_ = ""; - - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_ListInstancesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListInstancesResponse getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.ListInstancesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListInstancesResponse build() { - com.google.cloud.filestore.v1beta1.ListInstancesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.ListInstancesResponse buildPartial() { - com.google.cloud.filestore.v1beta1.ListInstancesResponse result = new com.google.cloud.filestore.v1beta1.ListInstancesResponse(this); - int from_bitField0_ = bitField0_; - if (instancesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.instances_ = instances_; - } else { - result.instances_ = instancesBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - if (((bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.unreachable_ = unreachable_; - 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.filestore.v1beta1.ListInstancesResponse) { - return mergeFrom((com.google.cloud.filestore.v1beta1.ListInstancesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.ListInstancesResponse other) { - if (other == com.google.cloud.filestore.v1beta1.ListInstancesResponse.getDefaultInstance()) return this; - if (instancesBuilder_ == null) { - if (!other.instances_.isEmpty()) { - if (instances_.isEmpty()) { - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInstancesIsMutable(); - instances_.addAll(other.instances_); - } - onChanged(); - } - } else { - if (!other.instances_.isEmpty()) { - if (instancesBuilder_.isEmpty()) { - instancesBuilder_.dispose(); - instancesBuilder_ = null; - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000001); - instancesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInstancesFieldBuilder() : null; - } else { - instancesBuilder_.addAllMessages(other.instances_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - 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.filestore.v1beta1.ListInstancesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.ListInstancesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List instances_ = - java.util.Collections.emptyList(); - private void ensureInstancesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - instances_ = new java.util.ArrayList(instances_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Instance, com.google.cloud.filestore.v1beta1.Instance.Builder, com.google.cloud.filestore.v1beta1.InstanceOrBuilder> instancesBuilder_; - - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public java.util.List getInstancesList() { - if (instancesBuilder_ == null) { - return java.util.Collections.unmodifiableList(instances_); - } else { - return instancesBuilder_.getMessageList(); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public int getInstancesCount() { - if (instancesBuilder_ == null) { - return instances_.size(); - } else { - return instancesBuilder_.getCount(); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1beta1.Instance getInstances(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessage(index); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public Builder setInstances( - int index, com.google.cloud.filestore.v1beta1.Instance value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.set(index, value); - onChanged(); - } else { - instancesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public Builder setInstances( - int index, com.google.cloud.filestore.v1beta1.Instance.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.set(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public Builder addInstances(com.google.cloud.filestore.v1beta1.Instance value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(value); - onChanged(); - } else { - instancesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public Builder addInstances( - int index, com.google.cloud.filestore.v1beta1.Instance value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(index, value); - onChanged(); - } else { - instancesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public Builder addInstances( - com.google.cloud.filestore.v1beta1.Instance.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public Builder addInstances( - int index, com.google.cloud.filestore.v1beta1.Instance.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public Builder addAllInstances( - java.lang.Iterable values) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, instances_); - onChanged(); - } else { - instancesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public Builder clearInstances() { - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - instancesBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public Builder removeInstances(int index) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.remove(index); - onChanged(); - } else { - instancesBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1beta1.Instance.Builder getInstancesBuilder( - int index) { - return getInstancesFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1beta1.InstanceOrBuilder getInstancesOrBuilder( - int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); } else { - return instancesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public java.util.List - getInstancesOrBuilderList() { - if (instancesBuilder_ != null) { - return instancesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(instances_); - } - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1beta1.Instance.Builder addInstancesBuilder() { - return getInstancesFieldBuilder().addBuilder( - com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance()); - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public com.google.cloud.filestore.v1beta1.Instance.Builder addInstancesBuilder( - int index) { - return getInstancesFieldBuilder().addBuilder( - index, com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance()); - } - /** - *
-     * A list of instances in the project for the specified location.
-     * If the `{location}` value in the request is "-", the response contains a
-     * list of instances from all locations. If any location is unreachable, the
-     * response will only return instances in reachable locations and the
-     * "unreachable" field will be populated with a list of unreachable locations.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - public java.util.List - getInstancesBuilderList() { - return getInstancesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Instance, com.google.cloud.filestore.v1beta1.Instance.Builder, com.google.cloud.filestore.v1beta1.InstanceOrBuilder> - getInstancesFieldBuilder() { - if (instancesBuilder_ == null) { - instancesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Instance, com.google.cloud.filestore.v1beta1.Instance.Builder, com.google.cloud.filestore.v1beta1.InstanceOrBuilder>( - instances_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - instances_ = null; - } - return instancesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - /** - *
-     * The token you can use to retrieve the next page of results. Not returned
-     * 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; - } - - private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList - getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString - getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable( - java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, unreachable_); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.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.filestore.v1beta1.ListInstancesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.ListInstancesResponse) - private static final com.google.cloud.filestore.v1beta1.ListInstancesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.ListInstancesResponse(); - } - - public static com.google.cloud.filestore.v1beta1.ListInstancesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListInstancesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstancesResponse(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.filestore.v1beta1.ListInstancesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesResponseOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesResponseOrBuilder.java deleted file mode 100644 index 40cd0d466af8..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/ListInstancesResponseOrBuilder.java +++ /dev/null @@ -1,136 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface ListInstancesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.ListInstancesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - java.util.List - getInstancesList(); - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - com.google.cloud.filestore.v1beta1.Instance getInstances(int index); - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - int getInstancesCount(); - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - java.util.List - getInstancesOrBuilderList(); - /** - *
-   * A list of instances in the project for the specified location.
-   * If the `{location}` value in the request is "-", the response contains a
-   * list of instances from all locations. If any location is unreachable, the
-   * response will only return instances in reachable locations and the
-   * "unreachable" field will be populated with a list of unreachable locations.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.Instance instances = 1; - */ - com.google.cloud.filestore.v1beta1.InstanceOrBuilder getInstancesOrBuilder( - int index); - - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * if there are no more results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The token you can use to retrieve the next page of results. Not returned
-   * if there are no more results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); - - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return A list containing the unreachable. - */ - java.util.List - getUnreachableList(); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString - getUnreachableBytes(int index); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/LocationName.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/LocationName.java deleted file mode 100644 index 3c721a3d6f43..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/LocationName.java +++ /dev/null @@ -1,192 +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.filestore.v1beta1; - -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 LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - 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 (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.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); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NetworkConfig.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NetworkConfig.java deleted file mode 100644 index 9b3861e1cddd..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NetworkConfig.java +++ /dev/null @@ -1,1570 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * Network configuration for the instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.NetworkConfig} - */ -public final class NetworkConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.NetworkConfig) - NetworkConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use NetworkConfig.newBuilder() to construct. - private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NetworkConfig() { - network_ = ""; - modes_ = java.util.Collections.emptyList(); - reservedIpRange_ = ""; - ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NetworkConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NetworkConfig( - 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(); - - network_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - modes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - modes_.add(rawValue); - break; - } - case 26: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - modes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - modes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - reservedIpRange_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ipAddresses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ipAddresses_.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)) { - modes_ = java.util.Collections.unmodifiableList(modes_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ipAddresses_ = ipAddresses_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.NetworkConfig.class, com.google.cloud.filestore.v1beta1.NetworkConfig.Builder.class); - } - - /** - *
-   * Internet protocol versions supported by Cloud Filestore.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1beta1.NetworkConfig.AddressMode} - */ - public enum AddressMode - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Internet protocol not set.
-     * 
- * - * ADDRESS_MODE_UNSPECIFIED = 0; - */ - ADDRESS_MODE_UNSPECIFIED(0), - /** - *
-     * Use the IPv4 internet protocol.
-     * 
- * - * MODE_IPV4 = 1; - */ - MODE_IPV4(1), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Internet protocol not set.
-     * 
- * - * ADDRESS_MODE_UNSPECIFIED = 0; - */ - public static final int ADDRESS_MODE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Use the IPv4 internet protocol.
-     * 
- * - * MODE_IPV4 = 1; - */ - public static final int MODE_IPV4_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 AddressMode 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 AddressMode forNumber(int value) { - switch (value) { - case 0: return ADDRESS_MODE_UNSPECIFIED; - case 1: return MODE_IPV4; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AddressMode> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AddressMode findValueByNumber(int number) { - return AddressMode.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.filestore.v1beta1.NetworkConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final AddressMode[] VALUES = values(); - - public static AddressMode 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 AddressMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1beta1.NetworkConfig.AddressMode) - } - - public static final int NETWORK_FIELD_NUMBER = 1; - private volatile java.lang.Object network_; - /** - *
-   * The name of the Google Compute Engine
-   * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-   * instance is connected.
-   * 
- * - * 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; - } - } - /** - *
-   * The name of the Google Compute Engine
-   * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-   * instance is connected.
-   * 
- * - * 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 MODES_FIELD_NUMBER = 3; - private java.util.List modes_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode> modes_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode>() { - public com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode result = com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode.valueOf(from); - return result == null ? com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode.UNRECOGNIZED : result; - } - }; - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the modes. - */ - @java.lang.Override - public java.util.List getModesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode>(modes_, modes_converter_); - } - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return The count of modes. - */ - @java.lang.Override - public int getModesCount() { - return modes_.size(); - } - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the element to return. - * @return The modes at the given index. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode getModes(int index) { - return modes_converter_.convert(modes_.get(index)); - } - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the enum numeric values on the wire for modes. - */ - @java.lang.Override - public java.util.List - getModesValueList() { - return modes_; - } - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of modes at the given index. - */ - @java.lang.Override - public int getModesValue(int index) { - return modes_.get(index); - } - private int modesMemoizedSerializedSize; - - public static final int RESERVED_IP_RANGE_FIELD_NUMBER = 4; - private volatile java.lang.Object reservedIpRange_; - /** - *
-   * A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the
-   * [internal IP address
-   * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-   * that identifies the range of IP addresses reserved for this instance. For
-   * example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap
-   * with either existing subnets or assigned IP address ranges for other Cloud
-   * Filestore instances in the selected VPC network.
-   * 
- * - * string reserved_ip_range = 4; - * @return The reservedIpRange. - */ - @java.lang.Override - public java.lang.String getReservedIpRange() { - java.lang.Object ref = reservedIpRange_; - 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(); - reservedIpRange_ = s; - return s; - } - } - /** - *
-   * A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the
-   * [internal IP address
-   * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-   * that identifies the range of IP addresses reserved for this instance. For
-   * example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap
-   * with either existing subnets or assigned IP address ranges for other Cloud
-   * Filestore instances in the selected VPC network.
-   * 
- * - * string reserved_ip_range = 4; - * @return The bytes for reservedIpRange. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReservedIpRangeBytes() { - java.lang.Object ref = reservedIpRange_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reservedIpRange_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IP_ADDRESSES_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList ipAddresses_; - /** - *
-   * Output only. IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return A list containing the ipAddresses. - */ - public com.google.protobuf.ProtocolStringList - getIpAddressesList() { - return ipAddresses_; - } - /** - *
-   * Output only. IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The count of ipAddresses. - */ - public int getIpAddressesCount() { - return ipAddresses_.size(); - } - /** - *
-   * Output only. IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the element to return. - * @return The ipAddresses at the given index. - */ - public java.lang.String getIpAddresses(int index) { - return ipAddresses_.get(index); - } - /** - *
-   * Output only. IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. - */ - public com.google.protobuf.ByteString - getIpAddressesBytes(int index) { - return ipAddresses_.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 { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); - } - if (getModesList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(modesMemoizedSerializedSize); - } - for (int i = 0; i < modes_.size(); i++) { - output.writeEnumNoTag(modes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, reservedIpRange_); - } - for (int i = 0; i < ipAddresses_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, ipAddresses_.getRaw(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(network_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); - } - { - int dataSize = 0; - for (int i = 0; i < modes_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(modes_.get(i)); - } - size += dataSize; - if (!getModesList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }modesMemoizedSerializedSize = dataSize; - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, reservedIpRange_); - } - { - int dataSize = 0; - for (int i = 0; i < ipAddresses_.size(); i++) { - dataSize += computeStringSizeNoTag(ipAddresses_.getRaw(i)); - } - size += dataSize; - size += 1 * getIpAddressesList().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.filestore.v1beta1.NetworkConfig)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.NetworkConfig other = (com.google.cloud.filestore.v1beta1.NetworkConfig) obj; - - if (!getNetwork() - .equals(other.getNetwork())) return false; - if (!modes_.equals(other.modes_)) return false; - if (!getReservedIpRange() - .equals(other.getReservedIpRange())) return false; - if (!getIpAddressesList() - .equals(other.getIpAddressesList())) 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(); - if (getModesCount() > 0) { - hash = (37 * hash) + MODES_FIELD_NUMBER; - hash = (53 * hash) + modes_.hashCode(); - } - hash = (37 * hash) + RESERVED_IP_RANGE_FIELD_NUMBER; - hash = (53 * hash) + getReservedIpRange().hashCode(); - if (getIpAddressesCount() > 0) { - hash = (37 * hash) + IP_ADDRESSES_FIELD_NUMBER; - hash = (53 * hash) + getIpAddressesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.NetworkConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.NetworkConfig 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.filestore.v1beta1.NetworkConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.NetworkConfig 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.filestore.v1beta1.NetworkConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.NetworkConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.NetworkConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.NetworkConfig 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.filestore.v1beta1.NetworkConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.NetworkConfig 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.filestore.v1beta1.NetworkConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.NetworkConfig 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.filestore.v1beta1.NetworkConfig 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 configuration for the instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.NetworkConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.NetworkConfig) - com.google.cloud.filestore.v1beta1.NetworkConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.NetworkConfig.class, com.google.cloud.filestore.v1beta1.NetworkConfig.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.NetworkConfig.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_ = ""; - - modes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - reservedIpRange_ = ""; - - ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NetworkConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NetworkConfig getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.NetworkConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NetworkConfig build() { - com.google.cloud.filestore.v1beta1.NetworkConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NetworkConfig buildPartial() { - com.google.cloud.filestore.v1beta1.NetworkConfig result = new com.google.cloud.filestore.v1beta1.NetworkConfig(this); - int from_bitField0_ = bitField0_; - result.network_ = network_; - if (((bitField0_ & 0x00000001) != 0)) { - modes_ = java.util.Collections.unmodifiableList(modes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.modes_ = modes_; - result.reservedIpRange_ = reservedIpRange_; - if (((bitField0_ & 0x00000002) != 0)) { - ipAddresses_ = ipAddresses_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.ipAddresses_ = ipAddresses_; - 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.filestore.v1beta1.NetworkConfig) { - return mergeFrom((com.google.cloud.filestore.v1beta1.NetworkConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.NetworkConfig other) { - if (other == com.google.cloud.filestore.v1beta1.NetworkConfig.getDefaultInstance()) return this; - if (!other.getNetwork().isEmpty()) { - network_ = other.network_; - onChanged(); - } - if (!other.modes_.isEmpty()) { - if (modes_.isEmpty()) { - modes_ = other.modes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureModesIsMutable(); - modes_.addAll(other.modes_); - } - onChanged(); - } - if (!other.getReservedIpRange().isEmpty()) { - reservedIpRange_ = other.reservedIpRange_; - onChanged(); - } - if (!other.ipAddresses_.isEmpty()) { - if (ipAddresses_.isEmpty()) { - ipAddresses_ = other.ipAddresses_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureIpAddressesIsMutable(); - ipAddresses_.addAll(other.ipAddresses_); - } - 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.filestore.v1beta1.NetworkConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.NetworkConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object network_ = ""; - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * 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; - } - } - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * 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; - } - } - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * 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; - } - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * string network = 1; - * @return This builder for chaining. - */ - public Builder clearNetwork() { - - network_ = getDefaultInstance().getNetwork(); - onChanged(); - return this; - } - /** - *
-     * The name of the Google Compute Engine
-     * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected.
-     * 
- * - * 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.util.List modes_ = - java.util.Collections.emptyList(); - private void ensureModesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - modes_ = new java.util.ArrayList(modes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the modes. - */ - public java.util.List getModesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode>(modes_, modes_converter_); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return The count of modes. - */ - public int getModesCount() { - return modes_.size(); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the element to return. - * @return The modes at the given index. - */ - public com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode getModes(int index) { - return modes_converter_.convert(modes_.get(index)); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param index The index to set the value at. - * @param value The modes to set. - * @return This builder for chaining. - */ - public Builder setModes( - int index, com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode value) { - if (value == null) { - throw new NullPointerException(); - } - ensureModesIsMutable(); - modes_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param value The modes to add. - * @return This builder for chaining. - */ - public Builder addModes(com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode value) { - if (value == null) { - throw new NullPointerException(); - } - ensureModesIsMutable(); - modes_.add(value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param values The modes to add. - * @return This builder for chaining. - */ - public Builder addAllModes( - java.lang.Iterable values) { - ensureModesIsMutable(); - for (com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode value : values) { - modes_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return This builder for chaining. - */ - public Builder clearModes() { - modes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the enum numeric values on the wire for modes. - */ - public java.util.List - getModesValueList() { - return java.util.Collections.unmodifiableList(modes_); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of modes at the given index. - */ - public int getModesValue(int index) { - return modes_.get(index); - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for modes to set. - * @return This builder for chaining. - */ - public Builder setModesValue( - int index, int value) { - ensureModesIsMutable(); - modes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param value The enum numeric value on the wire for modes to add. - * @return This builder for chaining. - */ - public Builder addModesValue(int value) { - ensureModesIsMutable(); - modes_.add(value); - onChanged(); - return this; - } - /** - *
-     * Internet protocol versions for which the instance has IP addresses
-     * assigned. For this version, only MODE_IPV4 is supported.
-     * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param values The enum numeric values on the wire for modes to add. - * @return This builder for chaining. - */ - public Builder addAllModesValue( - java.lang.Iterable values) { - ensureModesIsMutable(); - for (int value : values) { - modes_.add(value); - } - onChanged(); - return this; - } - - private java.lang.Object reservedIpRange_ = ""; - /** - *
-     * A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @return The reservedIpRange. - */ - public java.lang.String getReservedIpRange() { - java.lang.Object ref = reservedIpRange_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reservedIpRange_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @return The bytes for reservedIpRange. - */ - public com.google.protobuf.ByteString - getReservedIpRangeBytes() { - java.lang.Object ref = reservedIpRange_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reservedIpRange_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @param value The reservedIpRange to set. - * @return This builder for chaining. - */ - public Builder setReservedIpRange( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - reservedIpRange_ = value; - onChanged(); - return this; - } - /** - *
-     * A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @return This builder for chaining. - */ - public Builder clearReservedIpRange() { - - reservedIpRange_ = getDefaultInstance().getReservedIpRange(); - onChanged(); - return this; - } - /** - *
-     * A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the
-     * [internal IP address
-     * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-     * that identifies the range of IP addresses reserved for this instance. For
-     * example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap
-     * with either existing subnets or assigned IP address ranges for other Cloud
-     * Filestore instances in the selected VPC network.
-     * 
- * - * string reserved_ip_range = 4; - * @param value The bytes for reservedIpRange to set. - * @return This builder for chaining. - */ - public Builder setReservedIpRangeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - reservedIpRange_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureIpAddressesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - ipAddresses_ = new com.google.protobuf.LazyStringArrayList(ipAddresses_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return A list containing the ipAddresses. - */ - public com.google.protobuf.ProtocolStringList - getIpAddressesList() { - return ipAddresses_.getUnmodifiableView(); - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The count of ipAddresses. - */ - public int getIpAddressesCount() { - return ipAddresses_.size(); - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the element to return. - * @return The ipAddresses at the given index. - */ - public java.lang.String getIpAddresses(int index) { - return ipAddresses_.get(index); - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. - */ - public com.google.protobuf.ByteString - getIpAddressesBytes(int index) { - return ipAddresses_.getByteString(index); - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index to set the value at. - * @param value The ipAddresses to set. - * @return This builder for chaining. - */ - public Builder setIpAddresses( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpAddressesIsMutable(); - ipAddresses_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The ipAddresses to add. - * @return This builder for chaining. - */ - public Builder addIpAddresses( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpAddressesIsMutable(); - ipAddresses_.add(value); - onChanged(); - return this; - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param values The ipAddresses to add. - * @return This builder for chaining. - */ - public Builder addAllIpAddresses( - java.lang.Iterable values) { - ensureIpAddressesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ipAddresses_); - onChanged(); - return this; - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearIpAddresses() { - ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Output only. IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-     * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-     * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes of the ipAddresses to add. - * @return This builder for chaining. - */ - public Builder addIpAddressesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureIpAddressesIsMutable(); - ipAddresses_.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.filestore.v1beta1.NetworkConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.NetworkConfig) - private static final com.google.cloud.filestore.v1beta1.NetworkConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.NetworkConfig(); - } - - public static com.google.cloud.filestore.v1beta1.NetworkConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NetworkConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkConfig(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.filestore.v1beta1.NetworkConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NetworkConfigOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NetworkConfigOrBuilder.java deleted file mode 100644 index a16901de5315..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NetworkConfigOrBuilder.java +++ /dev/null @@ -1,168 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface NetworkConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.NetworkConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the Google Compute Engine
-   * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-   * instance is connected.
-   * 
- * - * string network = 1; - * @return The network. - */ - java.lang.String getNetwork(); - /** - *
-   * The name of the Google Compute Engine
-   * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
-   * instance is connected.
-   * 
- * - * string network = 1; - * @return The bytes for network. - */ - com.google.protobuf.ByteString - getNetworkBytes(); - - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the modes. - */ - java.util.List getModesList(); - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return The count of modes. - */ - int getModesCount(); - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the element to return. - * @return The modes at the given index. - */ - com.google.cloud.filestore.v1beta1.NetworkConfig.AddressMode getModes(int index); - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @return A list containing the enum numeric values on the wire for modes. - */ - java.util.List - getModesValueList(); - /** - *
-   * Internet protocol versions for which the instance has IP addresses
-   * assigned. For this version, only MODE_IPV4 is supported.
-   * 
- * - * repeated .google.cloud.filestore.v1beta1.NetworkConfig.AddressMode modes = 3; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of modes at the given index. - */ - int getModesValue(int index); - - /** - *
-   * A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the
-   * [internal IP address
-   * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-   * that identifies the range of IP addresses reserved for this instance. For
-   * example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap
-   * with either existing subnets or assigned IP address ranges for other Cloud
-   * Filestore instances in the selected VPC network.
-   * 
- * - * string reserved_ip_range = 4; - * @return The reservedIpRange. - */ - java.lang.String getReservedIpRange(); - /** - *
-   * A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the
-   * [internal IP address
-   * ranges](https://www.arin.net/reference/research/statistics/address_filters/)
-   * that identifies the range of IP addresses reserved for this instance. For
-   * example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap
-   * with either existing subnets or assigned IP address ranges for other Cloud
-   * Filestore instances in the selected VPC network.
-   * 
- * - * string reserved_ip_range = 4; - * @return The bytes for reservedIpRange. - */ - com.google.protobuf.ByteString - getReservedIpRangeBytes(); - - /** - *
-   * Output only. IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return A list containing the ipAddresses. - */ - java.util.List - getIpAddressesList(); - /** - *
-   * Output only. IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The count of ipAddresses. - */ - int getIpAddressesCount(); - /** - *
-   * Output only. IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the element to return. - * @return The ipAddresses at the given index. - */ - java.lang.String getIpAddresses(int index); - /** - *
-   * Output only. IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
-   * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
-   * 
- * - * repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. - */ - com.google.protobuf.ByteString - getIpAddressesBytes(int index); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NfsExportOptions.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NfsExportOptions.java deleted file mode 100644 index 67c6041981a1..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NfsExportOptions.java +++ /dev/null @@ -1,1519 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * NFS export options specifications.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.NfsExportOptions} - */ -public final class NfsExportOptions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.NfsExportOptions) - NfsExportOptionsOrBuilder { -private static final long serialVersionUID = 0L; - // Use NfsExportOptions.newBuilder() to construct. - private NfsExportOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NfsExportOptions() { - ipRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; - accessMode_ = 0; - squashMode_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NfsExportOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NfsExportOptions( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ipRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ipRanges_.add(s); - break; - } - case 16: { - int rawValue = input.readEnum(); - - accessMode_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - squashMode_ = rawValue; - break; - } - case 32: { - - anonUid_ = input.readInt64(); - break; - } - case 40: { - - anonGid_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ipRanges_ = ipRanges_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.NfsExportOptions.class, com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder.class); - } - - /** - *
-   * The access mode.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode} - */ - public enum AccessMode - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * AccessMode not set.
-     * 
- * - * ACCESS_MODE_UNSPECIFIED = 0; - */ - ACCESS_MODE_UNSPECIFIED(0), - /** - *
-     * The client can only read the file share.
-     * 
- * - * READ_ONLY = 1; - */ - READ_ONLY(1), - /** - *
-     * The client can read and write the file share (default).
-     * 
- * - * READ_WRITE = 2; - */ - READ_WRITE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * AccessMode not set.
-     * 
- * - * ACCESS_MODE_UNSPECIFIED = 0; - */ - public static final int ACCESS_MODE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The client can only read the file share.
-     * 
- * - * READ_ONLY = 1; - */ - public static final int READ_ONLY_VALUE = 1; - /** - *
-     * The client can read and write the file share (default).
-     * 
- * - * 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 AccessMode 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 AccessMode forNumber(int value) { - switch (value) { - case 0: return ACCESS_MODE_UNSPECIFIED; - case 1: return READ_ONLY; - 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< - AccessMode> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AccessMode findValueByNumber(int number) { - return AccessMode.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.filestore.v1beta1.NfsExportOptions.getDescriptor().getEnumTypes().get(0); - } - - private static final AccessMode[] VALUES = values(); - - public static AccessMode 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 AccessMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode) - } - - /** - *
-   * The squash mode.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode} - */ - public enum SquashMode - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * SquashMode not set.
-     * 
- * - * SQUASH_MODE_UNSPECIFIED = 0; - */ - SQUASH_MODE_UNSPECIFIED(0), - /** - *
-     * The Root user has root access to the file share (default).
-     * 
- * - * NO_ROOT_SQUASH = 1; - */ - NO_ROOT_SQUASH(1), - /** - *
-     * The Root user has squashed access to the anonymous uid/gid.
-     * 
- * - * ROOT_SQUASH = 2; - */ - ROOT_SQUASH(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * SquashMode not set.
-     * 
- * - * SQUASH_MODE_UNSPECIFIED = 0; - */ - public static final int SQUASH_MODE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The Root user has root access to the file share (default).
-     * 
- * - * NO_ROOT_SQUASH = 1; - */ - public static final int NO_ROOT_SQUASH_VALUE = 1; - /** - *
-     * The Root user has squashed access to the anonymous uid/gid.
-     * 
- * - * ROOT_SQUASH = 2; - */ - public static final int ROOT_SQUASH_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 SquashMode 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 SquashMode forNumber(int value) { - switch (value) { - case 0: return SQUASH_MODE_UNSPECIFIED; - case 1: return NO_ROOT_SQUASH; - case 2: return ROOT_SQUASH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SquashMode> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SquashMode findValueByNumber(int number) { - return SquashMode.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.filestore.v1beta1.NfsExportOptions.getDescriptor().getEnumTypes().get(1); - } - - private static final SquashMode[] VALUES = values(); - - public static SquashMode 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 SquashMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode) - } - - public static final int IP_RANGES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList ipRanges_; - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @return A list containing the ipRanges. - */ - public com.google.protobuf.ProtocolStringList - getIpRangesList() { - return ipRanges_; - } - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @return The count of ipRanges. - */ - public int getIpRangesCount() { - return ipRanges_.size(); - } - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the element to return. - * @return The ipRanges at the given index. - */ - public java.lang.String getIpRanges(int index) { - return ipRanges_.get(index); - } - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the value to return. - * @return The bytes of the ipRanges at the given index. - */ - public com.google.protobuf.ByteString - getIpRangesBytes(int index) { - return ipRanges_.getByteString(index); - } - - public static final int ACCESS_MODE_FIELD_NUMBER = 2; - private int accessMode_; - /** - *
-   * Either READ_ONLY, for allowing only read requests on the exported
-   * directory, or READ_WRITE, for allowing both read and write requests.
-   * The default is READ_WRITE.
-   * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2; - * @return The enum numeric value on the wire for accessMode. - */ - @java.lang.Override public int getAccessModeValue() { - return accessMode_; - } - /** - *
-   * Either READ_ONLY, for allowing only read requests on the exported
-   * directory, or READ_WRITE, for allowing both read and write requests.
-   * The default is READ_WRITE.
-   * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2; - * @return The accessMode. - */ - @java.lang.Override public com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode getAccessMode() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode result = com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.valueOf(accessMode_); - return result == null ? com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.UNRECOGNIZED : result; - } - - public static final int SQUASH_MODE_FIELD_NUMBER = 3; - private int squashMode_; - /** - *
-   * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-   * or ROOT_SQUASH, for not allowing root access. The default is
-   * NO_ROOT_SQUASH.
-   * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The enum numeric value on the wire for squashMode. - */ - @java.lang.Override public int getSquashModeValue() { - return squashMode_; - } - /** - *
-   * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-   * or ROOT_SQUASH, for not allowing root access. The default is
-   * NO_ROOT_SQUASH.
-   * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The squashMode. - */ - @java.lang.Override public com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode getSquashMode() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode result = com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.valueOf(squashMode_); - return result == null ? com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.UNRECOGNIZED : result; - } - - public static final int ANON_UID_FIELD_NUMBER = 4; - private long anonUid_; - /** - *
-   * An integer representing the anonymous user id with a default value of
-   * 65534.
-   * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-   * returned if this field is specified for other squash_mode settings.
-   * 
- * - * int64 anon_uid = 4; - * @return The anonUid. - */ - @java.lang.Override - public long getAnonUid() { - return anonUid_; - } - - public static final int ANON_GID_FIELD_NUMBER = 5; - private long anonGid_; - /** - *
-   * An integer representing the anonymous group id with a default value of
-   * 65534.
-   * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-   * returned if this field is specified for other squash_mode settings.
-   * 
- * - * int64 anon_gid = 5; - * @return The anonGid. - */ - @java.lang.Override - public long getAnonGid() { - return anonGid_; - } - - 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 < ipRanges_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipRanges_.getRaw(i)); - } - if (accessMode_ != com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.ACCESS_MODE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, accessMode_); - } - if (squashMode_ != com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.SQUASH_MODE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, squashMode_); - } - if (anonUid_ != 0L) { - output.writeInt64(4, anonUid_); - } - if (anonGid_ != 0L) { - output.writeInt64(5, anonGid_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < ipRanges_.size(); i++) { - dataSize += computeStringSizeNoTag(ipRanges_.getRaw(i)); - } - size += dataSize; - size += 1 * getIpRangesList().size(); - } - if (accessMode_ != com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.ACCESS_MODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, accessMode_); - } - if (squashMode_ != com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.SQUASH_MODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, squashMode_); - } - if (anonUid_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, anonUid_); - } - if (anonGid_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, anonGid_); - } - 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.filestore.v1beta1.NfsExportOptions)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.NfsExportOptions other = (com.google.cloud.filestore.v1beta1.NfsExportOptions) obj; - - if (!getIpRangesList() - .equals(other.getIpRangesList())) return false; - if (accessMode_ != other.accessMode_) return false; - if (squashMode_ != other.squashMode_) return false; - if (getAnonUid() - != other.getAnonUid()) return false; - if (getAnonGid() - != other.getAnonGid()) 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 (getIpRangesCount() > 0) { - hash = (37 * hash) + IP_RANGES_FIELD_NUMBER; - hash = (53 * hash) + getIpRangesList().hashCode(); - } - hash = (37 * hash) + ACCESS_MODE_FIELD_NUMBER; - hash = (53 * hash) + accessMode_; - hash = (37 * hash) + SQUASH_MODE_FIELD_NUMBER; - hash = (53 * hash) + squashMode_; - hash = (37 * hash) + ANON_UID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAnonUid()); - hash = (37 * hash) + ANON_GID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAnonGid()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.NfsExportOptions 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.filestore.v1beta1.NfsExportOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.NfsExportOptions 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.filestore.v1beta1.NfsExportOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.NfsExportOptions 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.filestore.v1beta1.NfsExportOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.NfsExportOptions 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.filestore.v1beta1.NfsExportOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.NfsExportOptions 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.filestore.v1beta1.NfsExportOptions 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; - } - /** - *
-   * NFS export options specifications.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.NfsExportOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.NfsExportOptions) - com.google.cloud.filestore.v1beta1.NfsExportOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.NfsExportOptions.class, com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.NfsExportOptions.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(); - ipRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - accessMode_ = 0; - - squashMode_ = 0; - - anonUid_ = 0L; - - anonGid_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NfsExportOptions getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.NfsExportOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NfsExportOptions build() { - com.google.cloud.filestore.v1beta1.NfsExportOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NfsExportOptions buildPartial() { - com.google.cloud.filestore.v1beta1.NfsExportOptions result = new com.google.cloud.filestore.v1beta1.NfsExportOptions(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - ipRanges_ = ipRanges_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.ipRanges_ = ipRanges_; - result.accessMode_ = accessMode_; - result.squashMode_ = squashMode_; - result.anonUid_ = anonUid_; - result.anonGid_ = anonGid_; - 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.filestore.v1beta1.NfsExportOptions) { - return mergeFrom((com.google.cloud.filestore.v1beta1.NfsExportOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.NfsExportOptions other) { - if (other == com.google.cloud.filestore.v1beta1.NfsExportOptions.getDefaultInstance()) return this; - if (!other.ipRanges_.isEmpty()) { - if (ipRanges_.isEmpty()) { - ipRanges_ = other.ipRanges_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIpRangesIsMutable(); - ipRanges_.addAll(other.ipRanges_); - } - onChanged(); - } - if (other.accessMode_ != 0) { - setAccessModeValue(other.getAccessModeValue()); - } - if (other.squashMode_ != 0) { - setSquashModeValue(other.getSquashModeValue()); - } - if (other.getAnonUid() != 0L) { - setAnonUid(other.getAnonUid()); - } - if (other.getAnonGid() != 0L) { - setAnonGid(other.getAnonGid()); - } - 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.filestore.v1beta1.NfsExportOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.NfsExportOptions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList ipRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureIpRangesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - ipRanges_ = new com.google.protobuf.LazyStringArrayList(ipRanges_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @return A list containing the ipRanges. - */ - public com.google.protobuf.ProtocolStringList - getIpRangesList() { - return ipRanges_.getUnmodifiableView(); - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @return The count of ipRanges. - */ - public int getIpRangesCount() { - return ipRanges_.size(); - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the element to return. - * @return The ipRanges at the given index. - */ - public java.lang.String getIpRanges(int index) { - return ipRanges_.get(index); - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the value to return. - * @return The bytes of the ipRanges at the given index. - */ - public com.google.protobuf.ByteString - getIpRangesBytes(int index) { - return ipRanges_.getByteString(index); - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param index The index to set the value at. - * @param value The ipRanges to set. - * @return This builder for chaining. - */ - public Builder setIpRanges( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpRangesIsMutable(); - ipRanges_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param value The ipRanges to add. - * @return This builder for chaining. - */ - public Builder addIpRanges( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIpRangesIsMutable(); - ipRanges_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param values The ipRanges to add. - * @return This builder for chaining. - */ - public Builder addAllIpRanges( - java.lang.Iterable values) { - ensureIpRangesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ipRanges_); - onChanged(); - return this; - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @return This builder for chaining. - */ - public Builder clearIpRanges() { - ipRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of either an IPv4 addresses in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-     * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-     * file share.
-     * Overlapping IP ranges are not allowed, both within and across
-     * NfsExportOptions. An error will be returned.
-     * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-     * NfsExportOptions.
-     * 
- * - * repeated string ip_ranges = 1; - * @param value The bytes of the ipRanges to add. - * @return This builder for chaining. - */ - public Builder addIpRangesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureIpRangesIsMutable(); - ipRanges_.add(value); - onChanged(); - return this; - } - - private int accessMode_ = 0; - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2; - * @return The enum numeric value on the wire for accessMode. - */ - @java.lang.Override public int getAccessModeValue() { - return accessMode_; - } - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2; - * @param value The enum numeric value on the wire for accessMode to set. - * @return This builder for chaining. - */ - public Builder setAccessModeValue(int value) { - - accessMode_ = value; - onChanged(); - return this; - } - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2; - * @return The accessMode. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode getAccessMode() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode result = com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.valueOf(accessMode_); - return result == null ? com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.UNRECOGNIZED : result; - } - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2; - * @param value The accessMode to set. - * @return This builder for chaining. - */ - public Builder setAccessMode(com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode value) { - if (value == null) { - throw new NullPointerException(); - } - - accessMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Either READ_ONLY, for allowing only read requests on the exported
-     * directory, or READ_WRITE, for allowing both read and write requests.
-     * The default is READ_WRITE.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2; - * @return This builder for chaining. - */ - public Builder clearAccessMode() { - - accessMode_ = 0; - onChanged(); - return this; - } - - private int squashMode_ = 0; - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The enum numeric value on the wire for squashMode. - */ - @java.lang.Override public int getSquashModeValue() { - return squashMode_; - } - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3; - * @param value The enum numeric value on the wire for squashMode to set. - * @return This builder for chaining. - */ - public Builder setSquashModeValue(int value) { - - squashMode_ = value; - onChanged(); - return this; - } - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The squashMode. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode getSquashMode() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode result = com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.valueOf(squashMode_); - return result == null ? com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.UNRECOGNIZED : result; - } - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3; - * @param value The squashMode to set. - * @return This builder for chaining. - */ - public Builder setSquashMode(com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode value) { - if (value == null) { - throw new NullPointerException(); - } - - squashMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-     * or ROOT_SQUASH, for not allowing root access. The default is
-     * NO_ROOT_SQUASH.
-     * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3; - * @return This builder for chaining. - */ - public Builder clearSquashMode() { - - squashMode_ = 0; - onChanged(); - return this; - } - - private long anonUid_ ; - /** - *
-     * An integer representing the anonymous user id with a default value of
-     * 65534.
-     * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_uid = 4; - * @return The anonUid. - */ - @java.lang.Override - public long getAnonUid() { - return anonUid_; - } - /** - *
-     * An integer representing the anonymous user id with a default value of
-     * 65534.
-     * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_uid = 4; - * @param value The anonUid to set. - * @return This builder for chaining. - */ - public Builder setAnonUid(long value) { - - anonUid_ = value; - onChanged(); - return this; - } - /** - *
-     * An integer representing the anonymous user id with a default value of
-     * 65534.
-     * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_uid = 4; - * @return This builder for chaining. - */ - public Builder clearAnonUid() { - - anonUid_ = 0L; - onChanged(); - return this; - } - - private long anonGid_ ; - /** - *
-     * An integer representing the anonymous group id with a default value of
-     * 65534.
-     * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_gid = 5; - * @return The anonGid. - */ - @java.lang.Override - public long getAnonGid() { - return anonGid_; - } - /** - *
-     * An integer representing the anonymous group id with a default value of
-     * 65534.
-     * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_gid = 5; - * @param value The anonGid to set. - * @return This builder for chaining. - */ - public Builder setAnonGid(long value) { - - anonGid_ = value; - onChanged(); - return this; - } - /** - *
-     * An integer representing the anonymous group id with a default value of
-     * 65534.
-     * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-     * returned if this field is specified for other squash_mode settings.
-     * 
- * - * int64 anon_gid = 5; - * @return This builder for chaining. - */ - public Builder clearAnonGid() { - - anonGid_ = 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.filestore.v1beta1.NfsExportOptions) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.NfsExportOptions) - private static final com.google.cloud.filestore.v1beta1.NfsExportOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.NfsExportOptions(); - } - - public static com.google.cloud.filestore.v1beta1.NfsExportOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NfsExportOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NfsExportOptions(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.filestore.v1beta1.NfsExportOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NfsExportOptionsOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NfsExportOptionsOrBuilder.java deleted file mode 100644 index 785eea1ec756..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/NfsExportOptionsOrBuilder.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface NfsExportOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.NfsExportOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @return A list containing the ipRanges. - */ - java.util.List - getIpRangesList(); - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @return The count of ipRanges. - */ - int getIpRangesCount(); - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the element to return. - * @return The ipRanges at the given index. - */ - java.lang.String getIpRanges(int index); - /** - *
-   * List of either an IPv4 addresses in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
-   * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
-   * file share.
-   * Overlapping IP ranges are not allowed, both within and across
-   * NfsExportOptions. An error will be returned.
-   * The limit is 64 IP ranges/addresses for each FileShareConfig among all
-   * NfsExportOptions.
-   * 
- * - * repeated string ip_ranges = 1; - * @param index The index of the value to return. - * @return The bytes of the ipRanges at the given index. - */ - com.google.protobuf.ByteString - getIpRangesBytes(int index); - - /** - *
-   * Either READ_ONLY, for allowing only read requests on the exported
-   * directory, or READ_WRITE, for allowing both read and write requests.
-   * The default is READ_WRITE.
-   * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2; - * @return The enum numeric value on the wire for accessMode. - */ - int getAccessModeValue(); - /** - *
-   * Either READ_ONLY, for allowing only read requests on the exported
-   * directory, or READ_WRITE, for allowing both read and write requests.
-   * The default is READ_WRITE.
-   * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2; - * @return The accessMode. - */ - com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode getAccessMode(); - - /** - *
-   * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-   * or ROOT_SQUASH, for not allowing root access. The default is
-   * NO_ROOT_SQUASH.
-   * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The enum numeric value on the wire for squashMode. - */ - int getSquashModeValue(); - /** - *
-   * Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
-   * or ROOT_SQUASH, for not allowing root access. The default is
-   * NO_ROOT_SQUASH.
-   * 
- * - * .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3; - * @return The squashMode. - */ - com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode getSquashMode(); - - /** - *
-   * An integer representing the anonymous user id with a default value of
-   * 65534.
-   * Anon_uid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-   * returned if this field is specified for other squash_mode settings.
-   * 
- * - * int64 anon_uid = 4; - * @return The anonUid. - */ - long getAnonUid(); - - /** - *
-   * An integer representing the anonymous group id with a default value of
-   * 65534.
-   * Anon_gid may only be set with squash_mode of ROOT_SQUASH.  An error will be
-   * returned if this field is specified for other squash_mode settings.
-   * 
- * - * int64 anon_gid = 5; - * @return The anonGid. - */ - long getAnonGid(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/RestoreInstanceRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/RestoreInstanceRequest.java deleted file mode 100644 index 26672d5d956c..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/RestoreInstanceRequest.java +++ /dev/null @@ -1,1296 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * RestoreInstanceRequest restores an existing instances's file share from a
- * snapshot or backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.RestoreInstanceRequest} - */ -public final class RestoreInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.RestoreInstanceRequest) - RestoreInstanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RestoreInstanceRequest.newBuilder() to construct. - private RestoreInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RestoreInstanceRequest() { - name_ = ""; - fileShare_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RestoreInstanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RestoreInstanceRequest( - 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(); - - fileShare_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - sourceCase_ = 3; - source_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - sourceCase_ = 4; - source_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.class, com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SOURCE_SNAPSHOT(3), - SOURCE_BACKUP(4), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 3: return SOURCE_SNAPSHOT; - case 4: return SOURCE_BACKUP; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name of the instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * 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 resource name of the instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * 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; - } - } - - public static final int FILE_SHARE_FIELD_NUMBER = 2; - private volatile java.lang.Object fileShare_; - /** - *
-   * Required. Name of the file share in the Cloud Filestore instance that the snapshot
-   * is being restored to.
-   * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The fileShare. - */ - @java.lang.Override - public java.lang.String getFileShare() { - java.lang.Object ref = fileShare_; - 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(); - fileShare_ = s; - return s; - } - } - /** - *
-   * Required. Name of the file share in the Cloud Filestore instance that the snapshot
-   * is being restored to.
-   * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for fileShare. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFileShareBytes() { - java.lang.Object ref = fileShare_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fileShare_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_SNAPSHOT_FIELD_NUMBER = 3; - /** - *
-   * The resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-   * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceSnapshot field is set. - */ - public boolean hasSourceSnapshot() { - return sourceCase_ == 3; - } - /** - *
-   * The resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-   * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return The sourceSnapshot. - */ - public java.lang.String getSourceSnapshot() { - java.lang.Object ref = ""; - if (sourceCase_ == 3) { - ref = source_; - } - 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(); - if (sourceCase_ == 3) { - source_ = s; - } - return s; - } - } - /** - *
-   * The resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-   * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceSnapshot. - */ - public com.google.protobuf.ByteString - getSourceSnapshotBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 3) { - ref = source_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 3) { - source_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_BACKUP_FIELD_NUMBER = 4; - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - public boolean hasSourceBackup() { - return sourceCase_ == 4; - } - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - public java.lang.String getSourceBackup() { - java.lang.Object ref = ""; - if (sourceCase_ == 4) { - ref = source_; - } - 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(); - if (sourceCase_ == 4) { - source_ = s; - } - return s; - } - } - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - public com.google.protobuf.ByteString - getSourceBackupBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 4) { - ref = source_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 4) { - source_ = 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(fileShare_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fileShare_); - } - if (sourceCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); - } - if (sourceCase_ == 4) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, source_); - } - 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(fileShare_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fileShare_); - } - if (sourceCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); - } - if (sourceCase_ == 4) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, source_); - } - 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.filestore.v1beta1.RestoreInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.RestoreInstanceRequest other = (com.google.cloud.filestore.v1beta1.RestoreInstanceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getFileShare() - .equals(other.getFileShare())) return false; - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 3: - if (!getSourceSnapshot() - .equals(other.getSourceSnapshot())) return false; - break; - case 4: - if (!getSourceBackup() - .equals(other.getSourceBackup())) return false; - break; - case 0: - default: - } - 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) + FILE_SHARE_FIELD_NUMBER; - hash = (53 * hash) + getFileShare().hashCode(); - switch (sourceCase_) { - case 3: - hash = (37 * hash) + SOURCE_SNAPSHOT_FIELD_NUMBER; - hash = (53 * hash) + getSourceSnapshot().hashCode(); - break; - case 4: - hash = (37 * hash) + SOURCE_BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getSourceBackup().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.RestoreInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.RestoreInstanceRequest 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.filestore.v1beta1.RestoreInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.RestoreInstanceRequest 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.filestore.v1beta1.RestoreInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.RestoreInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.RestoreInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.RestoreInstanceRequest 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.filestore.v1beta1.RestoreInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.RestoreInstanceRequest 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.filestore.v1beta1.RestoreInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.RestoreInstanceRequest 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.filestore.v1beta1.RestoreInstanceRequest 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; - } - /** - *
-   * RestoreInstanceRequest restores an existing instances's file share from a
-   * snapshot or backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.RestoreInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.RestoreInstanceRequest) - com.google.cloud.filestore.v1beta1.RestoreInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.class, com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.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_ = ""; - - fileShare_ = ""; - - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_RestoreInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.RestoreInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.RestoreInstanceRequest build() { - com.google.cloud.filestore.v1beta1.RestoreInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.RestoreInstanceRequest buildPartial() { - com.google.cloud.filestore.v1beta1.RestoreInstanceRequest result = new com.google.cloud.filestore.v1beta1.RestoreInstanceRequest(this); - result.name_ = name_; - result.fileShare_ = fileShare_; - if (sourceCase_ == 3) { - result.source_ = source_; - } - if (sourceCase_ == 4) { - result.source_ = source_; - } - result.sourceCase_ = sourceCase_; - 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.filestore.v1beta1.RestoreInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.RestoreInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.RestoreInstanceRequest other) { - if (other == com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getFileShare().isEmpty()) { - fileShare_ = other.fileShare_; - onChanged(); - } - switch (other.getSourceCase()) { - case SOURCE_SNAPSHOT: { - sourceCase_ = 3; - source_ = other.source_; - onChanged(); - break; - } - case SOURCE_BACKUP: { - sourceCase_ = 4; - source_ = other.source_; - onChanged(); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - 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.filestore.v1beta1.RestoreInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.RestoreInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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 resource name of the instance, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-     * 
- * - * 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; - } - - private java.lang.Object fileShare_ = ""; - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the snapshot
-     * is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The fileShare. - */ - public java.lang.String getFileShare() { - java.lang.Object ref = fileShare_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fileShare_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the snapshot
-     * is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for fileShare. - */ - public com.google.protobuf.ByteString - getFileShareBytes() { - java.lang.Object ref = fileShare_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fileShare_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the snapshot
-     * is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The fileShare to set. - * @return This builder for chaining. - */ - public Builder setFileShare( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fileShare_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the snapshot
-     * is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearFileShare() { - - fileShare_ = getDefaultInstance().getFileShare(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the file share in the Cloud Filestore instance that the snapshot
-     * is being restored to.
-     * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for fileShare to set. - * @return This builder for chaining. - */ - public Builder setFileShareBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fileShare_ = value; - onChanged(); - return this; - } - - /** - *
-     * The resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-     * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceSnapshot field is set. - */ - @java.lang.Override - public boolean hasSourceSnapshot() { - return sourceCase_ == 3; - } - /** - *
-     * The resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-     * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return The sourceSnapshot. - */ - @java.lang.Override - public java.lang.String getSourceSnapshot() { - java.lang.Object ref = ""; - if (sourceCase_ == 3) { - ref = source_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (sourceCase_ == 3) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-     * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceSnapshot. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceSnapshotBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 3) { - ref = source_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 3) { - source_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-     * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @param value The sourceSnapshot to set. - * @return This builder for chaining. - */ - public Builder setSourceSnapshot( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceCase_ = 3; - source_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-     * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearSourceSnapshot() { - if (sourceCase_ == 3) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-     * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @param value The bytes for sourceSnapshot to set. - * @return This builder for chaining. - */ - public Builder setSourceSnapshotBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceCase_ = 3; - source_ = value; - onChanged(); - return this; - } - - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - @java.lang.Override - public boolean hasSourceBackup() { - return sourceCase_ == 4; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - @java.lang.Override - public java.lang.String getSourceBackup() { - java.lang.Object ref = ""; - if (sourceCase_ == 4) { - ref = source_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (sourceCase_ == 4) { - source_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceBackupBytes() { - java.lang.Object ref = ""; - if (sourceCase_ == 4) { - ref = source_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (sourceCase_ == 4) { - source_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @param value The sourceBackup to set. - * @return This builder for chaining. - */ - public Builder setSourceBackup( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceCase_ = 4; - source_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearSourceBackup() { - if (sourceCase_ == 4) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The resource name of the backup, in the format
-     * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-     * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @param value The bytes for sourceBackup to set. - * @return This builder for chaining. - */ - public Builder setSourceBackupBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceCase_ = 4; - source_ = 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.filestore.v1beta1.RestoreInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.RestoreInstanceRequest) - private static final com.google.cloud.filestore.v1beta1.RestoreInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.RestoreInstanceRequest(); - } - - public static com.google.cloud.filestore.v1beta1.RestoreInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RestoreInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RestoreInstanceRequest(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.filestore.v1beta1.RestoreInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/RestoreInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/RestoreInstanceRequestOrBuilder.java deleted file mode 100644 index 9418aa0236e6..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/RestoreInstanceRequestOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface RestoreInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.RestoreInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name of the instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name of the instance, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. Name of the file share in the Cloud Filestore instance that the snapshot
-   * is being restored to.
-   * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The fileShare. - */ - java.lang.String getFileShare(); - /** - *
-   * Required. Name of the file share in the Cloud Filestore instance that the snapshot
-   * is being restored to.
-   * 
- * - * string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for fileShare. - */ - com.google.protobuf.ByteString - getFileShareBytes(); - - /** - *
-   * The resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-   * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceSnapshot field is set. - */ - boolean hasSourceSnapshot(); - /** - *
-   * The resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-   * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return The sourceSnapshot. - */ - java.lang.String getSourceSnapshot(); - /** - *
-   * The resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
-   * 
- * - * string source_snapshot = 3 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceSnapshot. - */ - com.google.protobuf.ByteString - getSourceSnapshotBytes(); - - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return Whether the sourceBackup field is set. - */ - boolean hasSourceBackup(); - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return The sourceBackup. - */ - java.lang.String getSourceBackup(); - /** - *
-   * The resource name of the backup, in the format
-   * `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
-   * 
- * - * string source_backup = 4 [(.google.api.resource_reference) = { ... } - * @return The bytes for sourceBackup. - */ - com.google.protobuf.ByteString - getSourceBackupBytes(); - - public com.google.cloud.filestore.v1beta1.RestoreInstanceRequest.SourceCase getSourceCase(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/Snapshot.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/Snapshot.java deleted file mode 100644 index 3757bbc16f47..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/Snapshot.java +++ /dev/null @@ -1,1711 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * A Cloud Filestore snapshot.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.Snapshot} - */ -public final class Snapshot extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.Snapshot) - SnapshotOrBuilder { -private static final long serialVersionUID = 0L; - // Use Snapshot.newBuilder() to construct. - private Snapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Snapshot() { - name_ = ""; - description_ = ""; - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Snapshot(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Snapshot( - 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 24: { - int rawValue = input.readEnum(); - - state_ = rawValue; - 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: { - 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 96: { - - filesystemUsedBytes_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Snapshot_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Snapshot_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.Snapshot.class, com.google.cloud.filestore.v1beta1.Snapshot.Builder.class); - } - - /** - *
-   * The snapshot state.
-   * 
- * - * Protobuf enum {@code google.cloud.filestore.v1beta1.Snapshot.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Snapshot is being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - *
-     * Snapshot is available for use.
-     * 
- * - * READY = 3; - */ - READY(3), - /** - *
-     * Snapshot is being deleted.
-     * 
- * - * DELETING = 4; - */ - DELETING(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * State not set.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Snapshot is being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - *
-     * Snapshot is available for use.
-     * 
- * - * READY = 3; - */ - public static final int READY_VALUE = 3; - /** - *
-     * Snapshot is being deleted.
-     * 
- * - * DELETING = 4; - */ - public static final int DELETING_VALUE = 4; - - - 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 CREATING; - case 3: return READY; - case 4: return DELETING; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> 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.filestore.v1beta1.Snapshot.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.filestore.v1beta1.Snapshot.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Output only. The resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.
-   * 
- * - * 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 resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.
-   * 
- * - * 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_; - /** - *
-   * A description of the snapshot with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * 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; - } - } - /** - *
-   * A description of the snapshot with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * 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 STATE_FIELD_NUMBER = 3; - private int state_; - /** - *
-   * Output only. The snapshot state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Output only. The snapshot state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override public com.google.cloud.filestore.v1beta1.Snapshot.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Snapshot.State result = com.google.cloud.filestore.v1beta1.Snapshot.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1beta1.Snapshot.State.UNRECOGNIZED : result; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time when the snapshot was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time when the snapshot was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time when the snapshot was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int LABELS_FIELD_NUMBER = 5; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Snapshot_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - - @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(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - @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; - } - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - @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 FILESYSTEM_USED_BYTES_FIELD_NUMBER = 12; - private long filesystemUsedBytes_; - /** - *
-   * Output only. The amount of bytes needed to allocate a full copy of the snapshot content
-   * 
- * - * int64 filesystem_used_bytes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The filesystemUsedBytes. - */ - @java.lang.Override - public long getFilesystemUsedBytes() { - return filesystemUsedBytes_; - } - - 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 (state_ != com.google.cloud.filestore.v1beta1.Snapshot.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (createTime_ != null) { - output.writeMessage(4, getCreateTime()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 5); - if (filesystemUsedBytes_ != 0L) { - output.writeInt64(12, filesystemUsedBytes_); - } - 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 (state_ != com.google.cloud.filestore.v1beta1.Snapshot.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, state_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCreateTime()); - } - 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(5, labels__); - } - if (filesystemUsedBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(12, filesystemUsedBytes_); - } - 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.filestore.v1beta1.Snapshot)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.Snapshot other = (com.google.cloud.filestore.v1beta1.Snapshot) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (state_ != other.state_) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (getFilesystemUsedBytes() - != other.getFilesystemUsedBytes()) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + FILESYSTEM_USED_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFilesystemUsedBytes()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.Snapshot parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.Snapshot 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.filestore.v1beta1.Snapshot parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.Snapshot 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.filestore.v1beta1.Snapshot parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.Snapshot parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.Snapshot parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.Snapshot 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.filestore.v1beta1.Snapshot parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.Snapshot 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.filestore.v1beta1.Snapshot parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.Snapshot 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.filestore.v1beta1.Snapshot 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 Cloud Filestore snapshot.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.Snapshot} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.Snapshot) - com.google.cloud.filestore.v1beta1.SnapshotOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Snapshot_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 5: - 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Snapshot_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.Snapshot.class, com.google.cloud.filestore.v1beta1.Snapshot.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.Snapshot.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_ = ""; - - state_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - filesystemUsedBytes_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_Snapshot_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Snapshot getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.Snapshot.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Snapshot build() { - com.google.cloud.filestore.v1beta1.Snapshot result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Snapshot buildPartial() { - com.google.cloud.filestore.v1beta1.Snapshot result = new com.google.cloud.filestore.v1beta1.Snapshot(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - result.state_ = state_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.filesystemUsedBytes_ = filesystemUsedBytes_; - 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.filestore.v1beta1.Snapshot) { - return mergeFrom((com.google.cloud.filestore.v1beta1.Snapshot)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.Snapshot other) { - if (other == com.google.cloud.filestore.v1beta1.Snapshot.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (other.getFilesystemUsedBytes() != 0L) { - setFilesystemUsedBytes(other.getFilesystemUsedBytes()); - } - 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.filestore.v1beta1.Snapshot parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.Snapshot) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.
-     * 
- * - * 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 resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.
-     * 
- * - * 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 resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.
-     * 
- * - * 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 resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.
-     * 
- * - * 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 resource name of the snapshot, in the format
-     * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.
-     * 
- * - * 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_ = ""; - /** - *
-     * A description of the snapshot with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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; - } - } - /** - *
-     * A description of the snapshot with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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; - } - } - /** - *
-     * A description of the snapshot with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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; - } - /** - *
-     * A description of the snapshot with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * A description of the snapshot with 2048 characters or less.
-     * Requests with longer descriptions will be rejected.
-     * 
- * - * 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 int state_ = 0; - /** - *
-     * Output only. The snapshot state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Output only. The snapshot state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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; - } - /** - *
-     * Output only. The snapshot state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Snapshot.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.filestore.v1beta1.Snapshot.State result = com.google.cloud.filestore.v1beta1.Snapshot.State.valueOf(state_); - return result == null ? com.google.cloud.filestore.v1beta1.Snapshot.State.UNRECOGNIZED : result; - } - /** - *
-     * Output only. The snapshot state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.filestore.v1beta1.Snapshot.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Output only. The snapshot state.
-     * 
- * - * .google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - 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_; - /** - *
-     * Output only. The time when the snapshot was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The time when the snapshot was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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(); - } - } - /** - *
-     * Output only. The time when the snapshot was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the snapshot was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time when the snapshot was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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; - } - /** - *
-     * Output only. The time when the snapshot was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time when the snapshot was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time when the snapshot was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time when the snapshot was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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 com.google.protobuf.MapField< - java.lang.String, java.lang.String> 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - - @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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - @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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - - 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(); - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - 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; - } - /** - *
-     * Resource labels to represent user provided metadata.
-     * 
- * - * map<string, string> labels = 5; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private long filesystemUsedBytes_ ; - /** - *
-     * Output only. The amount of bytes needed to allocate a full copy of the snapshot content
-     * 
- * - * int64 filesystem_used_bytes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The filesystemUsedBytes. - */ - @java.lang.Override - public long getFilesystemUsedBytes() { - return filesystemUsedBytes_; - } - /** - *
-     * Output only. The amount of bytes needed to allocate a full copy of the snapshot content
-     * 
- * - * int64 filesystem_used_bytes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The filesystemUsedBytes to set. - * @return This builder for chaining. - */ - public Builder setFilesystemUsedBytes(long value) { - - filesystemUsedBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The amount of bytes needed to allocate a full copy of the snapshot content
-     * 
- * - * int64 filesystem_used_bytes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearFilesystemUsedBytes() { - - filesystemUsedBytes_ = 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.filestore.v1beta1.Snapshot) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.Snapshot) - private static final com.google.cloud.filestore.v1beta1.Snapshot DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.Snapshot(); - } - - public static com.google.cloud.filestore.v1beta1.Snapshot getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Snapshot parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Snapshot(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.filestore.v1beta1.Snapshot getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/SnapshotName.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/SnapshotName.java deleted file mode 100644 index 4dd97da0f3c1..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/SnapshotName.java +++ /dev/null @@ -1,259 +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.filestore.v1beta1; - -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 SnapshotName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_INSTANCE_SNAPSHOT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/instances/{instance}/snapshots/{snapshot}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String instance; - private final String snapshot; - - @Deprecated - protected SnapshotName() { - project = null; - location = null; - instance = null; - snapshot = null; - } - - private SnapshotName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - instance = Preconditions.checkNotNull(builder.getInstance()); - snapshot = Preconditions.checkNotNull(builder.getSnapshot()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getInstance() { - return instance; - } - - public String getSnapshot() { - return snapshot; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static SnapshotName of(String project, String location, String instance, String snapshot) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setInstance(instance) - .setSnapshot(snapshot) - .build(); - } - - public static String format(String project, String location, String instance, String snapshot) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setInstance(instance) - .setSnapshot(snapshot) - .build() - .toString(); - } - - public static SnapshotName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_INSTANCE_SNAPSHOT.validatedMatch( - formattedString, "SnapshotName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("instance"), - 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 (SnapshotName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_INSTANCE_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 (instance != null) { - fieldMapBuilder.put("instance", instance); - } - 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_INSTANCE_SNAPSHOT.instantiate( - "project", project, "location", location, "instance", instance, "snapshot", snapshot); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - SnapshotName that = ((SnapshotName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.instance, that.instance) - && 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(instance); - h *= 1000003; - h ^= Objects.hashCode(snapshot); - return h; - } - - /** - * Builder for projects/{project}/locations/{location}/instances/{instance}/snapshots/{snapshot}. - */ - public static class Builder { - private String project; - private String location; - private String instance; - private String snapshot; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getInstance() { - return instance; - } - - 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 setInstance(String instance) { - this.instance = instance; - return this; - } - - public Builder setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - private Builder(SnapshotName snapshotName) { - this.project = snapshotName.project; - this.location = snapshotName.location; - this.instance = snapshotName.instance; - this.snapshot = snapshotName.snapshot; - } - - public SnapshotName build() { - return new SnapshotName(this); - } - } -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/SnapshotOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/SnapshotOrBuilder.java deleted file mode 100644 index 78e1e0397201..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/SnapshotOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface SnapshotOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.Snapshot) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The resource name of the snapshot, in the format
-   * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A description of the snapshot with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A description of the snapshot with 2048 characters or less.
-   * Requests with longer descriptions will be rejected.
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. The snapshot state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Output only. The snapshot state.
-   * 
- * - * .google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The state. - */ - com.google.cloud.filestore.v1beta1.Snapshot.State getState(); - - /** - *
-   * Output only. The time when the snapshot was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time when the snapshot was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time when the snapshot was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - int getLabelsCount(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Resource labels to represent user provided metadata.
-   * 
- * - * map<string, string> labels = 5; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Output only. The amount of bytes needed to allocate a full copy of the snapshot content
-   * 
- * - * int64 filesystem_used_bytes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The filesystemUsedBytes. - */ - long getFilesystemUsedBytes(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateBackupRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateBackupRequest.java deleted file mode 100644 index 7e2ae20e6e8a..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateBackupRequest.java +++ /dev/null @@ -1,913 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * UpdateBackupRequest updates description and/or labels for a backup.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.UpdateBackupRequest} - */ -public final class UpdateBackupRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.UpdateBackupRequest) - UpdateBackupRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateBackupRequest.newBuilder() to construct. - private UpdateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateBackupRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateBackupRequest( - 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.filestore.v1beta1.Backup.Builder subBuilder = null; - if (backup_ != null) { - subBuilder = backup_.toBuilder(); - } - backup_ = input.readMessage(com.google.cloud.filestore.v1beta1.Backup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backup_); - backup_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.UpdateBackupRequest.class, com.google.cloud.filestore.v1beta1.UpdateBackupRequest.Builder.class); - } - - public static final int BACKUP_FIELD_NUMBER = 1; - private com.google.cloud.filestore.v1beta1.Backup backup_; - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - @java.lang.Override - public boolean hasBackup() { - return backup_ != null; - } - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Backup getBackup() { - return backup_ == null ? com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance() : backup_; - } - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.BackupOrBuilder getBackupOrBuilder() { - return getBackup(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @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 (backup_ != null) { - output.writeMessage(1, getBackup()); - } - 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 (backup_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBackup()); - } - 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.filestore.v1beta1.UpdateBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.UpdateBackupRequest other = (com.google.cloud.filestore.v1beta1.UpdateBackupRequest) obj; - - if (hasBackup() != other.hasBackup()) return false; - if (hasBackup()) { - if (!getBackup() - .equals(other.getBackup())) 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 (hasBackup()) { - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().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.filestore.v1beta1.UpdateBackupRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.UpdateBackupRequest 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.filestore.v1beta1.UpdateBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.UpdateBackupRequest 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.filestore.v1beta1.UpdateBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.UpdateBackupRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.UpdateBackupRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.UpdateBackupRequest 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.filestore.v1beta1.UpdateBackupRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.UpdateBackupRequest 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.filestore.v1beta1.UpdateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.UpdateBackupRequest 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.filestore.v1beta1.UpdateBackupRequest 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; - } - /** - *
-   * UpdateBackupRequest updates description and/or labels for a backup.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.UpdateBackupRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.UpdateBackupRequest) - com.google.cloud.filestore.v1beta1.UpdateBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.UpdateBackupRequest.class, com.google.cloud.filestore.v1beta1.UpdateBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.UpdateBackupRequest.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 (backupBuilder_ == null) { - backup_ = null; - } else { - backup_ = null; - backupBuilder_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.UpdateBackupRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.UpdateBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.UpdateBackupRequest build() { - com.google.cloud.filestore.v1beta1.UpdateBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.UpdateBackupRequest buildPartial() { - com.google.cloud.filestore.v1beta1.UpdateBackupRequest result = new com.google.cloud.filestore.v1beta1.UpdateBackupRequest(this); - if (backupBuilder_ == null) { - result.backup_ = backup_; - } else { - result.backup_ = backupBuilder_.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.filestore.v1beta1.UpdateBackupRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.UpdateBackupRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.UpdateBackupRequest other) { - if (other == com.google.cloud.filestore.v1beta1.UpdateBackupRequest.getDefaultInstance()) return this; - if (other.hasBackup()) { - mergeBackup(other.getBackup()); - } - 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.filestore.v1beta1.UpdateBackupRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.UpdateBackupRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.filestore.v1beta1.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Backup, com.google.cloud.filestore.v1beta1.Backup.Builder, com.google.cloud.filestore.v1beta1.BackupOrBuilder> backupBuilder_; - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - public boolean hasBackup() { - return backupBuilder_ != null || backup_ != null; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - public com.google.cloud.filestore.v1beta1.Backup getBackup() { - if (backupBuilder_ == null) { - return backup_ == null ? com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance() : backup_; - } else { - return backupBuilder_.getMessage(); - } - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBackup(com.google.cloud.filestore.v1beta1.Backup value) { - if (backupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - onChanged(); - } else { - backupBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setBackup( - com.google.cloud.filestore.v1beta1.Backup.Builder builderForValue) { - if (backupBuilder_ == null) { - backup_ = builderForValue.build(); - onChanged(); - } else { - backupBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeBackup(com.google.cloud.filestore.v1beta1.Backup value) { - if (backupBuilder_ == null) { - if (backup_ != null) { - backup_ = - com.google.cloud.filestore.v1beta1.Backup.newBuilder(backup_).mergeFrom(value).buildPartial(); - } else { - backup_ = value; - } - onChanged(); - } else { - backupBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearBackup() { - if (backupBuilder_ == null) { - backup_ = null; - onChanged(); - } else { - backup_ = null; - backupBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1beta1.Backup.Builder getBackupBuilder() { - - onChanged(); - return getBackupFieldBuilder().getBuilder(); - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1beta1.BackupOrBuilder getBackupOrBuilder() { - if (backupBuilder_ != null) { - return backupBuilder_.getMessageOrBuilder(); - } else { - return backup_ == null ? - com.google.cloud.filestore.v1beta1.Backup.getDefaultInstance() : backup_; - } - } - /** - *
-     * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-     * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Backup, com.google.cloud.filestore.v1beta1.Backup.Builder, com.google.cloud.filestore.v1beta1.BackupOrBuilder> - getBackupFieldBuilder() { - if (backupBuilder_ == null) { - backupBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Backup, com.google.cloud.filestore.v1beta1.Backup.Builder, com.google.cloud.filestore.v1beta1.BackupOrBuilder>( - getBackup(), - getParentForChildren(), - isClean()); - backup_ = null; - } - return backupBuilder_; - } - - 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_; - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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(); - } - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - 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; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - 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; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - 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.filestore.v1beta1.UpdateBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.UpdateBackupRequest) - private static final com.google.cloud.filestore.v1beta1.UpdateBackupRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.UpdateBackupRequest(); - } - - public static com.google.cloud.filestore.v1beta1.UpdateBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateBackupRequest(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.filestore.v1beta1.UpdateBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateBackupRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateBackupRequestOrBuilder.java deleted file mode 100644 index e08fe71d8455..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateBackupRequestOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface UpdateBackupRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.UpdateBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the backup field is set. - */ - boolean hasBackup(); - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The backup. - */ - com.google.cloud.filestore.v1beta1.Backup getBackup(); - /** - *
-   * Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
-   * 
- * - * .google.cloud.filestore.v1beta1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.filestore.v1beta1.BackupOrBuilder getBackupOrBuilder(); - - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateInstanceRequest.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateInstanceRequest.java deleted file mode 100644 index 70f89866104b..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateInstanceRequest.java +++ /dev/null @@ -1,961 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -/** - *
- * UpdateInstanceRequest updates the settings of an instance.
- * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.UpdateInstanceRequest} - */ -public final class UpdateInstanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.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.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; - } - case 18: { - com.google.cloud.filestore.v1beta1.Instance.Builder subBuilder = null; - if (instance_ != null) { - subBuilder = instance_.toBuilder(); - } - instance_ = input.readMessage(com.google.cloud.filestore.v1beta1.Instance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instance_); - instance_ = 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.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.UpdateInstanceRequest.class, com.google.cloud.filestore.v1beta1.UpdateInstanceRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - public static final int INSTANCE_FIELD_NUMBER = 2; - private com.google.cloud.filestore.v1beta1.Instance instance_; - /** - *
-   * Required. Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - @java.lang.Override - public boolean hasInstance() { - return instance_ != null; - } - /** - *
-   * Required. Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.Instance getInstance() { - return instance_ == null ? com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance() : instance_; - } - /** - *
-   * Required. Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.filestore.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { - return getInstance(); - } - - 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 (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (instance_ != null) { - output.writeMessage(2, getInstance()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getUpdateMask()); - } - if (instance_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInstance()); - } - 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.filestore.v1beta1.UpdateInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.filestore.v1beta1.UpdateInstanceRequest other = (com.google.cloud.filestore.v1beta1.UpdateInstanceRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (hasInstance() != other.hasInstance()) return false; - if (hasInstance()) { - if (!getInstance() - .equals(other.getInstance())) 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 (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasInstance()) { - hash = (37 * hash) + INSTANCE_FIELD_NUMBER; - hash = (53 * hash) + getInstance().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.filestore.v1beta1.UpdateInstanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.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.filestore.v1beta1.UpdateInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.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.filestore.v1beta1.UpdateInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.filestore.v1beta1.UpdateInstanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.filestore.v1beta1.UpdateInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.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.filestore.v1beta1.UpdateInstanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.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.filestore.v1beta1.UpdateInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.filestore.v1beta1.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.filestore.v1beta1.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; - } - /** - *
-   * UpdateInstanceRequest updates the settings of an instance.
-   * 
- * - * Protobuf type {@code google.cloud.filestore.v1beta1.UpdateInstanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.UpdateInstanceRequest) - com.google.cloud.filestore.v1beta1.UpdateInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.filestore.v1beta1.UpdateInstanceRequest.class, com.google.cloud.filestore.v1beta1.UpdateInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.filestore.v1beta1.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 (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - if (instanceBuilder_ == null) { - instance_ = null; - } else { - instance_ = null; - instanceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto.internal_static_google_cloud_filestore_v1beta1_UpdateInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.UpdateInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.filestore.v1beta1.UpdateInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.UpdateInstanceRequest build() { - com.google.cloud.filestore.v1beta1.UpdateInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.filestore.v1beta1.UpdateInstanceRequest buildPartial() { - com.google.cloud.filestore.v1beta1.UpdateInstanceRequest result = new com.google.cloud.filestore.v1beta1.UpdateInstanceRequest(this); - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - if (instanceBuilder_ == null) { - result.instance_ = instance_; - } else { - result.instance_ = instanceBuilder_.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.filestore.v1beta1.UpdateInstanceRequest) { - return mergeFrom((com.google.cloud.filestore.v1beta1.UpdateInstanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.filestore.v1beta1.UpdateInstanceRequest other) { - if (other == com.google.cloud.filestore.v1beta1.UpdateInstanceRequest.getDefaultInstance()) return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasInstance()) { - mergeInstance(other.getInstance()); - } - 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.filestore.v1beta1.UpdateInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.filestore.v1beta1.UpdateInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - 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_; - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @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(); - } - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - 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; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - 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; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Required. Mask of fields to update.  At least one path must be supplied in this
-     * field.  The elements of the repeated paths field may only include these
-     * fields:
-     * * "description"
-     * * "file_shares"
-     * * "labels"
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - 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_; - } - - private com.google.cloud.filestore.v1beta1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Instance, com.google.cloud.filestore.v1beta1.Instance.Builder, com.google.cloud.filestore.v1beta1.InstanceOrBuilder> instanceBuilder_; - /** - *
-     * Required. Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - public boolean hasInstance() { - return instanceBuilder_ != null || instance_ != null; - } - /** - *
-     * Required. Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - public com.google.cloud.filestore.v1beta1.Instance getInstance() { - if (instanceBuilder_ == null) { - return instance_ == null ? com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance() : instance_; - } else { - return instanceBuilder_.getMessage(); - } - } - /** - *
-     * Required. Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInstance(com.google.cloud.filestore.v1beta1.Instance value) { - if (instanceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instance_ = value; - onChanged(); - } else { - instanceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInstance( - com.google.cloud.filestore.v1beta1.Instance.Builder builderForValue) { - if (instanceBuilder_ == null) { - instance_ = builderForValue.build(); - onChanged(); - } else { - instanceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeInstance(com.google.cloud.filestore.v1beta1.Instance value) { - if (instanceBuilder_ == null) { - if (instance_ != null) { - instance_ = - com.google.cloud.filestore.v1beta1.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); - } else { - instance_ = value; - } - onChanged(); - } else { - instanceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearInstance() { - if (instanceBuilder_ == null) { - instance_ = null; - onChanged(); - } else { - instance_ = null; - instanceBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1beta1.Instance.Builder getInstanceBuilder() { - - onChanged(); - return getInstanceFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.filestore.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { - if (instanceBuilder_ != null) { - return instanceBuilder_.getMessageOrBuilder(); - } else { - return instance_ == null ? - com.google.cloud.filestore.v1beta1.Instance.getDefaultInstance() : instance_; - } - } - /** - *
-     * Required. Only fields specified in update_mask are updated.
-     * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Instance, com.google.cloud.filestore.v1beta1.Instance.Builder, com.google.cloud.filestore.v1beta1.InstanceOrBuilder> - getInstanceFieldBuilder() { - if (instanceBuilder_ == null) { - instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.filestore.v1beta1.Instance, com.google.cloud.filestore.v1beta1.Instance.Builder, com.google.cloud.filestore.v1beta1.InstanceOrBuilder>( - getInstance(), - getParentForChildren(), - isClean()); - instance_ = null; - } - return instanceBuilder_; - } - @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.filestore.v1beta1.UpdateInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.UpdateInstanceRequest) - private static final com.google.cloud.filestore.v1beta1.UpdateInstanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.UpdateInstanceRequest(); - } - - public static com.google.cloud.filestore.v1beta1.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.filestore.v1beta1.UpdateInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateInstanceRequestOrBuilder.java b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateInstanceRequestOrBuilder.java deleted file mode 100644 index 64763ee21151..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/java/com/google/cloud/filestore/v1beta1/UpdateInstanceRequestOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto - -package com.google.cloud.filestore.v1beta1; - -public interface UpdateInstanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.filestore.v1beta1.UpdateInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Required. Mask of fields to update.  At least one path must be supplied in this
-   * field.  The elements of the repeated paths field may only include these
-   * fields:
-   * * "description"
-   * * "file_shares"
-   * * "labels"
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - *
-   * Required. Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the instance field is set. - */ - boolean hasInstance(); - /** - *
-   * Required. Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The instance. - */ - com.google.cloud.filestore.v1beta1.Instance getInstance(); - /** - *
-   * Required. Only fields specified in update_mask are updated.
-   * 
- * - * .google.cloud.filestore.v1beta1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.filestore.v1beta1.InstanceOrBuilder getInstanceOrBuilder(); -} diff --git a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/proto/google/cloud/filestore/v1beta1/cloud_filestore_service.proto b/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/proto/google/cloud/filestore/v1beta1/cloud_filestore_service.proto deleted file mode 100644 index eff84710592b..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/proto-google-cloud-filestore-v1beta1/src/main/proto/google/cloud/filestore/v1beta1/cloud_filestore_service.proto +++ /dev/null @@ -1,766 +0,0 @@ -// Copyright 2021 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.filestore.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option csharp_namespace = "Google.Cloud.Filestore.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/filestore/v1beta1;filestore"; -option java_multiple_files = true; -option java_outer_classname = "CloudFilestoreServiceProto"; -option java_package = "com.google.cloud.filestore.v1beta1"; -option php_namespace = "Google\\Cloud\\Filestore\\V1beta1"; - -// Configures and manages Cloud Filestore resources. -// -// Cloud Filestore Manager v1beta1. -// -// The `file.googleapis.com` service implements the Cloud Filestore API and -// defines the following model for managing resources: -// * The service works with a collection of cloud projects, named: `/projects/*` -// * Each project has a collection of available locations, named: `/locations/*` -// * Each location has a collection of instances and backups, named: -// `/instances/*` and `/backups/*` respectively. -// * As such, Cloud Filestore instances are resources of the form: -// `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` -// backups are resources of the form: -// `/projects/{project_id}/locations/{location_id}/backup/{backup_id}` -// -// Note that location_id can represent a GCP `zone` or `region` depending on the -// resource. -// for example: -// A zonal Filestore instance: -// * `projects/my-project/locations/us-central1-c/instances/my-basic-tier-filer` -// A regional Filestore instance: -// * `projects/my-project/locations/us-central1/instances/my-enterprise-filer` -service CloudFilestoreManager { - option (google.api.default_host) = "file.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all instances in a project for either a specified location - // or for all locations. - rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/instances" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a specific instance. - rpc GetInstance(GetInstanceRequest) returns (Instance) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/instances/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates an instance. - // When creating from a backup, the capacity of the new instance needs to be - // equal to or larger than the capacity of the backup (and also equal to or - // larger than the minimum capacity of the tier). - rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/instances" - body: "instance" - }; - option (google.api.method_signature) = "parent,instance,instance_id"; - option (google.longrunning.operation_info) = { - response_type: "Instance" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Updates the settings of a specific instance. - rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta1/{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: "google.cloud.common.OperationMetadata" - }; - } - - // Restores an existing instance's file share from a backup. - // - // The capacity of the instance needs to be equal to or larger than the - // capacity of the backup (and also equal to or larger than the minimum - // capacity of the tier). - rpc RestoreInstance(RestoreInstanceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/instances/*}:restore" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Instance" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Deletes an instance. - rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/instances/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Lists all backups in a project for either a specified location or for all - // locations. - rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/backups" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a specific backup. - rpc GetBackup(GetBackupRequest) returns (Backup) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a backup. - rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/backups" - body: "backup" - }; - option (google.api.method_signature) = "parent,backup,backup_id"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Deletes a backup. - rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } - - // Updates the settings of a specific backup. - rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta1/{backup.name=projects/*/locations/*/backups/*}" - body: "backup" - }; - option (google.api.method_signature) = "backup,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "google.cloud.common.OperationMetadata" - }; - } -} - -// Network configuration for the instance. -message NetworkConfig { - // Internet protocol versions supported by Cloud Filestore. - enum AddressMode { - // Internet protocol not set. - ADDRESS_MODE_UNSPECIFIED = 0; - - // Use the IPv4 internet protocol. - MODE_IPV4 = 1; - } - - // The name of the Google Compute Engine - // [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - // instance is connected. - string network = 1; - - // Internet protocol versions for which the instance has IP addresses - // assigned. For this version, only MODE_IPV4 is supported. - repeated AddressMode modes = 3; - - // A /29 CIDR block for Basic or a /23 CIDR block for High Scale in one of the - // [internal IP address - // ranges](https://www.arin.net/reference/research/statistics/address_filters/) - // that identifies the range of IP addresses reserved for this instance. For - // example, 10.0.0.0/29 or 192.168.0.0/23. The range you specify can't overlap - // with either existing subnets or assigned IP address ranges for other Cloud - // Filestore instances in the selected VPC network. - string reserved_ip_range = 4; - - // Output only. IPv4 addresses in the format - // `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format - // `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - repeated string ip_addresses = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// File share configuration for the instance. -message FileShareConfig { - // The name of the file share (must be 16 characters or less). - string name = 1; - - // File share capacity in gigabytes (GB). - // Cloud Filestore defines 1 GB as 1024^3 bytes. - int64 capacity_gb = 2; - - // The source that this file share has been restored from. Empty if the file - // share is created from scratch. - oneof source { - // The resource name of the backup, in the format - // `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that - // this file share has been restored from. - string source_backup = 9 [(google.api.resource_reference) = { - type: "file.googleapis.com/Backup" - }]; - } - - // Nfs Export Options. - // There is a limit of 10 export options per file share. - repeated NfsExportOptions nfs_export_options = 8; -} - -// NFS export options specifications. -message NfsExportOptions { - // The access mode. - enum AccessMode { - // AccessMode not set. - ACCESS_MODE_UNSPECIFIED = 0; - - // The client can only read the file share. - READ_ONLY = 1; - - // The client can read and write the file share (default). - READ_WRITE = 2; - } - - // The squash mode. - enum SquashMode { - // SquashMode not set. - SQUASH_MODE_UNSPECIFIED = 0; - - // The Root user has root access to the file share (default). - NO_ROOT_SQUASH = 1; - - // The Root user has squashed access to the anonymous uid/gid. - ROOT_SQUASH = 2; - } - - // List of either an IPv4 addresses in the format - // `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - // `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - // file share. - // Overlapping IP ranges are not allowed, both within and across - // NfsExportOptions. An error will be returned. - // The limit is 64 IP ranges/addresses for each FileShareConfig among all - // NfsExportOptions. - repeated string ip_ranges = 1; - - // Either READ_ONLY, for allowing only read requests on the exported - // directory, or READ_WRITE, for allowing both read and write requests. - // The default is READ_WRITE. - AccessMode access_mode = 2; - - // Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - // or ROOT_SQUASH, for not allowing root access. The default is - // NO_ROOT_SQUASH. - SquashMode squash_mode = 3; - - // An integer representing the anonymous user id with a default value of - // 65534. - // Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - // returned if this field is specified for other squash_mode settings. - int64 anon_uid = 4; - - // An integer representing the anonymous group id with a default value of - // 65534. - // Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - // returned if this field is specified for other squash_mode settings. - int64 anon_gid = 5; -} - -// A Cloud Filestore instance. -message Instance { - option (google.api.resource) = { - type: "file.googleapis.com/Instance" - pattern: "projects/{project}/locations/{location}/instances/{instance}" - }; - - // The instance state. - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // The instance is being created. - CREATING = 1; - - // The instance is available for use. - READY = 2; - - // Work is being done on the instance. You can get further details from the - // `statusMessage` field of the `Instance` resource. - REPAIRING = 3; - - // The instance is shutting down. - DELETING = 4; - - // The instance is experiencing an issue and might be unusable. You can get - // further details from the `statusMessage` field of the `Instance` - // resource. - ERROR = 6; - - // The instance is restoring a snapshot or backup to an existing file share - // and may be unusable during this time. - RESTORING = 7; - } - - // Available service tiers. - enum Tier { - // Not set. - TIER_UNSPECIFIED = 0; - - // STANDARD tier. BASIC_HDD is the preferred term for this tier. - STANDARD = 1; - - // PREMIUM tier. BASIC_SSD is the preferred term for this tier. - PREMIUM = 2; - - // BASIC instances offer a maximum capacity of 63.9 TB. - // BASIC_HDD is an alias for STANDARD Tier, offering economical - // performance backed by HDD. - BASIC_HDD = 3; - - // BASIC instances offer a maximum capacity of 63.9 TB. - // BASIC_SSD is an alias for PREMIUM Tier, and offers improved - // performance backed by SSD. - BASIC_SSD = 4; - - // HIGH_SCALE instances offer expanded capacity and performance scaling - // capabilities. - HIGH_SCALE_SSD = 6; - } - - // Output only. The resource name of the instance, in the format - // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The description of the instance (2048 characters or less). - string description = 2; - - // Output only. The instance state. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the instance state, if available. - string status_message = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was created. - google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The service tier of the instance. - Tier tier = 8; - - // Resource labels to represent user provided metadata. - map labels = 9; - - // File system shares on the instance. - // For this version, only a single file share is supported. - repeated FileShareConfig file_shares = 10; - - // VPC networks to which the instance is connected. - // For this version, only a single network is supported. - repeated NetworkConfig networks = 11; - - // Server-specified ETag for the instance resource to prevent simultaneous - // updates from overwriting each other. - string etag = 12; - - // Output only. Reserved for future use. - google.protobuf.BoolValue satisfies_pzs = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// CreateInstanceRequest creates an instance. -message CreateInstanceRequest { - // Required. The instance's project and location, in the format - // `projects/{project_id}/locations/{location}`. In Cloud Filestore, - // locations map to GCP zones, for example **us-west1-b**. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The ID of the instance to create. - // The ID must be unique within the specified project and location. - // - // This value must start with a lowercase letter followed by up to 62 - // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. An [instance resource][google.cloud.filestore.v1beta1.Instance] - Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// GetInstanceRequest gets the state of an instance. -message GetInstanceRequest { - // Required. The instance resource name, in the format - // `projects/{project_id}/locations/{location}/instances/{instance_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "file.googleapis.com/Instance" - } - ]; -} - -// UpdateInstanceRequest updates the settings of an instance. -message UpdateInstanceRequest { - // Required. Mask of fields to update. At least one path must be supplied in this - // field. The elements of the repeated paths field may only include these - // fields: - // - // * "description" - // * "file_shares" - // * "labels" - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in update_mask are updated. - Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// RestoreInstanceRequest restores an existing instances's file share from a -// snapshot or backup. -message RestoreInstanceRequest { - // Required. The resource name of the instance, in the format - // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "file.googleapis.com/Instance" - } - ]; - - // Required. Name of the file share in the Cloud Filestore instance that the snapshot - // is being restored to. - string file_share = 2 [(google.api.field_behavior) = REQUIRED]; - - oneof source { - // The resource name of the snapshot, in the format - // `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`. - string source_snapshot = 3 [(google.api.resource_reference) = { - type: "file.googleapis.com/Snapshot" - }]; - - // The resource name of the backup, in the format - // `projects/{project_id}/locations/{location_id}/backups/{backup_id}`. - string source_backup = 4 [(google.api.resource_reference) = { - type: "file.googleapis.com/Backup" - }]; - } -} - -// DeleteInstanceRequest deletes an instance. -message DeleteInstanceRequest { - // Required. The instance resource name, in the format - // `projects/{project_id}/locations/{location}/instances/{instance_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "file.googleapis.com/Instance" - } - ]; -} - -// ListInstancesRequest lists instances. -message ListInstancesRequest { - // Required. The project and location for which to retrieve instance information, - // in the format `projects/{project_id}/locations/{location}`. In Cloud - // Filestore, locations map to GCP zones, for example **us-west1-b**. To - // retrieve instance information for all locations, use "-" for the - // `{location}` value. - 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 to use if there are additional - // results to retrieve for this list request. - string page_token = 3; - - // Sort results. Supported values are "name", "name desc" or "" (unsorted). - string order_by = 4; - - // List filter. - string filter = 5; -} - -// ListInstancesResponse is the result of ListInstancesRequest. -message ListInstancesResponse { - // A list of instances in the project for the specified location. - // - // If the `{location}` value in the request is "-", the response contains a - // list of instances from all locations. If any location is unreachable, the - // response will only return instances in reachable locations and the - // "unreachable" field will be populated with a list of unreachable locations. - repeated Instance instances = 1; - - // The token you can use to retrieve the next page of results. Not returned - // if there are no more results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// A Cloud Filestore snapshot. -message Snapshot { - option (google.api.resource) = { - type: "file.googleapis.com/Snapshot" - pattern: "projects/{project}/locations/{location}/instances/{instance}/snapshots/{snapshot}" - }; - - // The snapshot state. - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // Snapshot is being created. - CREATING = 1; - - // Snapshot is available for use. - READY = 3; - - // Snapshot is being deleted. - DELETING = 4; - } - - // Output only. The resource name of the snapshot, in the format - // `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A description of the snapshot with 2048 characters or less. - // Requests with longer descriptions will be rejected. - string description = 2; - - // Output only. The snapshot state. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the snapshot was created. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user provided metadata. - map labels = 5; - - // Output only. The amount of bytes needed to allocate a full copy of the snapshot content - int64 filesystem_used_bytes = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A Cloud Filestore backup. -message Backup { - option (google.api.resource) = { - type: "file.googleapis.com/Backup" - pattern: "projects/{project}/locations/{location}/backups/{backup}" - }; - - // The backup state. - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // Backup is being created. - CREATING = 1; - - // Backup has been taken and the operation is being finalized. At this - // point, changes to the file share will not be reflected in the backup. - FINALIZING = 2; - - // Backup is available for use. - READY = 3; - - // Backup is being deleted. - DELETING = 4; - } - - // Output only. The resource name of the backup, in the format - // `projects/{project_id}/locations/{location_id}/backups/{backup_id}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A description of the backup with 2048 characters or less. - // Requests with longer descriptions will be rejected. - string description = 2; - - // Output only. The backup state. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the backup was created. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user provided metadata. - map labels = 5; - - // Output only. Capacity of the source file share when the backup was created. - int64 capacity_gb = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The size of the storage used by the backup. As backups share storage, - // this number is expected to change with backup creation/deletion. - int64 storage_bytes = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The resource name of the source Cloud Filestore instance, in the format - // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`, - // used to create this backup. - string source_instance = 8 [(google.api.resource_reference) = { - type: "file.googleapis.com/Instance" - }]; - - // Name of the file share in the source Cloud Filestore instance that the - // backup is created from. - string source_file_share = 9; - - // Output only. The service tier of the source Cloud Filestore instance that this backup - // is created from. - Instance.Tier source_instance_tier = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Amount of bytes that will be downloaded if the backup is restored - int64 download_bytes = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - google.protobuf.BoolValue satisfies_pzs = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// CreateBackupRequest creates a backup. -message CreateBackupRequest { - // Required. The backup's project and location, in the format - // `projects/{project_id}/locations/{location}`. In Cloud Filestore, - // backup locations map to GCP regions, for example **us-west1**. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. A [backup resource][google.cloud.filestore.v1beta1.Backup] - Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the backup. - // The ID must be unique within the specified project and location. - // - // This value must start with a lowercase letter followed by up to 62 - // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - string backup_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteBackupRequest deletes a backup. -message DeleteBackupRequest { - // Required. The backup resource name, in the format - // `projects/{project_id}/locations/{location}/backups/{backup_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "file.googleapis.com/Backup" - } - ]; -} - -// UpdateBackupRequest updates description and/or labels for a backup. -message UpdateBackupRequest { - // Required. A [backup resource][google.cloud.filestore.v1beta1.Backup] - Backup backup = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Mask of fields to update. At least one path must be supplied in this - // field. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// GetBackupRequest gets the state of a backup. -message GetBackupRequest { - // Required. The backup resource name, in the format - // `projects/{project_id}/locations/{location}/backups/{backup_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "file.googleapis.com/Backup" - } - ]; -} - -// ListBackupsRequest lists backups. -message ListBackupsRequest { - // Required. The project and location for which to retrieve backup information, - // in the format `projects/{project_id}/locations/{location}`. - // In Cloud Filestore, backup locations map to GCP regions, - // for example **us-west1**. - // To retrieve backup information for all locations, use "-" for the - // `{location}` value. - 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 to use if there are additional - // results to retrieve for this list request. - string page_token = 3; - - // Sort results. Supported values are "name", "name desc" or "" (unsorted). - string order_by = 4; - - // List filter. - string filter = 5; -} - -// ListBackupsResponse is the result of ListBackupsRequest. -message ListBackupsResponse { - // A list of backups in the project for the specified location. - // - // If the `{location}` value in the request is "-", the response contains a - // list of backups from all locations. If any location is unreachable, the - // response will only return backups in reachable locations and the - // "unreachable" field will be populated with a list of unreachable - // locations. - repeated Backup backups = 1; - - // The token you can use to retrieve the next page of results. Not returned - // if there are no more results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index b09f5c53bb6a..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,42 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerSettings; -import com.google.cloud.filestore.v1beta1.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. - CloudFilestoreManagerSettings cloudFilestoreManagerSettings = - CloudFilestoreManagerSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings); - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index da68b0b05552..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,41 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_create_setcredentialsprovider1_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerSettings; - -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. - CloudFilestoreManagerSettings cloudFilestoreManagerSettings = - CloudFilestoreManagerSettings.newBuilder() - .setTransportChannelProvider( - CloudFilestoreManagerSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings); - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 3a997277fe23..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,39 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_create_setendpoint_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerSettings; -import com.google.cloud.filestore.v1beta1.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. - CloudFilestoreManagerSettings cloudFilestoreManagerSettings = - CloudFilestoreManagerSettings.newBuilder().setEndpoint(myEndpoint).build(); - CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings); - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackup.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackup.java deleted file mode 100644 index 38717f70a1d7..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackup.java +++ /dev/null @@ -1,51 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.CreateBackupRequest; -import com.google.cloud.filestore.v1beta1.LocationName; -import com.google.longrunning.Operation; - -public class AsyncCreateBackup { - - public static void main(String[] args) throws Exception { - asyncCreateBackup(); - } - - public static void asyncCreateBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setBackup(Backup.newBuilder().build()) - .setBackupId("backupId2121930365") - .build(); - ApiFuture future = - cloudFilestoreManagerClient.createBackupCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackupLRO.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackupLRO.java deleted file mode 100644 index e2c04c78abf4..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/AsyncCreateBackupLRO.java +++ /dev/null @@ -1,51 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.CreateBackupRequest; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class AsyncCreateBackupLRO { - - public static void main(String[] args) throws Exception { - asyncCreateBackupLRO(); - } - - public static void asyncCreateBackupLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setBackup(Backup.newBuilder().build()) - .setBackupId("backupId2121930365") - .build(); - OperationFuture future = - cloudFilestoreManagerClient.createBackupOperationCallable().futureCall(request); - // Do something. - Backup response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_lro_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/SyncCreateBackup.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/SyncCreateBackup.java deleted file mode 100644 index 5e4ac9a79235..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/SyncCreateBackup.java +++ /dev/null @@ -1,46 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.CreateBackupRequest; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class SyncCreateBackup { - - public static void main(String[] args) throws Exception { - syncCreateBackup(); - } - - public static void syncCreateBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setBackup(Backup.newBuilder().build()) - .setBackupId("backupId2121930365") - .build(); - Backup response = cloudFilestoreManagerClient.createBackupAsync(request).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupLocationnameBackupString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupLocationnameBackupString.java deleted file mode 100644 index 9530347c057f..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupLocationnameBackupString.java +++ /dev/null @@ -1,43 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_locationnamebackupstring_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class SyncCreateBackupLocationnameBackupString { - - public static void main(String[] args) throws Exception { - syncCreateBackupLocationnameBackupString(); - } - - public static void syncCreateBackupLocationnameBackupString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - Backup response = - cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_locationnamebackupstring_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupStringBackupString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupStringBackupString.java deleted file mode 100644 index cdf86e030495..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createbackup/SyncCreateBackupStringBackupString.java +++ /dev/null @@ -1,43 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_stringbackupstring_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class SyncCreateBackupStringBackupString { - - public static void main(String[] args) throws Exception { - syncCreateBackupStringBackupString(); - } - - public static void syncCreateBackupStringBackupString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - Backup response = - cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createbackup_stringbackupstring_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstance.java deleted file mode 100644 index 4aece0eeb995..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstance.java +++ /dev/null @@ -1,51 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.CreateInstanceRequest; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.LocationName; -import com.google.longrunning.Operation; - -public class AsyncCreateInstance { - - public static void main(String[] args) throws Exception { - asyncCreateInstance(); - } - - public static void asyncCreateInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInstanceId("instanceId902024336") - .setInstance(Instance.newBuilder().build()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.createInstanceCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstanceLRO.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstanceLRO.java deleted file mode 100644 index 1071b4cc7f2c..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/AsyncCreateInstanceLRO.java +++ /dev/null @@ -1,51 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.CreateInstanceRequest; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class AsyncCreateInstanceLRO { - - public static void main(String[] args) throws Exception { - asyncCreateInstanceLRO(); - } - - public static void asyncCreateInstanceLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInstanceId("instanceId902024336") - .setInstance(Instance.newBuilder().build()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.createInstanceOperationCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_lro_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/SyncCreateInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/SyncCreateInstance.java deleted file mode 100644 index cf8712405d22..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/SyncCreateInstance.java +++ /dev/null @@ -1,46 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.CreateInstanceRequest; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class SyncCreateInstance { - - public static void main(String[] args) throws Exception { - syncCreateInstance(); - } - - public static void syncCreateInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - CreateInstanceRequest request = - CreateInstanceRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInstanceId("instanceId902024336") - .setInstance(Instance.newBuilder().build()) - .build(); - Instance response = cloudFilestoreManagerClient.createInstanceAsync(request).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java deleted file mode 100644 index 6a341fa78fc7..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceLocationnameInstanceString.java +++ /dev/null @@ -1,43 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_locationnameinstancestring_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class SyncCreateInstanceLocationnameInstanceString { - - public static void main(String[] args) throws Exception { - syncCreateInstanceLocationnameInstanceString(); - } - - public static void syncCreateInstanceLocationnameInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - Instance response = - cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_locationnameinstancestring_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceStringInstanceString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceStringInstanceString.java deleted file mode 100644 index 54807b78ee8a..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/createinstance/SyncCreateInstanceStringInstanceString.java +++ /dev/null @@ -1,43 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_stringinstancestring_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class SyncCreateInstanceStringInstanceString { - - public static void main(String[] args) throws Exception { - syncCreateInstanceStringInstanceString(); - } - - public static void syncCreateInstanceStringInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Instance instance = Instance.newBuilder().build(); - String instanceId = "instanceId902024336"; - Instance response = - cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_createinstance_stringinstancestring_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackup.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackup.java deleted file mode 100644 index ac9f5b9c6d0e..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackup.java +++ /dev/null @@ -1,48 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.BackupName; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.DeleteBackupRequest; -import com.google.longrunning.Operation; - -public class AsyncDeleteBackup { - - public static void main(String[] args) throws Exception { - asyncDeleteBackup(); - } - - public static void asyncDeleteBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.deleteBackupCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackupLRO.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackupLRO.java deleted file mode 100644 index ceca8a8df3cc..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/AsyncDeleteBackupLRO.java +++ /dev/null @@ -1,49 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.BackupName; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.DeleteBackupRequest; -import com.google.protobuf.Empty; - -public class AsyncDeleteBackupLRO { - - public static void main(String[] args) throws Exception { - asyncDeleteBackupLRO(); - } - - public static void asyncDeleteBackupLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.deleteBackupOperationCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_lro_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackup.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackup.java deleted file mode 100644 index b877c08f1871..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackup.java +++ /dev/null @@ -1,44 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_sync] -import com.google.cloud.filestore.v1beta1.BackupName; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.DeleteBackupRequest; -import com.google.protobuf.Empty; - -public class SyncDeleteBackup { - - public static void main(String[] args) throws Exception { - syncDeleteBackup(); - } - - public static void syncDeleteBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - cloudFilestoreManagerClient.deleteBackupAsync(request).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupBackupname.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupBackupname.java deleted file mode 100644 index 5c872f2a8b0c..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupBackupname.java +++ /dev/null @@ -1,40 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_backupname_sync] -import com.google.cloud.filestore.v1beta1.BackupName; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.protobuf.Empty; - -public class SyncDeleteBackupBackupname { - - public static void main(String[] args) throws Exception { - syncDeleteBackupBackupname(); - } - - public static void syncDeleteBackupBackupname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - cloudFilestoreManagerClient.deleteBackupAsync(name).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_backupname_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupString.java deleted file mode 100644 index 73745ccb70d7..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deletebackup/SyncDeleteBackupString.java +++ /dev/null @@ -1,40 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_string_sync] -import com.google.cloud.filestore.v1beta1.BackupName; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.protobuf.Empty; - -public class SyncDeleteBackupString { - - public static void main(String[] args) throws Exception { - syncDeleteBackupString(); - } - - public static void syncDeleteBackupString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString(); - cloudFilestoreManagerClient.deleteBackupAsync(name).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deletebackup_string_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstance.java deleted file mode 100644 index 7c74e56c47db..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstance.java +++ /dev/null @@ -1,48 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1beta1.InstanceName; -import com.google.longrunning.Operation; - -public class AsyncDeleteInstance { - - public static void main(String[] args) throws Exception { - asyncDeleteInstance(); - } - - public static void asyncDeleteInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.deleteInstanceCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstanceLRO.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstanceLRO.java deleted file mode 100644 index e20b4c6cef50..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/AsyncDeleteInstanceLRO.java +++ /dev/null @@ -1,49 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1beta1.InstanceName; -import com.google.protobuf.Empty; - -public class AsyncDeleteInstanceLRO { - - public static void main(String[] args) throws Exception { - asyncDeleteInstanceLRO(); - } - - public static void asyncDeleteInstanceLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.deleteInstanceOperationCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_lro_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstance.java deleted file mode 100644 index c956f4d56743..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstance.java +++ /dev/null @@ -1,44 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.DeleteInstanceRequest; -import com.google.cloud.filestore.v1beta1.InstanceName; -import com.google.protobuf.Empty; - -public class SyncDeleteInstance { - - public static void main(String[] args) throws Exception { - syncDeleteInstance(); - } - - public static void syncDeleteInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - DeleteInstanceRequest request = - DeleteInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - cloudFilestoreManagerClient.deleteInstanceAsync(request).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceInstancename.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceInstancename.java deleted file mode 100644 index 88acc0982192..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceInstancename.java +++ /dev/null @@ -1,40 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_instancename_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.InstanceName; -import com.google.protobuf.Empty; - -public class SyncDeleteInstanceInstancename { - - public static void main(String[] args) throws Exception { - syncDeleteInstanceInstancename(); - } - - public static void syncDeleteInstanceInstancename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - cloudFilestoreManagerClient.deleteInstanceAsync(name).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_instancename_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceString.java deleted file mode 100644 index 70775e0bb9ad..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/deleteinstance/SyncDeleteInstanceString.java +++ /dev/null @@ -1,40 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_string_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.InstanceName; -import com.google.protobuf.Empty; - -public class SyncDeleteInstanceString { - - public static void main(String[] args) throws Exception { - syncDeleteInstanceString(); - } - - public static void syncDeleteInstanceString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); - cloudFilestoreManagerClient.deleteInstanceAsync(name).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_deleteinstance_string_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/AsyncGetBackup.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/AsyncGetBackup.java deleted file mode 100644 index b29ff1d7f649..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/AsyncGetBackup.java +++ /dev/null @@ -1,48 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_getbackup_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.BackupName; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.GetBackupRequest; - -public class AsyncGetBackup { - - public static void main(String[] args) throws Exception { - asyncGetBackup(); - } - - public static void asyncGetBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - GetBackupRequest request = - GetBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.getBackupCallable().futureCall(request); - // Do something. - Backup response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_getbackup_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/SyncGetBackup.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/SyncGetBackup.java deleted file mode 100644 index c0e30720fb17..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/SyncGetBackup.java +++ /dev/null @@ -1,44 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_getbackup_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.BackupName; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.GetBackupRequest; - -public class SyncGetBackup { - - public static void main(String[] args) throws Exception { - syncGetBackup(); - } - - public static void syncGetBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - GetBackupRequest request = - GetBackupRequest.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString()) - .build(); - Backup response = cloudFilestoreManagerClient.getBackup(request); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_getbackup_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/SyncGetBackupBackupname.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/SyncGetBackupBackupname.java deleted file mode 100644 index ace688982c69..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/SyncGetBackupBackupname.java +++ /dev/null @@ -1,40 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_getbackup_backupname_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.BackupName; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; - -public class SyncGetBackupBackupname { - - public static void main(String[] args) throws Exception { - syncGetBackupBackupname(); - } - - public static void syncGetBackupBackupname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]"); - Backup response = cloudFilestoreManagerClient.getBackup(name); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_getbackup_backupname_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/SyncGetBackupString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/SyncGetBackupString.java deleted file mode 100644 index 54f2148be843..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getbackup/SyncGetBackupString.java +++ /dev/null @@ -1,40 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_getbackup_string_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.BackupName; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; - -public class SyncGetBackupString { - - public static void main(String[] args) throws Exception { - syncGetBackupString(); - } - - public static void syncGetBackupString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString(); - Backup response = cloudFilestoreManagerClient.getBackup(name); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_getbackup_string_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/AsyncGetInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/AsyncGetInstance.java deleted file mode 100644 index a4e93e5fa7e0..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/AsyncGetInstance.java +++ /dev/null @@ -1,48 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_getinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.GetInstanceRequest; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - GetInstanceRequest request = - GetInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.getInstanceCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_getinstance_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/SyncGetInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/SyncGetInstance.java deleted file mode 100644 index a433ed0fe02b..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/SyncGetInstance.java +++ /dev/null @@ -1,44 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_getinstance_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.GetInstanceRequest; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - GetInstanceRequest request = - GetInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .build(); - Instance response = cloudFilestoreManagerClient.getInstance(request); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_getinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceInstancename.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceInstancename.java deleted file mode 100644 index 66bc2caed2fe..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceInstancename.java +++ /dev/null @@ -1,40 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_getinstance_instancename_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - Instance response = cloudFilestoreManagerClient.getInstance(name); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_getinstance_instancename_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceString.java deleted file mode 100644 index 5e5c7e597b7a..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/getinstance/SyncGetInstanceString.java +++ /dev/null @@ -1,40 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_getinstance_string_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); - Instance response = cloudFilestoreManagerClient.getInstance(name); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_getinstance_string_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/AsyncListBackups.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/AsyncListBackups.java deleted file mode 100644 index 18316ed04087..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/AsyncListBackups.java +++ /dev/null @@ -1,54 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.ListBackupsRequest; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class AsyncListBackups { - - public static void main(String[] args) throws Exception { - asyncListBackups(); - } - - public static void asyncListBackups() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListBackupsRequest request = - ListBackupsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - ApiFuture future = - cloudFilestoreManagerClient.listBackupsPagedCallable().futureCall(request); - // Do something. - for (Backup element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/AsyncListBackupsPaged.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/AsyncListBackupsPaged.java deleted file mode 100644 index 89be677d26e9..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/AsyncListBackupsPaged.java +++ /dev/null @@ -1,62 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_paged_async] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.ListBackupsRequest; -import com.google.cloud.filestore.v1beta1.ListBackupsResponse; -import com.google.cloud.filestore.v1beta1.LocationName; -import com.google.common.base.Strings; - -public class AsyncListBackupsPaged { - - public static void main(String[] args) throws Exception { - asyncListBackupsPaged(); - } - - public static void asyncListBackupsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListBackupsRequest request = - ListBackupsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - while (true) { - ListBackupsResponse response = - cloudFilestoreManagerClient.listBackupsCallable().call(request); - for (Backup element : response.getBackupsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_paged_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/SyncListBackups.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/SyncListBackups.java deleted file mode 100644 index 5e8e3a97ae9d..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/SyncListBackups.java +++ /dev/null @@ -1,50 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.ListBackupsRequest; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class SyncListBackups { - - public static void main(String[] args) throws Exception { - syncListBackups(); - } - - public static void syncListBackups() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListBackupsRequest request = - ListBackupsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - for (Backup element : cloudFilestoreManagerClient.listBackups(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/SyncListBackupsLocationname.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/SyncListBackupsLocationname.java deleted file mode 100644 index 2a5f6d53b764..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/SyncListBackupsLocationname.java +++ /dev/null @@ -1,42 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_locationname_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class SyncListBackupsLocationname { - - public static void main(String[] args) throws Exception { - syncListBackupsLocationname(); - } - - public static void syncListBackupsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_locationname_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/SyncListBackupsString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/SyncListBackupsString.java deleted file mode 100644 index 7b02b45b3978..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listbackups/SyncListBackupsString.java +++ /dev/null @@ -1,42 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_string_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.LocationName; - -public class SyncListBackupsString { - - public static void main(String[] args) throws Exception { - syncListBackupsString(); - } - - public static void syncListBackupsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_listbackups_string_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/AsyncListInstances.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/AsyncListInstances.java deleted file mode 100644 index a785979a6596..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/AsyncListInstances.java +++ /dev/null @@ -1,54 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.ListInstancesRequest; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListInstancesRequest request = - ListInstancesRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - ApiFuture future = - cloudFilestoreManagerClient.listInstancesPagedCallable().futureCall(request); - // Do something. - for (Instance element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/AsyncListInstancesPaged.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/AsyncListInstancesPaged.java deleted file mode 100644 index ea6275b185b5..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/AsyncListInstancesPaged.java +++ /dev/null @@ -1,62 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_paged_async] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.ListInstancesRequest; -import com.google.cloud.filestore.v1beta1.ListInstancesResponse; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListInstancesRequest request = - ListInstancesRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - while (true) { - ListInstancesResponse response = - cloudFilestoreManagerClient.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 filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_paged_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/SyncListInstances.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/SyncListInstances.java deleted file mode 100644 index d889bba0687f..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/SyncListInstances.java +++ /dev/null @@ -1,50 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.ListInstancesRequest; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - ListInstancesRequest request = - ListInstancesRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setFilter("filter-1274492040") - .build(); - for (Instance element : cloudFilestoreManagerClient.listInstances(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/SyncListInstancesLocationname.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/SyncListInstancesLocationname.java deleted file mode 100644 index b29cbeb9b4d0..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/SyncListInstancesLocationname.java +++ /dev/null @@ -1,42 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_locationname_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_locationname_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/SyncListInstancesString.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/SyncListInstancesString.java deleted file mode 100644 index b4723dcaf318..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/listinstances/SyncListInstancesString.java +++ /dev/null @@ -1,42 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_string_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_listinstances_string_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstance.java deleted file mode 100644 index fbc467cbae0c..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstance.java +++ /dev/null @@ -1,49 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_restoreinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.InstanceName; -import com.google.cloud.filestore.v1beta1.RestoreInstanceRequest; -import com.google.longrunning.Operation; - -public class AsyncRestoreInstance { - - public static void main(String[] args) throws Exception { - asyncRestoreInstance(); - } - - public static void asyncRestoreInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - ApiFuture future = - cloudFilestoreManagerClient.restoreInstanceCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_restoreinstance_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstanceLRO.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstanceLRO.java deleted file mode 100644 index bb43a5796cf7..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/restoreinstance/AsyncRestoreInstanceLRO.java +++ /dev/null @@ -1,50 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_restoreinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.InstanceName; -import com.google.cloud.filestore.v1beta1.RestoreInstanceRequest; - -public class AsyncRestoreInstanceLRO { - - public static void main(String[] args) throws Exception { - asyncRestoreInstanceLRO(); - } - - public static void asyncRestoreInstanceLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - OperationFuture future = - cloudFilestoreManagerClient.restoreInstanceOperationCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_restoreinstance_lro_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/restoreinstance/SyncRestoreInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/restoreinstance/SyncRestoreInstance.java deleted file mode 100644 index d3e3588e53f8..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/restoreinstance/SyncRestoreInstance.java +++ /dev/null @@ -1,45 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_restoreinstance_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.InstanceName; -import com.google.cloud.filestore.v1beta1.RestoreInstanceRequest; - -public class SyncRestoreInstance { - - public static void main(String[] args) throws Exception { - syncRestoreInstance(); - } - - public static void syncRestoreInstance() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - RestoreInstanceRequest request = - RestoreInstanceRequest.newBuilder() - .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) - .setFileShare("fileShare-1327728701") - .build(); - Instance response = cloudFilestoreManagerClient.restoreInstanceAsync(request).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_restoreinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackup.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackup.java deleted file mode 100644 index d0930f68b179..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackup.java +++ /dev/null @@ -1,50 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_updatebackup_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.UpdateBackupRequest; -import com.google.longrunning.Operation; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateBackup { - - public static void main(String[] args) throws Exception { - asyncUpdateBackup(); - } - - public static void asyncUpdateBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateBackupRequest request = - UpdateBackupRequest.newBuilder() - .setBackup(Backup.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.updateBackupCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_updatebackup_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackupLRO.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackupLRO.java deleted file mode 100644 index 3b93f38473ee..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/AsyncUpdateBackupLRO.java +++ /dev/null @@ -1,50 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_updatebackup_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.UpdateBackupRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateBackupLRO { - - public static void main(String[] args) throws Exception { - asyncUpdateBackupLRO(); - } - - public static void asyncUpdateBackupLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateBackupRequest request = - UpdateBackupRequest.newBuilder() - .setBackup(Backup.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.updateBackupOperationCallable().futureCall(request); - // Do something. - Backup response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_updatebackup_lro_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackup.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackup.java deleted file mode 100644 index 222234e3ba52..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackup.java +++ /dev/null @@ -1,45 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_updatebackup_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.UpdateBackupRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateBackup { - - public static void main(String[] args) throws Exception { - syncUpdateBackup(); - } - - public static void syncUpdateBackup() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateBackupRequest request = - UpdateBackupRequest.newBuilder() - .setBackup(Backup.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Backup response = cloudFilestoreManagerClient.updateBackupAsync(request).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_updatebackup_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackupBackupFieldmask.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackupBackupFieldmask.java deleted file mode 100644 index 8efe77f0fd83..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updatebackup/SyncUpdateBackupBackupFieldmask.java +++ /dev/null @@ -1,41 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_updatebackup_backupfieldmask_sync] -import com.google.cloud.filestore.v1beta1.Backup; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateBackupBackupFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateBackupBackupFieldmask(); - } - - public static void syncUpdateBackupBackupFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. - try (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - Backup backup = Backup.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Backup response = cloudFilestoreManagerClient.updateBackupAsync(backup, updateMask).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_updatebackup_backupfieldmask_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstance.java deleted file mode 100644 index 18fe46689fe0..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstance.java +++ /dev/null @@ -1,50 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_updateinstance_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateInstanceRequest request = - UpdateInstanceRequest.newBuilder() - .setUpdateMask(FieldMask.newBuilder().build()) - .setInstance(Instance.newBuilder().build()) - .build(); - ApiFuture future = - cloudFilestoreManagerClient.updateInstanceCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_updateinstance_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstanceLRO.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstanceLRO.java deleted file mode 100644 index 38cb997e8253..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/AsyncUpdateInstanceLRO.java +++ /dev/null @@ -1,50 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_updateinstance_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.common.OperationMetadata; -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateInstanceRequest request = - UpdateInstanceRequest.newBuilder() - .setUpdateMask(FieldMask.newBuilder().build()) - .setInstance(Instance.newBuilder().build()) - .build(); - OperationFuture future = - cloudFilestoreManagerClient.updateInstanceOperationCallable().futureCall(request); - // Do something. - Instance response = future.get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_updateinstance_lro_async] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstance.java deleted file mode 100644 index 0c826902e31c..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstance.java +++ /dev/null @@ -1,45 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_updateinstance_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.Instance; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - UpdateInstanceRequest request = - UpdateInstanceRequest.newBuilder() - .setUpdateMask(FieldMask.newBuilder().build()) - .setInstance(Instance.newBuilder().build()) - .build(); - Instance response = cloudFilestoreManagerClient.updateInstanceAsync(request).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_updateinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstanceInstanceFieldmask.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstanceInstanceFieldmask.java deleted file mode 100644 index e8324ffa61a7..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagerclient/updateinstance/SyncUpdateInstanceInstanceFieldmask.java +++ /dev/null @@ -1,42 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerclient_updateinstance_instancefieldmask_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient; -import com.google.cloud.filestore.v1beta1.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 (CloudFilestoreManagerClient cloudFilestoreManagerClient = - CloudFilestoreManagerClient.create()) { - Instance instance = Instance.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Instance response = - cloudFilestoreManagerClient.updateInstanceAsync(instance, updateMask).get(); - } - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerclient_updateinstance_instancefieldmask_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagersettings/getinstance/SyncGetInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagersettings/getinstance/SyncGetInstance.java deleted file mode 100644 index e856cb1747b3..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/cloudfilestoremanagersettings/getinstance/SyncGetInstance.java +++ /dev/null @@ -1,47 +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.filestore.v1beta1.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagersettings_getinstance_sync] -import com.google.cloud.filestore.v1beta1.CloudFilestoreManagerSettings; -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. - CloudFilestoreManagerSettings.Builder cloudFilestoreManagerSettingsBuilder = - CloudFilestoreManagerSettings.newBuilder(); - cloudFilestoreManagerSettingsBuilder - .getInstanceSettings() - .setRetrySettings( - cloudFilestoreManagerSettingsBuilder - .getInstanceSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - CloudFilestoreManagerSettings cloudFilestoreManagerSettings = - cloudFilestoreManagerSettingsBuilder.build(); - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagersettings_getinstance_sync] diff --git a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/stub/cloudfilestoremanagerstubsettings/getinstance/SyncGetInstance.java b/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/stub/cloudfilestoremanagerstubsettings/getinstance/SyncGetInstance.java deleted file mode 100644 index 2f07b2210b23..000000000000 --- a/owl-bot-staging/java-filestore/v1beta1/samples/snippets/generated/com/google/cloud/filestore/v1beta1/stub/cloudfilestoremanagerstubsettings/getinstance/SyncGetInstance.java +++ /dev/null @@ -1,47 +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.filestore.v1beta1.stub.samples; - -// [START filestore_v1beta1_generated_cloudfilestoremanagerstubsettings_getinstance_sync] -import com.google.cloud.filestore.v1beta1.stub.CloudFilestoreManagerStubSettings; -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. - CloudFilestoreManagerStubSettings.Builder cloudFilestoreManagerSettingsBuilder = - CloudFilestoreManagerStubSettings.newBuilder(); - cloudFilestoreManagerSettingsBuilder - .getInstanceSettings() - .setRetrySettings( - cloudFilestoreManagerSettingsBuilder - .getInstanceSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - CloudFilestoreManagerStubSettings cloudFilestoreManagerSettings = - cloudFilestoreManagerSettingsBuilder.build(); - } -} -// [END filestore_v1beta1_generated_cloudfilestoremanagerstubsettings_getinstance_sync]