diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index edf75bab..419519fa 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -21,9 +21,9 @@ deep-remove-regex: - "/google-.*/src" deep-copy-regex: -- source: "//google/cloud/dms/(v.*)/.*-java/proto-google-.*/src" +- source: "/google/cloud/clouddms/(v.*)/.*-java/proto-google-.*/src" dest: "/owl-bot-staging/$1/proto-google-cloud-dms-$1/src" -- source: "//google/cloud/dms/(v.*)/.*-java/grpc-google-.*/src" +- source: "/google/cloud/clouddms/(v.*)/.*-java/grpc-google-.*/src" dest: "/owl-bot-staging/$1/grpc-google-cloud-dms-$1/src" -- source: "//google/cloud/dms/(v.*)/.*-java/gapic-google-.*/src" +- source: "/google/cloud/clouddms/(v.*)/.*-java/gapic-google-.*/src" dest: "/owl-bot-staging/$1/google-cloud-dms/src" \ No newline at end of file diff --git a/google-cloud-dms-bom/pom.xml b/google-cloud-dms-bom/pom.xml index 796d78c9..f91df537 100644 --- a/google-cloud-dms-bom/pom.xml +++ b/google-cloud-dms-bom/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud @@ -58,6 +58,16 @@ google-cloud-dms 0.0.1-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-dms-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-dms-v1 + 0.0.1-SNAPSHOT + diff --git a/google-cloud-dms/pom.xml b/google-cloud-dms/pom.xml index 92066807..8c5928d4 100644 --- a/google-cloud-dms/pom.xml +++ b/google-cloud-dms/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud @@ -17,6 +17,11 @@ google-cloud-dms + + com.google.api.grpc + grpc-google-cloud-dms-v1 + test + io.grpc grpc-api @@ -42,6 +47,10 @@ proto-google-common-protos + + com.google.api.grpc + proto-google-cloud-dms-v1 + com.google.guava guava @@ -99,4 +108,4 @@ - \ No newline at end of file + diff --git a/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/DataMigrationServiceClient.java b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/DataMigrationServiceClient.java new file mode 100644 index 00000000..98c477df --- /dev/null +++ b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/DataMigrationServiceClient.java @@ -0,0 +1,2230 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.v1; + +import com.google.api.core.ApiFunction; +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.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.clouddms.v1.stub.DataMigrationServiceStub; +import com.google.cloud.clouddms.v1.stub.DataMigrationServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Database Migration service + * + *

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
+ * try (DataMigrationServiceClient dataMigrationServiceClient =
+ *     DataMigrationServiceClient.create()) {
+ *   MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
+ *   MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the DataMigrationServiceClient 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 DataMigrationServiceSettings + * to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * DataMigrationServiceSettings dataMigrationServiceSettings =
+ *     DataMigrationServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataMigrationServiceClient dataMigrationServiceClient =
+ *     DataMigrationServiceClient.create(dataMigrationServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * DataMigrationServiceSettings dataMigrationServiceSettings =
+ *     DataMigrationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataMigrationServiceClient dataMigrationServiceClient =
+ *     DataMigrationServiceClient.create(dataMigrationServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DataMigrationServiceClient implements BackgroundResource { + private final DataMigrationServiceSettings settings; + private final DataMigrationServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DataMigrationServiceClient with default settings. */ + public static final DataMigrationServiceClient create() throws IOException { + return create(DataMigrationServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataMigrationServiceClient, 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 DataMigrationServiceClient create(DataMigrationServiceSettings settings) + throws IOException { + return new DataMigrationServiceClient(settings); + } + + /** + * Constructs an instance of DataMigrationServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(DataMigrationServiceSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DataMigrationServiceClient create(DataMigrationServiceStub stub) { + return new DataMigrationServiceClient(stub); + } + + /** + * Constructs an instance of DataMigrationServiceClient, 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 DataMigrationServiceClient(DataMigrationServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataMigrationServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected DataMigrationServiceClient(DataMigrationServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DataMigrationServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataMigrationServiceStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists migration jobs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (MigrationJob element :
+   *       dataMigrationServiceClient.listMigrationJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of migrationJobs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMigrationJobsPagedResponse listMigrationJobs(LocationName parent) { + ListMigrationJobsRequest request = + ListMigrationJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMigrationJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists migration jobs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   String parent = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString();
+   *   for (MigrationJob element :
+   *       dataMigrationServiceClient.listMigrationJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of migrationJobs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMigrationJobsPagedResponse listMigrationJobs(String parent) { + ListMigrationJobsRequest request = + ListMigrationJobsRequest.newBuilder().setParent(parent).build(); + return listMigrationJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists migration jobs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ListMigrationJobsRequest request =
+   *       ListMigrationJobsRequest.newBuilder()
+   *           .setParent(
+   *               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (MigrationJob element :
+   *       dataMigrationServiceClient.listMigrationJobs(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 ListMigrationJobsPagedResponse listMigrationJobs(ListMigrationJobsRequest request) { + return listMigrationJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists migration jobs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ListMigrationJobsRequest request =
+   *       ListMigrationJobsRequest.newBuilder()
+   *           .setParent(
+   *               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.listMigrationJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (MigrationJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMigrationJobsPagedCallable() { + return stub.listMigrationJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists migration jobs in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ListMigrationJobsRequest request =
+   *       ListMigrationJobsRequest.newBuilder()
+   *           .setParent(
+   *               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListMigrationJobsResponse response =
+   *         dataMigrationServiceClient.listMigrationJobsCallable().call(request);
+   *     for (MigrationJob element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMigrationJobsCallable() { + return stub.listMigrationJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
+   *   MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
+   * }
+   * }
+ * + * @param name Required. Name of the migration job resource to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MigrationJob getMigrationJob(MigrationJobName name) { + GetMigrationJobRequest request = + GetMigrationJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getMigrationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   String name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString();
+   *   MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
+   * }
+   * }
+ * + * @param name Required. Name of the migration job resource to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MigrationJob getMigrationJob(String name) { + GetMigrationJobRequest request = GetMigrationJobRequest.newBuilder().setName(name).build(); + return getMigrationJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   GetMigrationJobRequest request =
+   *       GetMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   MigrationJob response = dataMigrationServiceClient.getMigrationJob(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 MigrationJob getMigrationJob(GetMigrationJobRequest request) { + return getMigrationJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   GetMigrationJobRequest request =
+   *       GetMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.getMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   MigrationJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getMigrationJobCallable() { + return stub.getMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new migration job in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   MigrationJob migrationJob = MigrationJob.newBuilder().build();
+   *   String migrationJobId = "migrationJobId1870575242";
+   *   MigrationJob response =
+   *       dataMigrationServiceClient
+   *           .createMigrationJobAsync(parent, migrationJob, migrationJobId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of migration jobs. + * @param migrationJob Required. Represents a [migration + * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs) + * object. + * @param migrationJobId Required. The ID of the instance to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createMigrationJobAsync( + LocationName parent, MigrationJob migrationJob, String migrationJobId) { + CreateMigrationJobRequest request = + CreateMigrationJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMigrationJob(migrationJob) + .setMigrationJobId(migrationJobId) + .build(); + return createMigrationJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new migration job in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   String parent = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString();
+   *   MigrationJob migrationJob = MigrationJob.newBuilder().build();
+   *   String migrationJobId = "migrationJobId1870575242";
+   *   MigrationJob response =
+   *       dataMigrationServiceClient
+   *           .createMigrationJobAsync(parent, migrationJob, migrationJobId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of migration jobs. + * @param migrationJob Required. Represents a [migration + * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs) + * object. + * @param migrationJobId Required. The ID of the instance to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createMigrationJobAsync( + String parent, MigrationJob migrationJob, String migrationJobId) { + CreateMigrationJobRequest request = + CreateMigrationJobRequest.newBuilder() + .setParent(parent) + .setMigrationJob(migrationJob) + .setMigrationJobId(migrationJobId) + .build(); + return createMigrationJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new migration job in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   CreateMigrationJobRequest request =
+   *       CreateMigrationJobRequest.newBuilder()
+   *           .setParent(
+   *               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setMigrationJobId("migrationJobId1870575242")
+   *           .setMigrationJob(MigrationJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   MigrationJob response = dataMigrationServiceClient.createMigrationJobAsync(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 createMigrationJobAsync( + CreateMigrationJobRequest request) { + return createMigrationJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new migration job in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   CreateMigrationJobRequest request =
+   *       CreateMigrationJobRequest.newBuilder()
+   *           .setParent(
+   *               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setMigrationJobId("migrationJobId1870575242")
+   *           .setMigrationJob(MigrationJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.createMigrationJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MigrationJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createMigrationJobOperationCallable() { + return stub.createMigrationJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new migration job in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   CreateMigrationJobRequest request =
+   *       CreateMigrationJobRequest.newBuilder()
+   *           .setParent(
+   *               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setMigrationJobId("migrationJobId1870575242")
+   *           .setMigrationJob(MigrationJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.createMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createMigrationJobCallable() { + return stub.createMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   MigrationJob migrationJob = MigrationJob.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   MigrationJob response =
+   *       dataMigrationServiceClient.updateMigrationJobAsync(migrationJob, updateMask).get();
+   * }
+   * }
+ * + * @param migrationJob Required. The migration job parameters to update. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * migration job resource by the update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateMigrationJobAsync( + MigrationJob migrationJob, FieldMask updateMask) { + UpdateMigrationJobRequest request = + UpdateMigrationJobRequest.newBuilder() + .setMigrationJob(migrationJob) + .setUpdateMask(updateMask) + .build(); + return updateMigrationJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   UpdateMigrationJobRequest request =
+   *       UpdateMigrationJobRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMigrationJob(MigrationJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   MigrationJob response = dataMigrationServiceClient.updateMigrationJobAsync(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 updateMigrationJobAsync( + UpdateMigrationJobRequest request) { + return updateMigrationJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   UpdateMigrationJobRequest request =
+   *       UpdateMigrationJobRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMigrationJob(MigrationJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.updateMigrationJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MigrationJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateMigrationJobOperationCallable() { + return stub.updateMigrationJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   UpdateMigrationJobRequest request =
+   *       UpdateMigrationJobRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMigrationJob(MigrationJob.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.updateMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateMigrationJobCallable() { + return stub.updateMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
+   *   dataMigrationServiceClient.deleteMigrationJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the migration job resource to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteMigrationJobAsync( + MigrationJobName name) { + DeleteMigrationJobRequest request = + DeleteMigrationJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteMigrationJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   String name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString();
+   *   dataMigrationServiceClient.deleteMigrationJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the migration job resource to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteMigrationJobAsync(String name) { + DeleteMigrationJobRequest request = + DeleteMigrationJobRequest.newBuilder().setName(name).build(); + return deleteMigrationJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   DeleteMigrationJobRequest request =
+   *       DeleteMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   dataMigrationServiceClient.deleteMigrationJobAsync(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 deleteMigrationJobAsync( + DeleteMigrationJobRequest request) { + return deleteMigrationJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   DeleteMigrationJobRequest request =
+   *       DeleteMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.deleteMigrationJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteMigrationJobOperationCallable() { + return stub.deleteMigrationJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   DeleteMigrationJobRequest request =
+   *       DeleteMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.deleteMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteMigrationJobCallable() { + return stub.deleteMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Start an already created migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   StartMigrationJobRequest request =
+   *       StartMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   MigrationJob response = dataMigrationServiceClient.startMigrationJobAsync(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 startMigrationJobAsync( + StartMigrationJobRequest request) { + return startMigrationJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Start an already created migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   StartMigrationJobRequest request =
+   *       StartMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.startMigrationJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MigrationJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + startMigrationJobOperationCallable() { + return stub.startMigrationJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Start an already created migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   StartMigrationJobRequest request =
+   *       StartMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.startMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable startMigrationJobCallable() { + return stub.startMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a running migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   StopMigrationJobRequest request =
+   *       StopMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   MigrationJob response = dataMigrationServiceClient.stopMigrationJobAsync(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 stopMigrationJobAsync( + StopMigrationJobRequest request) { + return stopMigrationJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a running migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   StopMigrationJobRequest request =
+   *       StopMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.stopMigrationJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MigrationJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + stopMigrationJobOperationCallable() { + return stub.stopMigrationJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a running migration job. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   StopMigrationJobRequest request =
+   *       StopMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.stopMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable stopMigrationJobCallable() { + return stub.stopMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resume a migration job that is currently stopped and is resumable (was stopped during CDC + * phase). + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ResumeMigrationJobRequest request =
+   *       ResumeMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   MigrationJob response = dataMigrationServiceClient.resumeMigrationJobAsync(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 resumeMigrationJobAsync( + ResumeMigrationJobRequest request) { + return resumeMigrationJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resume a migration job that is currently stopped and is resumable (was stopped during CDC + * phase). + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ResumeMigrationJobRequest request =
+   *       ResumeMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.resumeMigrationJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MigrationJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + resumeMigrationJobOperationCallable() { + return stub.resumeMigrationJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resume a migration job that is currently stopped and is resumable (was stopped during CDC + * phase). + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ResumeMigrationJobRequest request =
+   *       ResumeMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.resumeMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable resumeMigrationJobCallable() { + return stub.resumeMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Promote a migration job, stopping replication to the destination and promoting the destination + * to be a standalone database. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   PromoteMigrationJobRequest request =
+   *       PromoteMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   MigrationJob response = dataMigrationServiceClient.promoteMigrationJobAsync(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 promoteMigrationJobAsync( + PromoteMigrationJobRequest request) { + return promoteMigrationJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Promote a migration job, stopping replication to the destination and promoting the destination + * to be a standalone database. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   PromoteMigrationJobRequest request =
+   *       PromoteMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.promoteMigrationJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MigrationJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + promoteMigrationJobOperationCallable() { + return stub.promoteMigrationJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Promote a migration job, stopping replication to the destination and promoting the destination + * to be a standalone database. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   PromoteMigrationJobRequest request =
+   *       PromoteMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.promoteMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable promoteMigrationJobCallable() { + return stub.promoteMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Verify a migration job, making sure the destination can reach the source and that all + * configuration and prerequisites are met. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   VerifyMigrationJobRequest request =
+   *       VerifyMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   MigrationJob response = dataMigrationServiceClient.verifyMigrationJobAsync(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 verifyMigrationJobAsync( + VerifyMigrationJobRequest request) { + return verifyMigrationJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Verify a migration job, making sure the destination can reach the source and that all + * configuration and prerequisites are met. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   VerifyMigrationJobRequest request =
+   *       VerifyMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.verifyMigrationJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MigrationJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + verifyMigrationJobOperationCallable() { + return stub.verifyMigrationJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Verify a migration job, making sure the destination can reach the source and that all + * configuration and prerequisites are met. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   VerifyMigrationJobRequest request =
+   *       VerifyMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.verifyMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable verifyMigrationJobCallable() { + return stub.verifyMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart a stopped or failed migration job, resetting the destination instance to its original + * state and starting the migration process from scratch. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   RestartMigrationJobRequest request =
+   *       RestartMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   MigrationJob response = dataMigrationServiceClient.restartMigrationJobAsync(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 restartMigrationJobAsync( + RestartMigrationJobRequest request) { + return restartMigrationJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart a stopped or failed migration job, resetting the destination instance to its original + * state and starting the migration process from scratch. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   RestartMigrationJobRequest request =
+   *       RestartMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.restartMigrationJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MigrationJob response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + restartMigrationJobOperationCallable() { + return stub.restartMigrationJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart a stopped or failed migration job, resetting the destination instance to its original + * state and starting the migration process from scratch. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   RestartMigrationJobRequest request =
+   *       RestartMigrationJobRequest.newBuilder()
+   *           .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.restartMigrationJobCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable restartMigrationJobCallable() { + return stub.restartMigrationJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generate a SSH configuration script to configure the reverse SSH connectivity. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   GenerateSshScriptRequest request =
+   *       GenerateSshScriptRequest.newBuilder()
+   *           .setMigrationJob(
+   *               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setVm("vm3767")
+   *           .setVmPort(563010825)
+   *           .build();
+   *   SshScript response = dataMigrationServiceClient.generateSshScript(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 SshScript generateSshScript(GenerateSshScriptRequest request) { + return generateSshScriptCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generate a SSH configuration script to configure the reverse SSH connectivity. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   GenerateSshScriptRequest request =
+   *       GenerateSshScriptRequest.newBuilder()
+   *           .setMigrationJob(
+   *               MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString())
+   *           .setVm("vm3767")
+   *           .setVmPort(563010825)
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.generateSshScriptCallable().futureCall(request);
+   *   // Do something.
+   *   SshScript response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable generateSshScriptCallable() { + return stub.generateSshScriptCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a list of all connection profiles in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ConnectionProfile element :
+   *       dataMigrationServiceClient.listConnectionProfiles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of connection profiles. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConnectionProfilesPagedResponse listConnectionProfiles(LocationName parent) { + ListConnectionProfilesRequest request = + ListConnectionProfilesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listConnectionProfiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a list of all connection profiles in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   String parent =
+   *       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
+   *   for (ConnectionProfile element :
+   *       dataMigrationServiceClient.listConnectionProfiles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of connection profiles. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConnectionProfilesPagedResponse listConnectionProfiles(String parent) { + ListConnectionProfilesRequest request = + ListConnectionProfilesRequest.newBuilder().setParent(parent).build(); + return listConnectionProfiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a list of all connection profiles in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ListConnectionProfilesRequest request =
+   *       ListConnectionProfilesRequest.newBuilder()
+   *           .setParent(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ConnectionProfile element :
+   *       dataMigrationServiceClient.listConnectionProfiles(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 ListConnectionProfilesPagedResponse listConnectionProfiles( + ListConnectionProfilesRequest request) { + return listConnectionProfilesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a list of all connection profiles in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ListConnectionProfilesRequest request =
+   *       ListConnectionProfilesRequest.newBuilder()
+   *           .setParent(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.listConnectionProfilesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ConnectionProfile element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConnectionProfilesPagedCallable() { + return stub.listConnectionProfilesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a list of all connection profiles in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ListConnectionProfilesRequest request =
+   *       ListConnectionProfilesRequest.newBuilder()
+   *           .setParent(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListConnectionProfilesResponse response =
+   *         dataMigrationServiceClient.listConnectionProfilesCallable().call(request);
+   *     for (ConnectionProfile element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConnectionProfilesCallable() { + return stub.listConnectionProfilesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single connection profile. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ConnectionProfileName name =
+   *       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
+   *   ConnectionProfile response = dataMigrationServiceClient.getConnectionProfile(name);
+   * }
+   * }
+ * + * @param name Required. Name of the connection profile resource to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConnectionProfile getConnectionProfile(ConnectionProfileName name) { + GetConnectionProfileRequest request = + GetConnectionProfileRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getConnectionProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single connection profile. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   String name =
+   *       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
+   *   ConnectionProfile response = dataMigrationServiceClient.getConnectionProfile(name);
+   * }
+   * }
+ * + * @param name Required. Name of the connection profile resource to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConnectionProfile getConnectionProfile(String name) { + GetConnectionProfileRequest request = + GetConnectionProfileRequest.newBuilder().setName(name).build(); + return getConnectionProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single connection profile. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   GetConnectionProfileRequest request =
+   *       GetConnectionProfileRequest.newBuilder()
+   *           .setName(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .build();
+   *   ConnectionProfile response = dataMigrationServiceClient.getConnectionProfile(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 ConnectionProfile getConnectionProfile(GetConnectionProfileRequest request) { + return getConnectionProfileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single connection profile. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   GetConnectionProfileRequest request =
+   *       GetConnectionProfileRequest.newBuilder()
+   *           .setName(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.getConnectionProfileCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectionProfile response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getConnectionProfileCallable() { + return stub.getConnectionProfileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new connection profile in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ConnectionProfileName parent =
+   *       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
+   *   ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
+   *   String connectionProfileId = "connectionProfileId597575526";
+   *   ConnectionProfile response =
+   *       dataMigrationServiceClient
+   *           .createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of connection profiles. + * @param connectionProfile Required. The create request body including the connection profile + * data + * @param connectionProfileId Required. The connection profile identifier. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createConnectionProfileAsync( + ConnectionProfileName parent, + ConnectionProfile connectionProfile, + String connectionProfileId) { + CreateConnectionProfileRequest request = + CreateConnectionProfileRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConnectionProfile(connectionProfile) + .setConnectionProfileId(connectionProfileId) + .build(); + return createConnectionProfileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new connection profile in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   String parent =
+   *       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
+   *   ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
+   *   String connectionProfileId = "connectionProfileId597575526";
+   *   ConnectionProfile response =
+   *       dataMigrationServiceClient
+   *           .createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of connection profiles. + * @param connectionProfile Required. The create request body including the connection profile + * data + * @param connectionProfileId Required. The connection profile identifier. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createConnectionProfileAsync( + String parent, ConnectionProfile connectionProfile, String connectionProfileId) { + CreateConnectionProfileRequest request = + CreateConnectionProfileRequest.newBuilder() + .setParent(parent) + .setConnectionProfile(connectionProfile) + .setConnectionProfileId(connectionProfileId) + .build(); + return createConnectionProfileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new connection profile in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   CreateConnectionProfileRequest request =
+   *       CreateConnectionProfileRequest.newBuilder()
+   *           .setParent(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .setConnectionProfileId("connectionProfileId597575526")
+   *           .setConnectionProfile(ConnectionProfile.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ConnectionProfile response =
+   *       dataMigrationServiceClient.createConnectionProfileAsync(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 createConnectionProfileAsync( + CreateConnectionProfileRequest request) { + return createConnectionProfileOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new connection profile in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   CreateConnectionProfileRequest request =
+   *       CreateConnectionProfileRequest.newBuilder()
+   *           .setParent(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .setConnectionProfileId("connectionProfileId597575526")
+   *           .setConnectionProfile(ConnectionProfile.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.createConnectionProfileOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectionProfile response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + createConnectionProfileOperationCallable() { + return stub.createConnectionProfileOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new connection profile in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   CreateConnectionProfileRequest request =
+   *       CreateConnectionProfileRequest.newBuilder()
+   *           .setParent(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .setConnectionProfileId("connectionProfileId597575526")
+   *           .setConnectionProfile(ConnectionProfile.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.createConnectionProfileCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createConnectionProfileCallable() { + return stub.createConnectionProfileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the configuration of a single connection profile. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ConnectionProfile response =
+   *       dataMigrationServiceClient
+   *           .updateConnectionProfileAsync(connectionProfile, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param connectionProfile Required. The connection profile parameters to update. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * connection profile resource by the update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateConnectionProfileAsync( + ConnectionProfile connectionProfile, FieldMask updateMask) { + UpdateConnectionProfileRequest request = + UpdateConnectionProfileRequest.newBuilder() + .setConnectionProfile(connectionProfile) + .setUpdateMask(updateMask) + .build(); + return updateConnectionProfileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the configuration of a single connection profile. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   UpdateConnectionProfileRequest request =
+   *       UpdateConnectionProfileRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setConnectionProfile(ConnectionProfile.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ConnectionProfile response =
+   *       dataMigrationServiceClient.updateConnectionProfileAsync(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 updateConnectionProfileAsync( + UpdateConnectionProfileRequest request) { + return updateConnectionProfileOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the configuration of a single connection profile. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   UpdateConnectionProfileRequest request =
+   *       UpdateConnectionProfileRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setConnectionProfile(ConnectionProfile.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.updateConnectionProfileOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ConnectionProfile response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + updateConnectionProfileOperationCallable() { + return stub.updateConnectionProfileOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the configuration of a single connection profile. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   UpdateConnectionProfileRequest request =
+   *       UpdateConnectionProfileRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setConnectionProfile(ConnectionProfile.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.updateConnectionProfileCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateConnectionProfileCallable() { + return stub.updateConnectionProfileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Database Migration Service connection profile. A connection profile can only + * be deleted if it is not in use by any active migration jobs. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   ConnectionProfileName name =
+   *       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
+   *   dataMigrationServiceClient.deleteConnectionProfileAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the connection profile resource to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteConnectionProfileAsync( + ConnectionProfileName name) { + DeleteConnectionProfileRequest request = + DeleteConnectionProfileRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteConnectionProfileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Database Migration Service connection profile. A connection profile can only + * be deleted if it is not in use by any active migration jobs. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   String name =
+   *       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
+   *   dataMigrationServiceClient.deleteConnectionProfileAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the connection profile resource to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteConnectionProfileAsync(String name) { + DeleteConnectionProfileRequest request = + DeleteConnectionProfileRequest.newBuilder().setName(name).build(); + return deleteConnectionProfileAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Database Migration Service connection profile. A connection profile can only + * be deleted if it is not in use by any active migration jobs. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   DeleteConnectionProfileRequest request =
+   *       DeleteConnectionProfileRequest.newBuilder()
+   *           .setName(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   dataMigrationServiceClient.deleteConnectionProfileAsync(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 deleteConnectionProfileAsync( + DeleteConnectionProfileRequest request) { + return deleteConnectionProfileOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Database Migration Service connection profile. A connection profile can only + * be deleted if it is not in use by any active migration jobs. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   DeleteConnectionProfileRequest request =
+   *       DeleteConnectionProfileRequest.newBuilder()
+   *           .setName(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       dataMigrationServiceClient.deleteConnectionProfileOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteConnectionProfileOperationCallable() { + return stub.deleteConnectionProfileOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Database Migration Service connection profile. A connection profile can only + * be deleted if it is not in use by any active migration jobs. + * + *

Sample code: + * + *

{@code
+   * try (DataMigrationServiceClient dataMigrationServiceClient =
+   *     DataMigrationServiceClient.create()) {
+   *   DeleteConnectionProfileRequest request =
+   *       DeleteConnectionProfileRequest.newBuilder()
+   *           .setName(
+   *               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataMigrationServiceClient.deleteConnectionProfileCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteConnectionProfileCallable() { + return stub.deleteConnectionProfileCallable(); + } + + @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 ListMigrationJobsPagedResponse + extends AbstractPagedListResponse< + ListMigrationJobsRequest, + ListMigrationJobsResponse, + MigrationJob, + ListMigrationJobsPage, + ListMigrationJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMigrationJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListMigrationJobsPagedResponse apply(ListMigrationJobsPage input) { + return new ListMigrationJobsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListMigrationJobsPagedResponse(ListMigrationJobsPage page) { + super(page, ListMigrationJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMigrationJobsPage + extends AbstractPage< + ListMigrationJobsRequest, + ListMigrationJobsResponse, + MigrationJob, + ListMigrationJobsPage> { + + private ListMigrationJobsPage( + PageContext context, + ListMigrationJobsResponse response) { + super(context, response); + } + + private static ListMigrationJobsPage createEmptyPage() { + return new ListMigrationJobsPage(null, null); + } + + @Override + protected ListMigrationJobsPage createPage( + PageContext context, + ListMigrationJobsResponse response) { + return new ListMigrationJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMigrationJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMigrationJobsRequest, + ListMigrationJobsResponse, + MigrationJob, + ListMigrationJobsPage, + ListMigrationJobsFixedSizeCollection> { + + private ListMigrationJobsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMigrationJobsFixedSizeCollection createEmptyCollection() { + return new ListMigrationJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListMigrationJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMigrationJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListConnectionProfilesPagedResponse + extends AbstractPagedListResponse< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ConnectionProfile, + ListConnectionProfilesPage, + ListConnectionProfilesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListConnectionProfilesRequest, ListConnectionProfilesResponse, ConnectionProfile> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListConnectionProfilesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListConnectionProfilesPagedResponse apply(ListConnectionProfilesPage input) { + return new ListConnectionProfilesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListConnectionProfilesPagedResponse(ListConnectionProfilesPage page) { + super(page, ListConnectionProfilesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListConnectionProfilesPage + extends AbstractPage< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ConnectionProfile, + ListConnectionProfilesPage> { + + private ListConnectionProfilesPage( + PageContext< + ListConnectionProfilesRequest, ListConnectionProfilesResponse, ConnectionProfile> + context, + ListConnectionProfilesResponse response) { + super(context, response); + } + + private static ListConnectionProfilesPage createEmptyPage() { + return new ListConnectionProfilesPage(null, null); + } + + @Override + protected ListConnectionProfilesPage createPage( + PageContext< + ListConnectionProfilesRequest, ListConnectionProfilesResponse, ConnectionProfile> + context, + ListConnectionProfilesResponse response) { + return new ListConnectionProfilesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListConnectionProfilesRequest, ListConnectionProfilesResponse, ConnectionProfile> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListConnectionProfilesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ConnectionProfile, + ListConnectionProfilesPage, + ListConnectionProfilesFixedSizeCollection> { + + private ListConnectionProfilesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListConnectionProfilesFixedSizeCollection createEmptyCollection() { + return new ListConnectionProfilesFixedSizeCollection(null, 0); + } + + @Override + protected ListConnectionProfilesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListConnectionProfilesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/DataMigrationServiceSettings.java b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/DataMigrationServiceSettings.java new file mode 100644 index 00000000..96da8a95 --- /dev/null +++ b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/DataMigrationServiceSettings.java @@ -0,0 +1,542 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.v1; + +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListConnectionProfilesPagedResponse; +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListMigrationJobsPagedResponse; + +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.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.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.clouddms.v1.stub.DataMigrationServiceStubSettings; +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 DataMigrationServiceClient}. + * + *

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

    + *
  • The default service address (datamigration.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 getMigrationJob to 30 seconds: + * + *

{@code
+ * DataMigrationServiceSettings.Builder dataMigrationServiceSettingsBuilder =
+ *     DataMigrationServiceSettings.newBuilder();
+ * dataMigrationServiceSettingsBuilder
+ *     .getMigrationJobSettings()
+ *     .setRetrySettings(
+ *         dataMigrationServiceSettingsBuilder
+ *             .getMigrationJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataMigrationServiceSettings dataMigrationServiceSettings =
+ *     dataMigrationServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DataMigrationServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listMigrationJobs. */ + public PagedCallSettings< + ListMigrationJobsRequest, ListMigrationJobsResponse, ListMigrationJobsPagedResponse> + listMigrationJobsSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).listMigrationJobsSettings(); + } + + /** Returns the object with the settings used for calls to getMigrationJob. */ + public UnaryCallSettings getMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).getMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to createMigrationJob. */ + public UnaryCallSettings createMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).createMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to createMigrationJob. */ + public OperationCallSettings + createMigrationJobOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .createMigrationJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateMigrationJob. */ + public UnaryCallSettings updateMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).updateMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to updateMigrationJob. */ + public OperationCallSettings + updateMigrationJobOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .updateMigrationJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteMigrationJob. */ + public UnaryCallSettings deleteMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).deleteMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteMigrationJob. */ + public OperationCallSettings + deleteMigrationJobOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .deleteMigrationJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to startMigrationJob. */ + public UnaryCallSettings startMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).startMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to startMigrationJob. */ + public OperationCallSettings + startMigrationJobOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .startMigrationJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to stopMigrationJob. */ + public UnaryCallSettings stopMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).stopMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to stopMigrationJob. */ + public OperationCallSettings + stopMigrationJobOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .stopMigrationJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to resumeMigrationJob. */ + public UnaryCallSettings resumeMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).resumeMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to resumeMigrationJob. */ + public OperationCallSettings + resumeMigrationJobOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .resumeMigrationJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to promoteMigrationJob. */ + public UnaryCallSettings promoteMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).promoteMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to promoteMigrationJob. */ + public OperationCallSettings + promoteMigrationJobOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .promoteMigrationJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to verifyMigrationJob. */ + public UnaryCallSettings verifyMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).verifyMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to verifyMigrationJob. */ + public OperationCallSettings + verifyMigrationJobOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .verifyMigrationJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to restartMigrationJob. */ + public UnaryCallSettings restartMigrationJobSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).restartMigrationJobSettings(); + } + + /** Returns the object with the settings used for calls to restartMigrationJob. */ + public OperationCallSettings + restartMigrationJobOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .restartMigrationJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to generateSshScript. */ + public UnaryCallSettings generateSshScriptSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).generateSshScriptSettings(); + } + + /** Returns the object with the settings used for calls to listConnectionProfiles. */ + public PagedCallSettings< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ListConnectionProfilesPagedResponse> + listConnectionProfilesSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).listConnectionProfilesSettings(); + } + + /** Returns the object with the settings used for calls to getConnectionProfile. */ + public UnaryCallSettings + getConnectionProfileSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).getConnectionProfileSettings(); + } + + /** Returns the object with the settings used for calls to createConnectionProfile. */ + public UnaryCallSettings + createConnectionProfileSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).createConnectionProfileSettings(); + } + + /** Returns the object with the settings used for calls to createConnectionProfile. */ + public OperationCallSettings + createConnectionProfileOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .createConnectionProfileOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateConnectionProfile. */ + public UnaryCallSettings + updateConnectionProfileSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).updateConnectionProfileSettings(); + } + + /** Returns the object with the settings used for calls to updateConnectionProfile. */ + public OperationCallSettings + updateConnectionProfileOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .updateConnectionProfileOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteConnectionProfile. */ + public UnaryCallSettings + deleteConnectionProfileSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()).deleteConnectionProfileSettings(); + } + + /** Returns the object with the settings used for calls to deleteConnectionProfile. */ + public OperationCallSettings + deleteConnectionProfileOperationSettings() { + return ((DataMigrationServiceStubSettings) getStubSettings()) + .deleteConnectionProfileOperationSettings(); + } + + public static final DataMigrationServiceSettings create(DataMigrationServiceStubSettings stub) + throws IOException { + return new DataMigrationServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataMigrationServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataMigrationServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataMigrationServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataMigrationServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataMigrationServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataMigrationServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataMigrationServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 DataMigrationServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataMigrationServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataMigrationServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataMigrationServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataMigrationServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataMigrationServiceStubSettings.newBuilder()); + } + + public DataMigrationServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DataMigrationServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * 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) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listMigrationJobs. */ + public PagedCallSettings.Builder< + ListMigrationJobsRequest, ListMigrationJobsResponse, ListMigrationJobsPagedResponse> + listMigrationJobsSettings() { + return getStubSettingsBuilder().listMigrationJobsSettings(); + } + + /** Returns the builder for the settings used for calls to getMigrationJob. */ + public UnaryCallSettings.Builder + getMigrationJobSettings() { + return getStubSettingsBuilder().getMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to createMigrationJob. */ + public UnaryCallSettings.Builder + createMigrationJobSettings() { + return getStubSettingsBuilder().createMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to createMigrationJob. */ + public OperationCallSettings.Builder + createMigrationJobOperationSettings() { + return getStubSettingsBuilder().createMigrationJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateMigrationJob. */ + public UnaryCallSettings.Builder + updateMigrationJobSettings() { + return getStubSettingsBuilder().updateMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to updateMigrationJob. */ + public OperationCallSettings.Builder + updateMigrationJobOperationSettings() { + return getStubSettingsBuilder().updateMigrationJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteMigrationJob. */ + public UnaryCallSettings.Builder + deleteMigrationJobSettings() { + return getStubSettingsBuilder().deleteMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteMigrationJob. */ + public OperationCallSettings.Builder + deleteMigrationJobOperationSettings() { + return getStubSettingsBuilder().deleteMigrationJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to startMigrationJob. */ + public UnaryCallSettings.Builder + startMigrationJobSettings() { + return getStubSettingsBuilder().startMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to startMigrationJob. */ + public OperationCallSettings.Builder + startMigrationJobOperationSettings() { + return getStubSettingsBuilder().startMigrationJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to stopMigrationJob. */ + public UnaryCallSettings.Builder + stopMigrationJobSettings() { + return getStubSettingsBuilder().stopMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to stopMigrationJob. */ + public OperationCallSettings.Builder + stopMigrationJobOperationSettings() { + return getStubSettingsBuilder().stopMigrationJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to resumeMigrationJob. */ + public UnaryCallSettings.Builder + resumeMigrationJobSettings() { + return getStubSettingsBuilder().resumeMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to resumeMigrationJob. */ + public OperationCallSettings.Builder + resumeMigrationJobOperationSettings() { + return getStubSettingsBuilder().resumeMigrationJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to promoteMigrationJob. */ + public UnaryCallSettings.Builder + promoteMigrationJobSettings() { + return getStubSettingsBuilder().promoteMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to promoteMigrationJob. */ + public OperationCallSettings.Builder< + PromoteMigrationJobRequest, MigrationJob, OperationMetadata> + promoteMigrationJobOperationSettings() { + return getStubSettingsBuilder().promoteMigrationJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to verifyMigrationJob. */ + public UnaryCallSettings.Builder + verifyMigrationJobSettings() { + return getStubSettingsBuilder().verifyMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to verifyMigrationJob. */ + public OperationCallSettings.Builder + verifyMigrationJobOperationSettings() { + return getStubSettingsBuilder().verifyMigrationJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to restartMigrationJob. */ + public UnaryCallSettings.Builder + restartMigrationJobSettings() { + return getStubSettingsBuilder().restartMigrationJobSettings(); + } + + /** Returns the builder for the settings used for calls to restartMigrationJob. */ + public OperationCallSettings.Builder< + RestartMigrationJobRequest, MigrationJob, OperationMetadata> + restartMigrationJobOperationSettings() { + return getStubSettingsBuilder().restartMigrationJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to generateSshScript. */ + public UnaryCallSettings.Builder + generateSshScriptSettings() { + return getStubSettingsBuilder().generateSshScriptSettings(); + } + + /** Returns the builder for the settings used for calls to listConnectionProfiles. */ + public PagedCallSettings.Builder< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ListConnectionProfilesPagedResponse> + listConnectionProfilesSettings() { + return getStubSettingsBuilder().listConnectionProfilesSettings(); + } + + /** Returns the builder for the settings used for calls to getConnectionProfile. */ + public UnaryCallSettings.Builder + getConnectionProfileSettings() { + return getStubSettingsBuilder().getConnectionProfileSettings(); + } + + /** Returns the builder for the settings used for calls to createConnectionProfile. */ + public UnaryCallSettings.Builder + createConnectionProfileSettings() { + return getStubSettingsBuilder().createConnectionProfileSettings(); + } + + /** Returns the builder for the settings used for calls to createConnectionProfile. */ + public OperationCallSettings.Builder< + CreateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + createConnectionProfileOperationSettings() { + return getStubSettingsBuilder().createConnectionProfileOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateConnectionProfile. */ + public UnaryCallSettings.Builder + updateConnectionProfileSettings() { + return getStubSettingsBuilder().updateConnectionProfileSettings(); + } + + /** Returns the builder for the settings used for calls to updateConnectionProfile. */ + public OperationCallSettings.Builder< + UpdateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + updateConnectionProfileOperationSettings() { + return getStubSettingsBuilder().updateConnectionProfileOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConnectionProfile. */ + public UnaryCallSettings.Builder + deleteConnectionProfileSettings() { + return getStubSettingsBuilder().deleteConnectionProfileSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConnectionProfile. */ + public OperationCallSettings.Builder + deleteConnectionProfileOperationSettings() { + return getStubSettingsBuilder().deleteConnectionProfileOperationSettings(); + } + + @Override + public DataMigrationServiceSettings build() throws IOException { + return new DataMigrationServiceSettings(this); + } + } +} diff --git a/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/gapic_metadata.json b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/gapic_metadata.json new file mode 100644 index 00000000..b8506b5f --- /dev/null +++ b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/gapic_metadata.json @@ -0,0 +1,69 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.clouddms.v1", + "libraryPackage": "com.google.cloud.clouddms.v1", + "services": { + "DataMigrationService": { + "clients": { + "grpc": { + "libraryClient": "DataMigrationServiceClient", + "rpcs": { + "CreateConnectionProfile": { + "methods": ["createConnectionProfileAsync", "createConnectionProfileAsync", "createConnectionProfileAsync", "createConnectionProfileOperationCallable", "createConnectionProfileCallable"] + }, + "CreateMigrationJob": { + "methods": ["createMigrationJobAsync", "createMigrationJobAsync", "createMigrationJobAsync", "createMigrationJobOperationCallable", "createMigrationJobCallable"] + }, + "DeleteConnectionProfile": { + "methods": ["deleteConnectionProfileAsync", "deleteConnectionProfileAsync", "deleteConnectionProfileAsync", "deleteConnectionProfileOperationCallable", "deleteConnectionProfileCallable"] + }, + "DeleteMigrationJob": { + "methods": ["deleteMigrationJobAsync", "deleteMigrationJobAsync", "deleteMigrationJobAsync", "deleteMigrationJobOperationCallable", "deleteMigrationJobCallable"] + }, + "GenerateSshScript": { + "methods": ["generateSshScript", "generateSshScriptCallable"] + }, + "GetConnectionProfile": { + "methods": ["getConnectionProfile", "getConnectionProfile", "getConnectionProfile", "getConnectionProfileCallable"] + }, + "GetMigrationJob": { + "methods": ["getMigrationJob", "getMigrationJob", "getMigrationJob", "getMigrationJobCallable"] + }, + "ListConnectionProfiles": { + "methods": ["listConnectionProfiles", "listConnectionProfiles", "listConnectionProfiles", "listConnectionProfilesPagedCallable", "listConnectionProfilesCallable"] + }, + "ListMigrationJobs": { + "methods": ["listMigrationJobs", "listMigrationJobs", "listMigrationJobs", "listMigrationJobsPagedCallable", "listMigrationJobsCallable"] + }, + "PromoteMigrationJob": { + "methods": ["promoteMigrationJobAsync", "promoteMigrationJobOperationCallable", "promoteMigrationJobCallable"] + }, + "RestartMigrationJob": { + "methods": ["restartMigrationJobAsync", "restartMigrationJobOperationCallable", "restartMigrationJobCallable"] + }, + "ResumeMigrationJob": { + "methods": ["resumeMigrationJobAsync", "resumeMigrationJobOperationCallable", "resumeMigrationJobCallable"] + }, + "StartMigrationJob": { + "methods": ["startMigrationJobAsync", "startMigrationJobOperationCallable", "startMigrationJobCallable"] + }, + "StopMigrationJob": { + "methods": ["stopMigrationJobAsync", "stopMigrationJobOperationCallable", "stopMigrationJobCallable"] + }, + "UpdateConnectionProfile": { + "methods": ["updateConnectionProfileAsync", "updateConnectionProfileAsync", "updateConnectionProfileOperationCallable", "updateConnectionProfileCallable"] + }, + "UpdateMigrationJob": { + "methods": ["updateMigrationJobAsync", "updateMigrationJobAsync", "updateMigrationJobOperationCallable", "updateMigrationJobCallable"] + }, + "VerifyMigrationJob": { + "methods": ["verifyMigrationJobAsync", "verifyMigrationJobOperationCallable", "verifyMigrationJobCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/package-info.java b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/package-info.java new file mode 100644 index 00000000..8c77f7f2 --- /dev/null +++ b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/package-info.java @@ -0,0 +1,37 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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. + * + *

======================= DataMigrationServiceClient ======================= + * + *

Service Description: Database Migration service + * + *

Sample for DataMigrationServiceClient: + * + *

{@code
+ * try (DataMigrationServiceClient dataMigrationServiceClient =
+ *     DataMigrationServiceClient.create()) {
+ *   MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]");
+ *   MigrationJob response = dataMigrationServiceClient.getMigrationJob(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.clouddms.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/DataMigrationServiceStub.java b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/DataMigrationServiceStub.java new file mode 100644 index 00000000..de13c3b8 --- /dev/null +++ b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/DataMigrationServiceStub.java @@ -0,0 +1,224 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.v1.stub; + +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListConnectionProfilesPagedResponse; +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListMigrationJobsPagedResponse; + +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.clouddms.v1.ConnectionProfile; +import com.google.cloud.clouddms.v1.CreateConnectionProfileRequest; +import com.google.cloud.clouddms.v1.CreateMigrationJobRequest; +import com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest; +import com.google.cloud.clouddms.v1.DeleteMigrationJobRequest; +import com.google.cloud.clouddms.v1.GenerateSshScriptRequest; +import com.google.cloud.clouddms.v1.GetConnectionProfileRequest; +import com.google.cloud.clouddms.v1.GetMigrationJobRequest; +import com.google.cloud.clouddms.v1.ListConnectionProfilesRequest; +import com.google.cloud.clouddms.v1.ListConnectionProfilesResponse; +import com.google.cloud.clouddms.v1.ListMigrationJobsRequest; +import com.google.cloud.clouddms.v1.ListMigrationJobsResponse; +import com.google.cloud.clouddms.v1.MigrationJob; +import com.google.cloud.clouddms.v1.OperationMetadata; +import com.google.cloud.clouddms.v1.PromoteMigrationJobRequest; +import com.google.cloud.clouddms.v1.RestartMigrationJobRequest; +import com.google.cloud.clouddms.v1.ResumeMigrationJobRequest; +import com.google.cloud.clouddms.v1.SshScript; +import com.google.cloud.clouddms.v1.StartMigrationJobRequest; +import com.google.cloud.clouddms.v1.StopMigrationJobRequest; +import com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest; +import com.google.cloud.clouddms.v1.UpdateMigrationJobRequest; +import com.google.cloud.clouddms.v1.VerifyMigrationJobRequest; +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 DataMigrationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DataMigrationServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listMigrationJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listMigrationJobsPagedCallable()"); + } + + public UnaryCallable + listMigrationJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listMigrationJobsCallable()"); + } + + public UnaryCallable getMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: getMigrationJobCallable()"); + } + + public OperationCallable + createMigrationJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createMigrationJobOperationCallable()"); + } + + public UnaryCallable createMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: createMigrationJobCallable()"); + } + + public OperationCallable + updateMigrationJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateMigrationJobOperationCallable()"); + } + + public UnaryCallable updateMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: updateMigrationJobCallable()"); + } + + public OperationCallable + deleteMigrationJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteMigrationJobOperationCallable()"); + } + + public UnaryCallable deleteMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteMigrationJobCallable()"); + } + + public OperationCallable + startMigrationJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: startMigrationJobOperationCallable()"); + } + + public UnaryCallable startMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: startMigrationJobCallable()"); + } + + public OperationCallable + stopMigrationJobOperationCallable() { + throw new UnsupportedOperationException("Not implemented: stopMigrationJobOperationCallable()"); + } + + public UnaryCallable stopMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: stopMigrationJobCallable()"); + } + + public OperationCallable + resumeMigrationJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: resumeMigrationJobOperationCallable()"); + } + + public UnaryCallable resumeMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: resumeMigrationJobCallable()"); + } + + public OperationCallable + promoteMigrationJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: promoteMigrationJobOperationCallable()"); + } + + public UnaryCallable promoteMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: promoteMigrationJobCallable()"); + } + + public OperationCallable + verifyMigrationJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: verifyMigrationJobOperationCallable()"); + } + + public UnaryCallable verifyMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: verifyMigrationJobCallable()"); + } + + public OperationCallable + restartMigrationJobOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: restartMigrationJobOperationCallable()"); + } + + public UnaryCallable restartMigrationJobCallable() { + throw new UnsupportedOperationException("Not implemented: restartMigrationJobCallable()"); + } + + public UnaryCallable generateSshScriptCallable() { + throw new UnsupportedOperationException("Not implemented: generateSshScriptCallable()"); + } + + public UnaryCallable + listConnectionProfilesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listConnectionProfilesPagedCallable()"); + } + + public UnaryCallable + listConnectionProfilesCallable() { + throw new UnsupportedOperationException("Not implemented: listConnectionProfilesCallable()"); + } + + public UnaryCallable + getConnectionProfileCallable() { + throw new UnsupportedOperationException("Not implemented: getConnectionProfileCallable()"); + } + + public OperationCallable + createConnectionProfileOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createConnectionProfileOperationCallable()"); + } + + public UnaryCallable + createConnectionProfileCallable() { + throw new UnsupportedOperationException("Not implemented: createConnectionProfileCallable()"); + } + + public OperationCallable + updateConnectionProfileOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateConnectionProfileOperationCallable()"); + } + + public UnaryCallable + updateConnectionProfileCallable() { + throw new UnsupportedOperationException("Not implemented: updateConnectionProfileCallable()"); + } + + public OperationCallable + deleteConnectionProfileOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteConnectionProfileOperationCallable()"); + } + + public UnaryCallable + deleteConnectionProfileCallable() { + throw new UnsupportedOperationException("Not implemented: deleteConnectionProfileCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/DataMigrationServiceStubSettings.java b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/DataMigrationServiceStubSettings.java new file mode 100644 index 00000000..d01f0e42 --- /dev/null +++ b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/DataMigrationServiceStubSettings.java @@ -0,0 +1,1430 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.v1.stub; + +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListConnectionProfilesPagedResponse; +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListMigrationJobsPagedResponse; + +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.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.clouddms.v1.ConnectionProfile; +import com.google.cloud.clouddms.v1.CreateConnectionProfileRequest; +import com.google.cloud.clouddms.v1.CreateMigrationJobRequest; +import com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest; +import com.google.cloud.clouddms.v1.DeleteMigrationJobRequest; +import com.google.cloud.clouddms.v1.GenerateSshScriptRequest; +import com.google.cloud.clouddms.v1.GetConnectionProfileRequest; +import com.google.cloud.clouddms.v1.GetMigrationJobRequest; +import com.google.cloud.clouddms.v1.ListConnectionProfilesRequest; +import com.google.cloud.clouddms.v1.ListConnectionProfilesResponse; +import com.google.cloud.clouddms.v1.ListMigrationJobsRequest; +import com.google.cloud.clouddms.v1.ListMigrationJobsResponse; +import com.google.cloud.clouddms.v1.MigrationJob; +import com.google.cloud.clouddms.v1.OperationMetadata; +import com.google.cloud.clouddms.v1.PromoteMigrationJobRequest; +import com.google.cloud.clouddms.v1.RestartMigrationJobRequest; +import com.google.cloud.clouddms.v1.ResumeMigrationJobRequest; +import com.google.cloud.clouddms.v1.SshScript; +import com.google.cloud.clouddms.v1.StartMigrationJobRequest; +import com.google.cloud.clouddms.v1.StopMigrationJobRequest; +import com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest; +import com.google.cloud.clouddms.v1.UpdateMigrationJobRequest; +import com.google.cloud.clouddms.v1.VerifyMigrationJobRequest; +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 DataMigrationServiceStub}. + * + *

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

    + *
  • The default service address (datamigration.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 getMigrationJob to 30 seconds: + * + *

{@code
+ * DataMigrationServiceStubSettings.Builder dataMigrationServiceSettingsBuilder =
+ *     DataMigrationServiceStubSettings.newBuilder();
+ * dataMigrationServiceSettingsBuilder
+ *     .getMigrationJobSettings()
+ *     .setRetrySettings(
+ *         dataMigrationServiceSettingsBuilder
+ *             .getMigrationJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataMigrationServiceStubSettings dataMigrationServiceSettings =
+ *     dataMigrationServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DataMigrationServiceStubSettings + 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< + ListMigrationJobsRequest, ListMigrationJobsResponse, ListMigrationJobsPagedResponse> + listMigrationJobsSettings; + private final UnaryCallSettings getMigrationJobSettings; + private final UnaryCallSettings createMigrationJobSettings; + private final OperationCallSettings + createMigrationJobOperationSettings; + private final UnaryCallSettings updateMigrationJobSettings; + private final OperationCallSettings + updateMigrationJobOperationSettings; + private final UnaryCallSettings deleteMigrationJobSettings; + private final OperationCallSettings + deleteMigrationJobOperationSettings; + private final UnaryCallSettings startMigrationJobSettings; + private final OperationCallSettings + startMigrationJobOperationSettings; + private final UnaryCallSettings stopMigrationJobSettings; + private final OperationCallSettings + stopMigrationJobOperationSettings; + private final UnaryCallSettings resumeMigrationJobSettings; + private final OperationCallSettings + resumeMigrationJobOperationSettings; + private final UnaryCallSettings + promoteMigrationJobSettings; + private final OperationCallSettings + promoteMigrationJobOperationSettings; + private final UnaryCallSettings verifyMigrationJobSettings; + private final OperationCallSettings + verifyMigrationJobOperationSettings; + private final UnaryCallSettings + restartMigrationJobSettings; + private final OperationCallSettings + restartMigrationJobOperationSettings; + private final UnaryCallSettings generateSshScriptSettings; + private final PagedCallSettings< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ListConnectionProfilesPagedResponse> + listConnectionProfilesSettings; + private final UnaryCallSettings + getConnectionProfileSettings; + private final UnaryCallSettings + createConnectionProfileSettings; + private final OperationCallSettings< + CreateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + createConnectionProfileOperationSettings; + private final UnaryCallSettings + updateConnectionProfileSettings; + private final OperationCallSettings< + UpdateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + updateConnectionProfileOperationSettings; + private final UnaryCallSettings + deleteConnectionProfileSettings; + private final OperationCallSettings + deleteConnectionProfileOperationSettings; + + private static final PagedListDescriptor< + ListMigrationJobsRequest, ListMigrationJobsResponse, MigrationJob> + LIST_MIGRATION_JOBS_PAGE_STR_DESC = + new PagedListDescriptor< + ListMigrationJobsRequest, ListMigrationJobsResponse, MigrationJob>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMigrationJobsRequest injectToken( + ListMigrationJobsRequest payload, String token) { + return ListMigrationJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMigrationJobsRequest injectPageSize( + ListMigrationJobsRequest payload, int pageSize) { + return ListMigrationJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMigrationJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMigrationJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListMigrationJobsResponse payload) { + return payload.getMigrationJobsList() == null + ? ImmutableList.of() + : payload.getMigrationJobsList(); + } + }; + + private static final PagedListDescriptor< + ListConnectionProfilesRequest, ListConnectionProfilesResponse, ConnectionProfile> + LIST_CONNECTION_PROFILES_PAGE_STR_DESC = + new PagedListDescriptor< + ListConnectionProfilesRequest, ListConnectionProfilesResponse, ConnectionProfile>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListConnectionProfilesRequest injectToken( + ListConnectionProfilesRequest payload, String token) { + return ListConnectionProfilesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListConnectionProfilesRequest injectPageSize( + ListConnectionProfilesRequest payload, int pageSize) { + return ListConnectionProfilesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListConnectionProfilesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListConnectionProfilesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListConnectionProfilesResponse payload) { + return payload.getConnectionProfilesList() == null + ? ImmutableList.of() + : payload.getConnectionProfilesList(); + } + }; + + private static final PagedListResponseFactory< + ListMigrationJobsRequest, ListMigrationJobsResponse, ListMigrationJobsPagedResponse> + LIST_MIGRATION_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMigrationJobsRequest, + ListMigrationJobsResponse, + ListMigrationJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMigrationJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_MIGRATION_JOBS_PAGE_STR_DESC, request, context); + return ListMigrationJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ListConnectionProfilesPagedResponse> + LIST_CONNECTION_PROFILES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ListConnectionProfilesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListConnectionProfilesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ConnectionProfile> + pageContext = + PageContext.create( + callable, LIST_CONNECTION_PROFILES_PAGE_STR_DESC, request, context); + return ListConnectionProfilesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listMigrationJobs. */ + public PagedCallSettings< + ListMigrationJobsRequest, ListMigrationJobsResponse, ListMigrationJobsPagedResponse> + listMigrationJobsSettings() { + return listMigrationJobsSettings; + } + + /** Returns the object with the settings used for calls to getMigrationJob. */ + public UnaryCallSettings getMigrationJobSettings() { + return getMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to createMigrationJob. */ + public UnaryCallSettings createMigrationJobSettings() { + return createMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to createMigrationJob. */ + public OperationCallSettings + createMigrationJobOperationSettings() { + return createMigrationJobOperationSettings; + } + + /** Returns the object with the settings used for calls to updateMigrationJob. */ + public UnaryCallSettings updateMigrationJobSettings() { + return updateMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to updateMigrationJob. */ + public OperationCallSettings + updateMigrationJobOperationSettings() { + return updateMigrationJobOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteMigrationJob. */ + public UnaryCallSettings deleteMigrationJobSettings() { + return deleteMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to deleteMigrationJob. */ + public OperationCallSettings + deleteMigrationJobOperationSettings() { + return deleteMigrationJobOperationSettings; + } + + /** Returns the object with the settings used for calls to startMigrationJob. */ + public UnaryCallSettings startMigrationJobSettings() { + return startMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to startMigrationJob. */ + public OperationCallSettings + startMigrationJobOperationSettings() { + return startMigrationJobOperationSettings; + } + + /** Returns the object with the settings used for calls to stopMigrationJob. */ + public UnaryCallSettings stopMigrationJobSettings() { + return stopMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to stopMigrationJob. */ + public OperationCallSettings + stopMigrationJobOperationSettings() { + return stopMigrationJobOperationSettings; + } + + /** Returns the object with the settings used for calls to resumeMigrationJob. */ + public UnaryCallSettings resumeMigrationJobSettings() { + return resumeMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to resumeMigrationJob. */ + public OperationCallSettings + resumeMigrationJobOperationSettings() { + return resumeMigrationJobOperationSettings; + } + + /** Returns the object with the settings used for calls to promoteMigrationJob. */ + public UnaryCallSettings promoteMigrationJobSettings() { + return promoteMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to promoteMigrationJob. */ + public OperationCallSettings + promoteMigrationJobOperationSettings() { + return promoteMigrationJobOperationSettings; + } + + /** Returns the object with the settings used for calls to verifyMigrationJob. */ + public UnaryCallSettings verifyMigrationJobSettings() { + return verifyMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to verifyMigrationJob. */ + public OperationCallSettings + verifyMigrationJobOperationSettings() { + return verifyMigrationJobOperationSettings; + } + + /** Returns the object with the settings used for calls to restartMigrationJob. */ + public UnaryCallSettings restartMigrationJobSettings() { + return restartMigrationJobSettings; + } + + /** Returns the object with the settings used for calls to restartMigrationJob. */ + public OperationCallSettings + restartMigrationJobOperationSettings() { + return restartMigrationJobOperationSettings; + } + + /** Returns the object with the settings used for calls to generateSshScript. */ + public UnaryCallSettings generateSshScriptSettings() { + return generateSshScriptSettings; + } + + /** Returns the object with the settings used for calls to listConnectionProfiles. */ + public PagedCallSettings< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ListConnectionProfilesPagedResponse> + listConnectionProfilesSettings() { + return listConnectionProfilesSettings; + } + + /** Returns the object with the settings used for calls to getConnectionProfile. */ + public UnaryCallSettings + getConnectionProfileSettings() { + return getConnectionProfileSettings; + } + + /** Returns the object with the settings used for calls to createConnectionProfile. */ + public UnaryCallSettings + createConnectionProfileSettings() { + return createConnectionProfileSettings; + } + + /** Returns the object with the settings used for calls to createConnectionProfile. */ + public OperationCallSettings + createConnectionProfileOperationSettings() { + return createConnectionProfileOperationSettings; + } + + /** Returns the object with the settings used for calls to updateConnectionProfile. */ + public UnaryCallSettings + updateConnectionProfileSettings() { + return updateConnectionProfileSettings; + } + + /** Returns the object with the settings used for calls to updateConnectionProfile. */ + public OperationCallSettings + updateConnectionProfileOperationSettings() { + return updateConnectionProfileOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteConnectionProfile. */ + public UnaryCallSettings + deleteConnectionProfileSettings() { + return deleteConnectionProfileSettings; + } + + /** Returns the object with the settings used for calls to deleteConnectionProfile. */ + public OperationCallSettings + deleteConnectionProfileOperationSettings() { + return deleteConnectionProfileOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataMigrationServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataMigrationServiceStub.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 "datamigration.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); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataMigrationServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 DataMigrationServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listMigrationJobsSettings = settingsBuilder.listMigrationJobsSettings().build(); + getMigrationJobSettings = settingsBuilder.getMigrationJobSettings().build(); + createMigrationJobSettings = settingsBuilder.createMigrationJobSettings().build(); + createMigrationJobOperationSettings = + settingsBuilder.createMigrationJobOperationSettings().build(); + updateMigrationJobSettings = settingsBuilder.updateMigrationJobSettings().build(); + updateMigrationJobOperationSettings = + settingsBuilder.updateMigrationJobOperationSettings().build(); + deleteMigrationJobSettings = settingsBuilder.deleteMigrationJobSettings().build(); + deleteMigrationJobOperationSettings = + settingsBuilder.deleteMigrationJobOperationSettings().build(); + startMigrationJobSettings = settingsBuilder.startMigrationJobSettings().build(); + startMigrationJobOperationSettings = + settingsBuilder.startMigrationJobOperationSettings().build(); + stopMigrationJobSettings = settingsBuilder.stopMigrationJobSettings().build(); + stopMigrationJobOperationSettings = settingsBuilder.stopMigrationJobOperationSettings().build(); + resumeMigrationJobSettings = settingsBuilder.resumeMigrationJobSettings().build(); + resumeMigrationJobOperationSettings = + settingsBuilder.resumeMigrationJobOperationSettings().build(); + promoteMigrationJobSettings = settingsBuilder.promoteMigrationJobSettings().build(); + promoteMigrationJobOperationSettings = + settingsBuilder.promoteMigrationJobOperationSettings().build(); + verifyMigrationJobSettings = settingsBuilder.verifyMigrationJobSettings().build(); + verifyMigrationJobOperationSettings = + settingsBuilder.verifyMigrationJobOperationSettings().build(); + restartMigrationJobSettings = settingsBuilder.restartMigrationJobSettings().build(); + restartMigrationJobOperationSettings = + settingsBuilder.restartMigrationJobOperationSettings().build(); + generateSshScriptSettings = settingsBuilder.generateSshScriptSettings().build(); + listConnectionProfilesSettings = settingsBuilder.listConnectionProfilesSettings().build(); + getConnectionProfileSettings = settingsBuilder.getConnectionProfileSettings().build(); + createConnectionProfileSettings = settingsBuilder.createConnectionProfileSettings().build(); + createConnectionProfileOperationSettings = + settingsBuilder.createConnectionProfileOperationSettings().build(); + updateConnectionProfileSettings = settingsBuilder.updateConnectionProfileSettings().build(); + updateConnectionProfileOperationSettings = + settingsBuilder.updateConnectionProfileOperationSettings().build(); + deleteConnectionProfileSettings = settingsBuilder.deleteConnectionProfileSettings().build(); + deleteConnectionProfileOperationSettings = + settingsBuilder.deleteConnectionProfileOperationSettings().build(); + } + + /** Builder for DataMigrationServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListMigrationJobsRequest, ListMigrationJobsResponse, ListMigrationJobsPagedResponse> + listMigrationJobsSettings; + private final UnaryCallSettings.Builder + getMigrationJobSettings; + private final UnaryCallSettings.Builder + createMigrationJobSettings; + private final OperationCallSettings.Builder< + CreateMigrationJobRequest, MigrationJob, OperationMetadata> + createMigrationJobOperationSettings; + private final UnaryCallSettings.Builder + updateMigrationJobSettings; + private final OperationCallSettings.Builder< + UpdateMigrationJobRequest, MigrationJob, OperationMetadata> + updateMigrationJobOperationSettings; + private final UnaryCallSettings.Builder + deleteMigrationJobSettings; + private final OperationCallSettings.Builder + deleteMigrationJobOperationSettings; + private final UnaryCallSettings.Builder + startMigrationJobSettings; + private final OperationCallSettings.Builder< + StartMigrationJobRequest, MigrationJob, OperationMetadata> + startMigrationJobOperationSettings; + private final UnaryCallSettings.Builder + stopMigrationJobSettings; + private final OperationCallSettings.Builder< + StopMigrationJobRequest, MigrationJob, OperationMetadata> + stopMigrationJobOperationSettings; + private final UnaryCallSettings.Builder + resumeMigrationJobSettings; + private final OperationCallSettings.Builder< + ResumeMigrationJobRequest, MigrationJob, OperationMetadata> + resumeMigrationJobOperationSettings; + private final UnaryCallSettings.Builder + promoteMigrationJobSettings; + private final OperationCallSettings.Builder< + PromoteMigrationJobRequest, MigrationJob, OperationMetadata> + promoteMigrationJobOperationSettings; + private final UnaryCallSettings.Builder + verifyMigrationJobSettings; + private final OperationCallSettings.Builder< + VerifyMigrationJobRequest, MigrationJob, OperationMetadata> + verifyMigrationJobOperationSettings; + private final UnaryCallSettings.Builder + restartMigrationJobSettings; + private final OperationCallSettings.Builder< + RestartMigrationJobRequest, MigrationJob, OperationMetadata> + restartMigrationJobOperationSettings; + private final UnaryCallSettings.Builder + generateSshScriptSettings; + private final PagedCallSettings.Builder< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ListConnectionProfilesPagedResponse> + listConnectionProfilesSettings; + private final UnaryCallSettings.Builder + getConnectionProfileSettings; + private final UnaryCallSettings.Builder + createConnectionProfileSettings; + private final OperationCallSettings.Builder< + CreateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + createConnectionProfileOperationSettings; + private final UnaryCallSettings.Builder + updateConnectionProfileSettings; + private final OperationCallSettings.Builder< + UpdateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + updateConnectionProfileOperationSettings; + private final UnaryCallSettings.Builder + deleteConnectionProfileSettings; + private final OperationCallSettings.Builder< + DeleteConnectionProfileRequest, Empty, OperationMetadata> + deleteConnectionProfileOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_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() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listMigrationJobsSettings = PagedCallSettings.newBuilder(LIST_MIGRATION_JOBS_PAGE_STR_FACT); + getMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMigrationJobOperationSettings = OperationCallSettings.newBuilder(); + updateMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateMigrationJobOperationSettings = OperationCallSettings.newBuilder(); + deleteMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteMigrationJobOperationSettings = OperationCallSettings.newBuilder(); + startMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startMigrationJobOperationSettings = OperationCallSettings.newBuilder(); + stopMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopMigrationJobOperationSettings = OperationCallSettings.newBuilder(); + resumeMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resumeMigrationJobOperationSettings = OperationCallSettings.newBuilder(); + promoteMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + promoteMigrationJobOperationSettings = OperationCallSettings.newBuilder(); + verifyMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + verifyMigrationJobOperationSettings = OperationCallSettings.newBuilder(); + restartMigrationJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restartMigrationJobOperationSettings = OperationCallSettings.newBuilder(); + generateSshScriptSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listConnectionProfilesSettings = + PagedCallSettings.newBuilder(LIST_CONNECTION_PROFILES_PAGE_STR_FACT); + getConnectionProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createConnectionProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createConnectionProfileOperationSettings = OperationCallSettings.newBuilder(); + updateConnectionProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateConnectionProfileOperationSettings = OperationCallSettings.newBuilder(); + deleteConnectionProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteConnectionProfileOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listMigrationJobsSettings, + getMigrationJobSettings, + createMigrationJobSettings, + updateMigrationJobSettings, + deleteMigrationJobSettings, + startMigrationJobSettings, + stopMigrationJobSettings, + resumeMigrationJobSettings, + promoteMigrationJobSettings, + verifyMigrationJobSettings, + restartMigrationJobSettings, + generateSshScriptSettings, + listConnectionProfilesSettings, + getConnectionProfileSettings, + createConnectionProfileSettings, + updateConnectionProfileSettings, + deleteConnectionProfileSettings); + initDefaults(this); + } + + protected Builder(DataMigrationServiceStubSettings settings) { + super(settings); + + listMigrationJobsSettings = settings.listMigrationJobsSettings.toBuilder(); + getMigrationJobSettings = settings.getMigrationJobSettings.toBuilder(); + createMigrationJobSettings = settings.createMigrationJobSettings.toBuilder(); + createMigrationJobOperationSettings = + settings.createMigrationJobOperationSettings.toBuilder(); + updateMigrationJobSettings = settings.updateMigrationJobSettings.toBuilder(); + updateMigrationJobOperationSettings = + settings.updateMigrationJobOperationSettings.toBuilder(); + deleteMigrationJobSettings = settings.deleteMigrationJobSettings.toBuilder(); + deleteMigrationJobOperationSettings = + settings.deleteMigrationJobOperationSettings.toBuilder(); + startMigrationJobSettings = settings.startMigrationJobSettings.toBuilder(); + startMigrationJobOperationSettings = settings.startMigrationJobOperationSettings.toBuilder(); + stopMigrationJobSettings = settings.stopMigrationJobSettings.toBuilder(); + stopMigrationJobOperationSettings = settings.stopMigrationJobOperationSettings.toBuilder(); + resumeMigrationJobSettings = settings.resumeMigrationJobSettings.toBuilder(); + resumeMigrationJobOperationSettings = + settings.resumeMigrationJobOperationSettings.toBuilder(); + promoteMigrationJobSettings = settings.promoteMigrationJobSettings.toBuilder(); + promoteMigrationJobOperationSettings = + settings.promoteMigrationJobOperationSettings.toBuilder(); + verifyMigrationJobSettings = settings.verifyMigrationJobSettings.toBuilder(); + verifyMigrationJobOperationSettings = + settings.verifyMigrationJobOperationSettings.toBuilder(); + restartMigrationJobSettings = settings.restartMigrationJobSettings.toBuilder(); + restartMigrationJobOperationSettings = + settings.restartMigrationJobOperationSettings.toBuilder(); + generateSshScriptSettings = settings.generateSshScriptSettings.toBuilder(); + listConnectionProfilesSettings = settings.listConnectionProfilesSettings.toBuilder(); + getConnectionProfileSettings = settings.getConnectionProfileSettings.toBuilder(); + createConnectionProfileSettings = settings.createConnectionProfileSettings.toBuilder(); + createConnectionProfileOperationSettings = + settings.createConnectionProfileOperationSettings.toBuilder(); + updateConnectionProfileSettings = settings.updateConnectionProfileSettings.toBuilder(); + updateConnectionProfileOperationSettings = + settings.updateConnectionProfileOperationSettings.toBuilder(); + deleteConnectionProfileSettings = settings.deleteConnectionProfileSettings.toBuilder(); + deleteConnectionProfileOperationSettings = + settings.deleteConnectionProfileOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listMigrationJobsSettings, + getMigrationJobSettings, + createMigrationJobSettings, + updateMigrationJobSettings, + deleteMigrationJobSettings, + startMigrationJobSettings, + stopMigrationJobSettings, + resumeMigrationJobSettings, + promoteMigrationJobSettings, + verifyMigrationJobSettings, + restartMigrationJobSettings, + generateSshScriptSettings, + listConnectionProfilesSettings, + getConnectionProfileSettings, + createConnectionProfileSettings, + updateConnectionProfileSettings, + deleteConnectionProfileSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listMigrationJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .startMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .stopMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .resumeMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .promoteMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .verifyMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .restartMigrationJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .generateSshScriptSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listConnectionProfilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getConnectionProfileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createConnectionProfileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateConnectionProfileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteConnectionProfileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createMigrationJobOperationSettings() + .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(MigrationJob.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 + .updateMigrationJobOperationSettings() + .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(MigrationJob.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 + .deleteMigrationJobOperationSettings() + .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(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 + .startMigrationJobOperationSettings() + .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(MigrationJob.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 + .stopMigrationJobOperationSettings() + .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(MigrationJob.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 + .resumeMigrationJobOperationSettings() + .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(MigrationJob.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 + .promoteMigrationJobOperationSettings() + .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(MigrationJob.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 + .verifyMigrationJobOperationSettings() + .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(MigrationJob.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 + .restartMigrationJobOperationSettings() + .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(MigrationJob.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 + .createConnectionProfileOperationSettings() + .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(ConnectionProfile.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 + .updateConnectionProfileOperationSettings() + .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(ConnectionProfile.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 + .deleteConnectionProfileOperationSettings() + .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(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())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * 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) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listMigrationJobs. */ + public PagedCallSettings.Builder< + ListMigrationJobsRequest, ListMigrationJobsResponse, ListMigrationJobsPagedResponse> + listMigrationJobsSettings() { + return listMigrationJobsSettings; + } + + /** Returns the builder for the settings used for calls to getMigrationJob. */ + public UnaryCallSettings.Builder + getMigrationJobSettings() { + return getMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to createMigrationJob. */ + public UnaryCallSettings.Builder + createMigrationJobSettings() { + return createMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to createMigrationJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createMigrationJobOperationSettings() { + return createMigrationJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateMigrationJob. */ + public UnaryCallSettings.Builder + updateMigrationJobSettings() { + return updateMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to updateMigrationJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateMigrationJobOperationSettings() { + return updateMigrationJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteMigrationJob. */ + public UnaryCallSettings.Builder + deleteMigrationJobSettings() { + return deleteMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to deleteMigrationJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteMigrationJobOperationSettings() { + return deleteMigrationJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to startMigrationJob. */ + public UnaryCallSettings.Builder + startMigrationJobSettings() { + return startMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to startMigrationJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + startMigrationJobOperationSettings() { + return startMigrationJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to stopMigrationJob. */ + public UnaryCallSettings.Builder + stopMigrationJobSettings() { + return stopMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to stopMigrationJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + stopMigrationJobOperationSettings() { + return stopMigrationJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to resumeMigrationJob. */ + public UnaryCallSettings.Builder + resumeMigrationJobSettings() { + return resumeMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to resumeMigrationJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + resumeMigrationJobOperationSettings() { + return resumeMigrationJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to promoteMigrationJob. */ + public UnaryCallSettings.Builder + promoteMigrationJobSettings() { + return promoteMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to promoteMigrationJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + PromoteMigrationJobRequest, MigrationJob, OperationMetadata> + promoteMigrationJobOperationSettings() { + return promoteMigrationJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to verifyMigrationJob. */ + public UnaryCallSettings.Builder + verifyMigrationJobSettings() { + return verifyMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to verifyMigrationJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + verifyMigrationJobOperationSettings() { + return verifyMigrationJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to restartMigrationJob. */ + public UnaryCallSettings.Builder + restartMigrationJobSettings() { + return restartMigrationJobSettings; + } + + /** Returns the builder for the settings used for calls to restartMigrationJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RestartMigrationJobRequest, MigrationJob, OperationMetadata> + restartMigrationJobOperationSettings() { + return restartMigrationJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to generateSshScript. */ + public UnaryCallSettings.Builder + generateSshScriptSettings() { + return generateSshScriptSettings; + } + + /** Returns the builder for the settings used for calls to listConnectionProfiles. */ + public PagedCallSettings.Builder< + ListConnectionProfilesRequest, + ListConnectionProfilesResponse, + ListConnectionProfilesPagedResponse> + listConnectionProfilesSettings() { + return listConnectionProfilesSettings; + } + + /** Returns the builder for the settings used for calls to getConnectionProfile. */ + public UnaryCallSettings.Builder + getConnectionProfileSettings() { + return getConnectionProfileSettings; + } + + /** Returns the builder for the settings used for calls to createConnectionProfile. */ + public UnaryCallSettings.Builder + createConnectionProfileSettings() { + return createConnectionProfileSettings; + } + + /** Returns the builder for the settings used for calls to createConnectionProfile. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + createConnectionProfileOperationSettings() { + return createConnectionProfileOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateConnectionProfile. */ + public UnaryCallSettings.Builder + updateConnectionProfileSettings() { + return updateConnectionProfileSettings; + } + + /** Returns the builder for the settings used for calls to updateConnectionProfile. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + updateConnectionProfileOperationSettings() { + return updateConnectionProfileOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteConnectionProfile. */ + public UnaryCallSettings.Builder + deleteConnectionProfileSettings() { + return deleteConnectionProfileSettings; + } + + /** Returns the builder for the settings used for calls to deleteConnectionProfile. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteConnectionProfileOperationSettings() { + return deleteConnectionProfileOperationSettings; + } + + @Override + public DataMigrationServiceStubSettings build() throws IOException { + return new DataMigrationServiceStubSettings(this); + } + } +} diff --git a/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/GrpcDataMigrationServiceCallableFactory.java b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/GrpcDataMigrationServiceCallableFactory.java new file mode 100644 index 00000000..1cb3020a --- /dev/null +++ b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/GrpcDataMigrationServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.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 DataMigrationService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDataMigrationServiceCallableFactory 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/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/GrpcDataMigrationServiceStub.java b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/GrpcDataMigrationServiceStub.java new file mode 100644 index 00000000..1067e719 --- /dev/null +++ b/google-cloud-dms/src/main/java/com/google/cloud/clouddms/v1/stub/GrpcDataMigrationServiceStub.java @@ -0,0 +1,959 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.v1.stub; + +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListConnectionProfilesPagedResponse; +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListMigrationJobsPagedResponse; + +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.clouddms.v1.ConnectionProfile; +import com.google.cloud.clouddms.v1.CreateConnectionProfileRequest; +import com.google.cloud.clouddms.v1.CreateMigrationJobRequest; +import com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest; +import com.google.cloud.clouddms.v1.DeleteMigrationJobRequest; +import com.google.cloud.clouddms.v1.GenerateSshScriptRequest; +import com.google.cloud.clouddms.v1.GetConnectionProfileRequest; +import com.google.cloud.clouddms.v1.GetMigrationJobRequest; +import com.google.cloud.clouddms.v1.ListConnectionProfilesRequest; +import com.google.cloud.clouddms.v1.ListConnectionProfilesResponse; +import com.google.cloud.clouddms.v1.ListMigrationJobsRequest; +import com.google.cloud.clouddms.v1.ListMigrationJobsResponse; +import com.google.cloud.clouddms.v1.MigrationJob; +import com.google.cloud.clouddms.v1.OperationMetadata; +import com.google.cloud.clouddms.v1.PromoteMigrationJobRequest; +import com.google.cloud.clouddms.v1.RestartMigrationJobRequest; +import com.google.cloud.clouddms.v1.ResumeMigrationJobRequest; +import com.google.cloud.clouddms.v1.SshScript; +import com.google.cloud.clouddms.v1.StartMigrationJobRequest; +import com.google.cloud.clouddms.v1.StopMigrationJobRequest; +import com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest; +import com.google.cloud.clouddms.v1.UpdateMigrationJobRequest; +import com.google.cloud.clouddms.v1.VerifyMigrationJobRequest; +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 DataMigrationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDataMigrationServiceStub extends DataMigrationServiceStub { + private static final MethodDescriptor + listMigrationJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/ListMigrationJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMigrationJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMigrationJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/GetMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(GetMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MigrationJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/CreateMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/UpdateMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/DeleteMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + startMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/StartMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(StartMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + stopMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/StopMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(StopMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + resumeMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/ResumeMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(ResumeMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + promoteMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.clouddms.v1.DataMigrationService/PromoteMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(PromoteMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + verifyMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/VerifyMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(VerifyMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + restartMigrationJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.clouddms.v1.DataMigrationService/RestartMigrationJob") + .setRequestMarshaller( + ProtoUtils.marshaller(RestartMigrationJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + generateSshScriptMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.clouddms.v1.DataMigrationService/GenerateSshScript") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateSshScriptRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SshScript.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListConnectionProfilesRequest, ListConnectionProfilesResponse> + listConnectionProfilesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.clouddms.v1.DataMigrationService/ListConnectionProfiles") + .setRequestMarshaller( + ProtoUtils.marshaller(ListConnectionProfilesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListConnectionProfilesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getConnectionProfileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.clouddms.v1.DataMigrationService/GetConnectionProfile") + .setRequestMarshaller( + ProtoUtils.marshaller(GetConnectionProfileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ConnectionProfile.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createConnectionProfileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.clouddms.v1.DataMigrationService/CreateConnectionProfile") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateConnectionProfileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateConnectionProfileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.clouddms.v1.DataMigrationService/UpdateConnectionProfile") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateConnectionProfileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteConnectionProfileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.clouddms.v1.DataMigrationService/DeleteConnectionProfile") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteConnectionProfileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + listMigrationJobsCallable; + private final UnaryCallable + listMigrationJobsPagedCallable; + private final UnaryCallable getMigrationJobCallable; + private final UnaryCallable createMigrationJobCallable; + private final OperationCallable + createMigrationJobOperationCallable; + private final UnaryCallable updateMigrationJobCallable; + private final OperationCallable + updateMigrationJobOperationCallable; + private final UnaryCallable deleteMigrationJobCallable; + private final OperationCallable + deleteMigrationJobOperationCallable; + private final UnaryCallable startMigrationJobCallable; + private final OperationCallable + startMigrationJobOperationCallable; + private final UnaryCallable stopMigrationJobCallable; + private final OperationCallable + stopMigrationJobOperationCallable; + private final UnaryCallable resumeMigrationJobCallable; + private final OperationCallable + resumeMigrationJobOperationCallable; + private final UnaryCallable promoteMigrationJobCallable; + private final OperationCallable + promoteMigrationJobOperationCallable; + private final UnaryCallable verifyMigrationJobCallable; + private final OperationCallable + verifyMigrationJobOperationCallable; + private final UnaryCallable restartMigrationJobCallable; + private final OperationCallable + restartMigrationJobOperationCallable; + private final UnaryCallable generateSshScriptCallable; + private final UnaryCallable + listConnectionProfilesCallable; + private final UnaryCallable + listConnectionProfilesPagedCallable; + private final UnaryCallable + getConnectionProfileCallable; + private final UnaryCallable + createConnectionProfileCallable; + private final OperationCallable< + CreateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + createConnectionProfileOperationCallable; + private final UnaryCallable + updateConnectionProfileCallable; + private final OperationCallable< + UpdateConnectionProfileRequest, ConnectionProfile, OperationMetadata> + updateConnectionProfileOperationCallable; + private final UnaryCallable + deleteConnectionProfileCallable; + private final OperationCallable + deleteConnectionProfileOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataMigrationServiceStub create(DataMigrationServiceStubSettings settings) + throws IOException { + return new GrpcDataMigrationServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataMigrationServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataMigrationServiceStub( + DataMigrationServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataMigrationServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataMigrationServiceStub( + DataMigrationServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataMigrationServiceStub, 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 GrpcDataMigrationServiceStub( + DataMigrationServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataMigrationServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataMigrationServiceStub, 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 GrpcDataMigrationServiceStub( + DataMigrationServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listMigrationJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMigrationJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListMigrationJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "migration_job.name", String.valueOf(request.getMigrationJob().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings startMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(StartMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings stopMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(StopMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings resumeMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resumeMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ResumeMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings promoteMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(promoteMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(PromoteMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings verifyMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(verifyMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(VerifyMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings restartMigrationJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restartMigrationJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RestartMigrationJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings generateSshScriptTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(generateSshScriptMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GenerateSshScriptRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("migration_job", String.valueOf(request.getMigrationJob())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listConnectionProfilesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listConnectionProfilesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListConnectionProfilesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getConnectionProfileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getConnectionProfileMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetConnectionProfileRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createConnectionProfileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createConnectionProfileMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateConnectionProfileRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateConnectionProfileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateConnectionProfileMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateConnectionProfileRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "connection_profile.name", + String.valueOf(request.getConnectionProfile().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteConnectionProfileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteConnectionProfileMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteConnectionProfileRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listMigrationJobsCallable = + callableFactory.createUnaryCallable( + listMigrationJobsTransportSettings, + settings.listMigrationJobsSettings(), + clientContext); + this.listMigrationJobsPagedCallable = + callableFactory.createPagedCallable( + listMigrationJobsTransportSettings, + settings.listMigrationJobsSettings(), + clientContext); + this.getMigrationJobCallable = + callableFactory.createUnaryCallable( + getMigrationJobTransportSettings, settings.getMigrationJobSettings(), clientContext); + this.createMigrationJobCallable = + callableFactory.createUnaryCallable( + createMigrationJobTransportSettings, + settings.createMigrationJobSettings(), + clientContext); + this.createMigrationJobOperationCallable = + callableFactory.createOperationCallable( + createMigrationJobTransportSettings, + settings.createMigrationJobOperationSettings(), + clientContext, + operationsStub); + this.updateMigrationJobCallable = + callableFactory.createUnaryCallable( + updateMigrationJobTransportSettings, + settings.updateMigrationJobSettings(), + clientContext); + this.updateMigrationJobOperationCallable = + callableFactory.createOperationCallable( + updateMigrationJobTransportSettings, + settings.updateMigrationJobOperationSettings(), + clientContext, + operationsStub); + this.deleteMigrationJobCallable = + callableFactory.createUnaryCallable( + deleteMigrationJobTransportSettings, + settings.deleteMigrationJobSettings(), + clientContext); + this.deleteMigrationJobOperationCallable = + callableFactory.createOperationCallable( + deleteMigrationJobTransportSettings, + settings.deleteMigrationJobOperationSettings(), + clientContext, + operationsStub); + this.startMigrationJobCallable = + callableFactory.createUnaryCallable( + startMigrationJobTransportSettings, + settings.startMigrationJobSettings(), + clientContext); + this.startMigrationJobOperationCallable = + callableFactory.createOperationCallable( + startMigrationJobTransportSettings, + settings.startMigrationJobOperationSettings(), + clientContext, + operationsStub); + this.stopMigrationJobCallable = + callableFactory.createUnaryCallable( + stopMigrationJobTransportSettings, settings.stopMigrationJobSettings(), clientContext); + this.stopMigrationJobOperationCallable = + callableFactory.createOperationCallable( + stopMigrationJobTransportSettings, + settings.stopMigrationJobOperationSettings(), + clientContext, + operationsStub); + this.resumeMigrationJobCallable = + callableFactory.createUnaryCallable( + resumeMigrationJobTransportSettings, + settings.resumeMigrationJobSettings(), + clientContext); + this.resumeMigrationJobOperationCallable = + callableFactory.createOperationCallable( + resumeMigrationJobTransportSettings, + settings.resumeMigrationJobOperationSettings(), + clientContext, + operationsStub); + this.promoteMigrationJobCallable = + callableFactory.createUnaryCallable( + promoteMigrationJobTransportSettings, + settings.promoteMigrationJobSettings(), + clientContext); + this.promoteMigrationJobOperationCallable = + callableFactory.createOperationCallable( + promoteMigrationJobTransportSettings, + settings.promoteMigrationJobOperationSettings(), + clientContext, + operationsStub); + this.verifyMigrationJobCallable = + callableFactory.createUnaryCallable( + verifyMigrationJobTransportSettings, + settings.verifyMigrationJobSettings(), + clientContext); + this.verifyMigrationJobOperationCallable = + callableFactory.createOperationCallable( + verifyMigrationJobTransportSettings, + settings.verifyMigrationJobOperationSettings(), + clientContext, + operationsStub); + this.restartMigrationJobCallable = + callableFactory.createUnaryCallable( + restartMigrationJobTransportSettings, + settings.restartMigrationJobSettings(), + clientContext); + this.restartMigrationJobOperationCallable = + callableFactory.createOperationCallable( + restartMigrationJobTransportSettings, + settings.restartMigrationJobOperationSettings(), + clientContext, + operationsStub); + this.generateSshScriptCallable = + callableFactory.createUnaryCallable( + generateSshScriptTransportSettings, + settings.generateSshScriptSettings(), + clientContext); + this.listConnectionProfilesCallable = + callableFactory.createUnaryCallable( + listConnectionProfilesTransportSettings, + settings.listConnectionProfilesSettings(), + clientContext); + this.listConnectionProfilesPagedCallable = + callableFactory.createPagedCallable( + listConnectionProfilesTransportSettings, + settings.listConnectionProfilesSettings(), + clientContext); + this.getConnectionProfileCallable = + callableFactory.createUnaryCallable( + getConnectionProfileTransportSettings, + settings.getConnectionProfileSettings(), + clientContext); + this.createConnectionProfileCallable = + callableFactory.createUnaryCallable( + createConnectionProfileTransportSettings, + settings.createConnectionProfileSettings(), + clientContext); + this.createConnectionProfileOperationCallable = + callableFactory.createOperationCallable( + createConnectionProfileTransportSettings, + settings.createConnectionProfileOperationSettings(), + clientContext, + operationsStub); + this.updateConnectionProfileCallable = + callableFactory.createUnaryCallable( + updateConnectionProfileTransportSettings, + settings.updateConnectionProfileSettings(), + clientContext); + this.updateConnectionProfileOperationCallable = + callableFactory.createOperationCallable( + updateConnectionProfileTransportSettings, + settings.updateConnectionProfileOperationSettings(), + clientContext, + operationsStub); + this.deleteConnectionProfileCallable = + callableFactory.createUnaryCallable( + deleteConnectionProfileTransportSettings, + settings.deleteConnectionProfileSettings(), + clientContext); + this.deleteConnectionProfileOperationCallable = + callableFactory.createOperationCallable( + deleteConnectionProfileTransportSettings, + settings.deleteConnectionProfileOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listMigrationJobsCallable() { + return listMigrationJobsCallable; + } + + @Override + public UnaryCallable + listMigrationJobsPagedCallable() { + return listMigrationJobsPagedCallable; + } + + @Override + public UnaryCallable getMigrationJobCallable() { + return getMigrationJobCallable; + } + + @Override + public UnaryCallable createMigrationJobCallable() { + return createMigrationJobCallable; + } + + @Override + public OperationCallable + createMigrationJobOperationCallable() { + return createMigrationJobOperationCallable; + } + + @Override + public UnaryCallable updateMigrationJobCallable() { + return updateMigrationJobCallable; + } + + @Override + public OperationCallable + updateMigrationJobOperationCallable() { + return updateMigrationJobOperationCallable; + } + + @Override + public UnaryCallable deleteMigrationJobCallable() { + return deleteMigrationJobCallable; + } + + @Override + public OperationCallable + deleteMigrationJobOperationCallable() { + return deleteMigrationJobOperationCallable; + } + + @Override + public UnaryCallable startMigrationJobCallable() { + return startMigrationJobCallable; + } + + @Override + public OperationCallable + startMigrationJobOperationCallable() { + return startMigrationJobOperationCallable; + } + + @Override + public UnaryCallable stopMigrationJobCallable() { + return stopMigrationJobCallable; + } + + @Override + public OperationCallable + stopMigrationJobOperationCallable() { + return stopMigrationJobOperationCallable; + } + + @Override + public UnaryCallable resumeMigrationJobCallable() { + return resumeMigrationJobCallable; + } + + @Override + public OperationCallable + resumeMigrationJobOperationCallable() { + return resumeMigrationJobOperationCallable; + } + + @Override + public UnaryCallable promoteMigrationJobCallable() { + return promoteMigrationJobCallable; + } + + @Override + public OperationCallable + promoteMigrationJobOperationCallable() { + return promoteMigrationJobOperationCallable; + } + + @Override + public UnaryCallable verifyMigrationJobCallable() { + return verifyMigrationJobCallable; + } + + @Override + public OperationCallable + verifyMigrationJobOperationCallable() { + return verifyMigrationJobOperationCallable; + } + + @Override + public UnaryCallable restartMigrationJobCallable() { + return restartMigrationJobCallable; + } + + @Override + public OperationCallable + restartMigrationJobOperationCallable() { + return restartMigrationJobOperationCallable; + } + + @Override + public UnaryCallable generateSshScriptCallable() { + return generateSshScriptCallable; + } + + @Override + public UnaryCallable + listConnectionProfilesCallable() { + return listConnectionProfilesCallable; + } + + @Override + public UnaryCallable + listConnectionProfilesPagedCallable() { + return listConnectionProfilesPagedCallable; + } + + @Override + public UnaryCallable + getConnectionProfileCallable() { + return getConnectionProfileCallable; + } + + @Override + public UnaryCallable + createConnectionProfileCallable() { + return createConnectionProfileCallable; + } + + @Override + public OperationCallable + createConnectionProfileOperationCallable() { + return createConnectionProfileOperationCallable; + } + + @Override + public UnaryCallable + updateConnectionProfileCallable() { + return updateConnectionProfileCallable; + } + + @Override + public OperationCallable + updateConnectionProfileOperationCallable() { + return updateConnectionProfileOperationCallable; + } + + @Override + public UnaryCallable + deleteConnectionProfileCallable() { + return deleteConnectionProfileCallable; + } + + @Override + public OperationCallable + deleteConnectionProfileOperationCallable() { + return deleteConnectionProfileOperationCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @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/google-cloud-dms/src/test/java/com/google/cloud/clouddms/v1/DataMigrationServiceClientTest.java b/google-cloud-dms/src/test/java/com/google/cloud/clouddms/v1/DataMigrationServiceClientTest.java new file mode 100644 index 00000000..86937348 --- /dev/null +++ b/google-cloud-dms/src/test/java/com/google/cloud/clouddms/v1/DataMigrationServiceClientTest.java @@ -0,0 +1,1448 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.v1; + +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListConnectionProfilesPagedResponse; +import static com.google.cloud.clouddms.v1.DataMigrationServiceClient.ListMigrationJobsPagedResponse; + +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.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +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 DataMigrationServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private DataMigrationServiceClient client; + private static MockDataMigrationService mockDataMigrationService; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockDataMigrationService = new MockDataMigrationService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDataMigrationService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataMigrationServiceSettings settings = + DataMigrationServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataMigrationServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listMigrationJobsTest() throws Exception { + MigrationJob responsesElement = MigrationJob.newBuilder().build(); + ListMigrationJobsResponse expectedResponse = + ListMigrationJobsResponse.newBuilder() + .setNextPageToken("") + .addAllMigrationJobs(Arrays.asList(responsesElement)) + .build(); + mockDataMigrationService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListMigrationJobsPagedResponse pagedListResponse = client.listMigrationJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMigrationJobsList().get(0), resources.get(0)); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMigrationJobsRequest actualRequest = ((ListMigrationJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMigrationJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listMigrationJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMigrationJobsTest2() throws Exception { + MigrationJob responsesElement = MigrationJob.newBuilder().build(); + ListMigrationJobsResponse expectedResponse = + ListMigrationJobsResponse.newBuilder() + .setNextPageToken("") + .addAllMigrationJobs(Arrays.asList(responsesElement)) + .build(); + mockDataMigrationService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMigrationJobsPagedResponse pagedListResponse = client.listMigrationJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMigrationJobsList().get(0), resources.get(0)); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMigrationJobsRequest actualRequest = ((ListMigrationJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMigrationJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMigrationJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMigrationJobTest() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDataMigrationService.addResponse(expectedResponse); + + MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]"); + + MigrationJob actualResponse = client.getMigrationJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMigrationJobRequest actualRequest = ((GetMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]"); + client.getMigrationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMigrationJobTest2() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDataMigrationService.addResponse(expectedResponse); + + String name = "name3373707"; + + MigrationJob actualResponse = client.getMigrationJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMigrationJobRequest actualRequest = ((GetMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMigrationJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + String name = "name3373707"; + client.getMigrationJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMigrationJobTest() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + MigrationJob migrationJob = MigrationJob.newBuilder().build(); + String migrationJobId = "migrationJobId1870575242"; + + MigrationJob actualResponse = + client.createMigrationJobAsync(parent, migrationJob, migrationJobId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMigrationJobRequest actualRequest = ((CreateMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(migrationJob, actualRequest.getMigrationJob()); + Assert.assertEquals(migrationJobId, actualRequest.getMigrationJobId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + MigrationJob migrationJob = MigrationJob.newBuilder().build(); + String migrationJobId = "migrationJobId1870575242"; + client.createMigrationJobAsync(parent, migrationJob, migrationJobId).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 createMigrationJobTest2() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + String parent = "parent-995424086"; + MigrationJob migrationJob = MigrationJob.newBuilder().build(); + String migrationJobId = "migrationJobId1870575242"; + + MigrationJob actualResponse = + client.createMigrationJobAsync(parent, migrationJob, migrationJobId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMigrationJobRequest actualRequest = ((CreateMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(migrationJob, actualRequest.getMigrationJob()); + Assert.assertEquals(migrationJobId, actualRequest.getMigrationJobId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMigrationJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + String parent = "parent-995424086"; + MigrationJob migrationJob = MigrationJob.newBuilder().build(); + String migrationJobId = "migrationJobId1870575242"; + client.createMigrationJobAsync(parent, migrationJob, migrationJobId).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 updateMigrationJobTest() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + MigrationJob migrationJob = MigrationJob.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MigrationJob actualResponse = client.updateMigrationJobAsync(migrationJob, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateMigrationJobRequest actualRequest = ((UpdateMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(migrationJob, actualRequest.getMigrationJob()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + MigrationJob migrationJob = MigrationJob.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMigrationJobAsync(migrationJob, 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 deleteMigrationJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]"); + + client.deleteMigrationJobAsync(name).get(); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMigrationJobRequest actualRequest = ((DeleteMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + MigrationJobName name = MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]"); + client.deleteMigrationJobAsync(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 deleteMigrationJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteMigrationJobAsync(name).get(); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMigrationJobRequest actualRequest = ((DeleteMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMigrationJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + String name = "name3373707"; + client.deleteMigrationJobAsync(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 startMigrationJobTest() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + StartMigrationJobRequest request = + StartMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + + MigrationJob actualResponse = client.startMigrationJobAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartMigrationJobRequest actualRequest = ((StartMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + StartMigrationJobRequest request = + StartMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + client.startMigrationJobAsync(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 stopMigrationJobTest() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + StopMigrationJobRequest request = + StopMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + + MigrationJob actualResponse = client.stopMigrationJobAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopMigrationJobRequest actualRequest = ((StopMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + StopMigrationJobRequest request = + StopMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + client.stopMigrationJobAsync(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 resumeMigrationJobTest() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resumeMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + ResumeMigrationJobRequest request = + ResumeMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + + MigrationJob actualResponse = client.resumeMigrationJobAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResumeMigrationJobRequest actualRequest = ((ResumeMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resumeMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + ResumeMigrationJobRequest request = + ResumeMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + client.resumeMigrationJobAsync(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 promoteMigrationJobTest() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("promoteMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + PromoteMigrationJobRequest request = + PromoteMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + + MigrationJob actualResponse = client.promoteMigrationJobAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PromoteMigrationJobRequest actualRequest = ((PromoteMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void promoteMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + PromoteMigrationJobRequest request = + PromoteMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + client.promoteMigrationJobAsync(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 verifyMigrationJobTest() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("verifyMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + VerifyMigrationJobRequest request = + VerifyMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + + MigrationJob actualResponse = client.verifyMigrationJobAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + VerifyMigrationJobRequest actualRequest = ((VerifyMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void verifyMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + VerifyMigrationJobRequest request = + VerifyMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + client.verifyMigrationJobAsync(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 restartMigrationJobTest() throws Exception { + MigrationJob expectedResponse = + MigrationJob.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDumpPath("dumpPath-2122385351") + .setSource("source-896505829") + .setDestination("destination-1429847026") + .setDuration(Duration.newBuilder().build()) + .setError(Status.newBuilder().build()) + .setSourceDatabase(DatabaseType.newBuilder().build()) + .setDestinationDatabase(DatabaseType.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restartMigrationJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + RestartMigrationJobRequest request = + RestartMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + + MigrationJob actualResponse = client.restartMigrationJobAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestartMigrationJobRequest actualRequest = ((RestartMigrationJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restartMigrationJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + RestartMigrationJobRequest request = + RestartMigrationJobRequest.newBuilder() + .setName(MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .build(); + client.restartMigrationJobAsync(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 generateSshScriptTest() throws Exception { + SshScript expectedResponse = SshScript.newBuilder().setScript("script-907685685").build(); + mockDataMigrationService.addResponse(expectedResponse); + + GenerateSshScriptRequest request = + GenerateSshScriptRequest.newBuilder() + .setMigrationJob( + MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setVm("vm3767") + .setVmPort(563010825) + .build(); + + SshScript actualResponse = client.generateSshScript(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateSshScriptRequest actualRequest = ((GenerateSshScriptRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getMigrationJob(), actualRequest.getMigrationJob()); + Assert.assertEquals(request.getVm(), actualRequest.getVm()); + Assert.assertEquals(request.getVmCreationConfig(), actualRequest.getVmCreationConfig()); + Assert.assertEquals(request.getVmSelectionConfig(), actualRequest.getVmSelectionConfig()); + Assert.assertEquals(request.getVmPort(), actualRequest.getVmPort()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateSshScriptExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + GenerateSshScriptRequest request = + GenerateSshScriptRequest.newBuilder() + .setMigrationJob( + MigrationJobName.of("[PROJECT]", "[LOCATION]", "[MIGRATION_JOB]").toString()) + .setVm("vm3767") + .setVmPort(563010825) + .build(); + client.generateSshScript(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConnectionProfilesTest() throws Exception { + ConnectionProfile responsesElement = ConnectionProfile.newBuilder().build(); + ListConnectionProfilesResponse expectedResponse = + ListConnectionProfilesResponse.newBuilder() + .setNextPageToken("") + .addAllConnectionProfiles(Arrays.asList(responsesElement)) + .build(); + mockDataMigrationService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListConnectionProfilesPagedResponse pagedListResponse = client.listConnectionProfiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConnectionProfilesList().get(0), resources.get(0)); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConnectionProfilesRequest actualRequest = + ((ListConnectionProfilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConnectionProfilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listConnectionProfiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConnectionProfilesTest2() throws Exception { + ConnectionProfile responsesElement = ConnectionProfile.newBuilder().build(); + ListConnectionProfilesResponse expectedResponse = + ListConnectionProfilesResponse.newBuilder() + .setNextPageToken("") + .addAllConnectionProfiles(Arrays.asList(responsesElement)) + .build(); + mockDataMigrationService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListConnectionProfilesPagedResponse pagedListResponse = client.listConnectionProfiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConnectionProfilesList().get(0), resources.get(0)); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConnectionProfilesRequest actualRequest = + ((ListConnectionProfilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConnectionProfilesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listConnectionProfiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConnectionProfileTest() throws Exception { + ConnectionProfile expectedResponse = + ConnectionProfile.newBuilder() + .setName( + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setError(Status.newBuilder().build()) + .setProvider(DatabaseProvider.forNumber(0)) + .build(); + mockDataMigrationService.addResponse(expectedResponse); + + ConnectionProfileName name = + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]"); + + ConnectionProfile actualResponse = client.getConnectionProfile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConnectionProfileRequest actualRequest = + ((GetConnectionProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConnectionProfileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + ConnectionProfileName name = + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]"); + client.getConnectionProfile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConnectionProfileTest2() throws Exception { + ConnectionProfile expectedResponse = + ConnectionProfile.newBuilder() + .setName( + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setError(Status.newBuilder().build()) + .setProvider(DatabaseProvider.forNumber(0)) + .build(); + mockDataMigrationService.addResponse(expectedResponse); + + String name = "name3373707"; + + ConnectionProfile actualResponse = client.getConnectionProfile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConnectionProfileRequest actualRequest = + ((GetConnectionProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConnectionProfileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + String name = "name3373707"; + client.getConnectionProfile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConnectionProfileTest() throws Exception { + ConnectionProfile expectedResponse = + ConnectionProfile.newBuilder() + .setName( + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setError(Status.newBuilder().build()) + .setProvider(DatabaseProvider.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createConnectionProfileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + ConnectionProfileName parent = + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]"); + ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build(); + String connectionProfileId = "connectionProfileId597575526"; + + ConnectionProfile actualResponse = + client.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConnectionProfileRequest actualRequest = + ((CreateConnectionProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(connectionProfile, actualRequest.getConnectionProfile()); + Assert.assertEquals(connectionProfileId, actualRequest.getConnectionProfileId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConnectionProfileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + ConnectionProfileName parent = + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]"); + ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build(); + String connectionProfileId = "connectionProfileId597575526"; + client.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId).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 createConnectionProfileTest2() throws Exception { + ConnectionProfile expectedResponse = + ConnectionProfile.newBuilder() + .setName( + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setError(Status.newBuilder().build()) + .setProvider(DatabaseProvider.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createConnectionProfileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + String parent = "parent-995424086"; + ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build(); + String connectionProfileId = "connectionProfileId597575526"; + + ConnectionProfile actualResponse = + client.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConnectionProfileRequest actualRequest = + ((CreateConnectionProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(connectionProfile, actualRequest.getConnectionProfile()); + Assert.assertEquals(connectionProfileId, actualRequest.getConnectionProfileId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConnectionProfileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + String parent = "parent-995424086"; + ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build(); + String connectionProfileId = "connectionProfileId597575526"; + client.createConnectionProfileAsync(parent, connectionProfile, connectionProfileId).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 updateConnectionProfileTest() throws Exception { + ConnectionProfile expectedResponse = + ConnectionProfile.newBuilder() + .setName( + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setError(Status.newBuilder().build()) + .setProvider(DatabaseProvider.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateConnectionProfileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ConnectionProfile actualResponse = + client.updateConnectionProfileAsync(connectionProfile, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateConnectionProfileRequest actualRequest = + ((UpdateConnectionProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(connectionProfile, actualRequest.getConnectionProfile()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateConnectionProfileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateConnectionProfileAsync(connectionProfile, 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 deleteConnectionProfileTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteConnectionProfileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + ConnectionProfileName name = + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]"); + + client.deleteConnectionProfileAsync(name).get(); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConnectionProfileRequest actualRequest = + ((DeleteConnectionProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConnectionProfileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + ConnectionProfileName name = + ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]"); + client.deleteConnectionProfileAsync(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 deleteConnectionProfileTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteConnectionProfileTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataMigrationService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteConnectionProfileAsync(name).get(); + + List actualRequests = mockDataMigrationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConnectionProfileRequest actualRequest = + ((DeleteConnectionProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConnectionProfileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataMigrationService.addException(exception); + + try { + String name = "name3373707"; + client.deleteConnectionProfileAsync(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()); + } + } +} diff --git a/google-cloud-dms/src/test/java/com/google/cloud/clouddms/v1/MockDataMigrationService.java b/google-cloud-dms/src/test/java/com/google/cloud/clouddms/v1/MockDataMigrationService.java new file mode 100644 index 00000000..7578fff9 --- /dev/null +++ b/google-cloud-dms/src/test/java/com/google/cloud/clouddms/v1/MockDataMigrationService.java @@ -0,0 +1,59 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.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 MockDataMigrationService implements MockGrpcService { + private final MockDataMigrationServiceImpl serviceImpl; + + public MockDataMigrationService() { + serviceImpl = new MockDataMigrationServiceImpl(); + } + + @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/google-cloud-dms/src/test/java/com/google/cloud/clouddms/v1/MockDataMigrationServiceImpl.java b/google-cloud-dms/src/test/java/com/google/cloud/clouddms/v1/MockDataMigrationServiceImpl.java new file mode 100644 index 00000000..9ab69e17 --- /dev/null +++ b/google-cloud-dms/src/test/java/com/google/cloud/clouddms/v1/MockDataMigrationServiceImpl.java @@ -0,0 +1,420 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.clouddms.v1.DataMigrationServiceGrpc.DataMigrationServiceImplBase; +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 MockDataMigrationServiceImpl extends DataMigrationServiceImplBase { + private List requests; + private Queue responses; + + public MockDataMigrationServiceImpl() { + 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 listMigrationJobs( + ListMigrationJobsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListMigrationJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListMigrationJobsResponse) 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 ListMigrationJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListMigrationJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getMigrationJob( + GetMigrationJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MigrationJob) { + requests.add(request); + responseObserver.onNext(((MigrationJob) 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 GetMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MigrationJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createMigrationJob( + CreateMigrationJobRequest 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 CreateMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateMigrationJob( + UpdateMigrationJobRequest 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 UpdateMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteMigrationJob( + DeleteMigrationJobRequest 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 DeleteMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void startMigrationJob( + StartMigrationJobRequest 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 StartMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void stopMigrationJob( + StopMigrationJobRequest 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 StopMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resumeMigrationJob( + ResumeMigrationJobRequest 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 ResumeMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void promoteMigrationJob( + PromoteMigrationJobRequest 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 PromoteMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void verifyMigrationJob( + VerifyMigrationJobRequest 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 VerifyMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void restartMigrationJob( + RestartMigrationJobRequest 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 RestartMigrationJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void generateSshScript( + GenerateSshScriptRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SshScript) { + requests.add(request); + responseObserver.onNext(((SshScript) 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 GenerateSshScript, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SshScript.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listConnectionProfiles( + ListConnectionProfilesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListConnectionProfilesResponse) { + requests.add(request); + responseObserver.onNext(((ListConnectionProfilesResponse) 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 ListConnectionProfiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListConnectionProfilesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getConnectionProfile( + GetConnectionProfileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ConnectionProfile) { + requests.add(request); + responseObserver.onNext(((ConnectionProfile) 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 GetConnectionProfile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ConnectionProfile.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createConnectionProfile( + CreateConnectionProfileRequest 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 CreateConnectionProfile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateConnectionProfile( + UpdateConnectionProfileRequest 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 UpdateConnectionProfile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteConnectionProfile( + DeleteConnectionProfileRequest 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 DeleteConnectionProfile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-cloud-dms-v1/pom.xml b/grpc-google-cloud-dms-v1/pom.xml new file mode 100644 index 00000000..6df31285 --- /dev/null +++ b/grpc-google-cloud-dms-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-dms-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-dms-v1 + GRPC library for google-cloud-dms + + com.google.cloud + google-cloud-dms-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-dms-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DataMigrationServiceGrpc.java b/grpc-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DataMigrationServiceGrpc.java new file mode 100644 index 00000000..6bc3a3c0 --- /dev/null +++ b/grpc-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DataMigrationServiceGrpc.java @@ -0,0 +1,2286 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.clouddms.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Database Migration service
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/clouddms/v1/clouddms.proto") +public final class DataMigrationServiceGrpc { + + private DataMigrationServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.clouddms.v1.DataMigrationService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.ListMigrationJobsRequest, + com.google.cloud.clouddms.v1.ListMigrationJobsResponse> + getListMigrationJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMigrationJobs", + requestType = com.google.cloud.clouddms.v1.ListMigrationJobsRequest.class, + responseType = com.google.cloud.clouddms.v1.ListMigrationJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.ListMigrationJobsRequest, + com.google.cloud.clouddms.v1.ListMigrationJobsResponse> + getListMigrationJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.ListMigrationJobsRequest, + com.google.cloud.clouddms.v1.ListMigrationJobsResponse> + getListMigrationJobsMethod; + if ((getListMigrationJobsMethod = DataMigrationServiceGrpc.getListMigrationJobsMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getListMigrationJobsMethod = DataMigrationServiceGrpc.getListMigrationJobsMethod) + == null) { + DataMigrationServiceGrpc.getListMigrationJobsMethod = + getListMigrationJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMigrationJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.ListMigrationJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.ListMigrationJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("ListMigrationJobs")) + .build(); + } + } + } + return getListMigrationJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.GetMigrationJobRequest, + com.google.cloud.clouddms.v1.MigrationJob> + getGetMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMigrationJob", + requestType = com.google.cloud.clouddms.v1.GetMigrationJobRequest.class, + responseType = com.google.cloud.clouddms.v1.MigrationJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.GetMigrationJobRequest, + com.google.cloud.clouddms.v1.MigrationJob> + getGetMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.GetMigrationJobRequest, + com.google.cloud.clouddms.v1.MigrationJob> + getGetMigrationJobMethod; + if ((getGetMigrationJobMethod = DataMigrationServiceGrpc.getGetMigrationJobMethod) == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getGetMigrationJobMethod = DataMigrationServiceGrpc.getGetMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getGetMigrationJobMethod = + getGetMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.GetMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("GetMigrationJob")) + .build(); + } + } + } + return getGetMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.CreateMigrationJobRequest, com.google.longrunning.Operation> + getCreateMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateMigrationJob", + requestType = com.google.cloud.clouddms.v1.CreateMigrationJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.CreateMigrationJobRequest, com.google.longrunning.Operation> + getCreateMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.CreateMigrationJobRequest, + com.google.longrunning.Operation> + getCreateMigrationJobMethod; + if ((getCreateMigrationJobMethod = DataMigrationServiceGrpc.getCreateMigrationJobMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getCreateMigrationJobMethod = DataMigrationServiceGrpc.getCreateMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getCreateMigrationJobMethod = + getCreateMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.CreateMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("CreateMigrationJob")) + .build(); + } + } + } + return getCreateMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest, com.google.longrunning.Operation> + getUpdateMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateMigrationJob", + requestType = com.google.cloud.clouddms.v1.UpdateMigrationJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest, com.google.longrunning.Operation> + getUpdateMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest, + com.google.longrunning.Operation> + getUpdateMigrationJobMethod; + if ((getUpdateMigrationJobMethod = DataMigrationServiceGrpc.getUpdateMigrationJobMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getUpdateMigrationJobMethod = DataMigrationServiceGrpc.getUpdateMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getUpdateMigrationJobMethod = + getUpdateMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("UpdateMigrationJob")) + .build(); + } + } + } + return getUpdateMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest, com.google.longrunning.Operation> + getDeleteMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteMigrationJob", + requestType = com.google.cloud.clouddms.v1.DeleteMigrationJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest, com.google.longrunning.Operation> + getDeleteMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest, + com.google.longrunning.Operation> + getDeleteMigrationJobMethod; + if ((getDeleteMigrationJobMethod = DataMigrationServiceGrpc.getDeleteMigrationJobMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getDeleteMigrationJobMethod = DataMigrationServiceGrpc.getDeleteMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getDeleteMigrationJobMethod = + getDeleteMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("DeleteMigrationJob")) + .build(); + } + } + } + return getDeleteMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.StartMigrationJobRequest, com.google.longrunning.Operation> + getStartMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartMigrationJob", + requestType = com.google.cloud.clouddms.v1.StartMigrationJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.StartMigrationJobRequest, com.google.longrunning.Operation> + getStartMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.StartMigrationJobRequest, com.google.longrunning.Operation> + getStartMigrationJobMethod; + if ((getStartMigrationJobMethod = DataMigrationServiceGrpc.getStartMigrationJobMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getStartMigrationJobMethod = DataMigrationServiceGrpc.getStartMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getStartMigrationJobMethod = + getStartMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.StartMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("StartMigrationJob")) + .build(); + } + } + } + return getStartMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.StopMigrationJobRequest, com.google.longrunning.Operation> + getStopMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopMigrationJob", + requestType = com.google.cloud.clouddms.v1.StopMigrationJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.StopMigrationJobRequest, com.google.longrunning.Operation> + getStopMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.StopMigrationJobRequest, com.google.longrunning.Operation> + getStopMigrationJobMethod; + if ((getStopMigrationJobMethod = DataMigrationServiceGrpc.getStopMigrationJobMethod) == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getStopMigrationJobMethod = DataMigrationServiceGrpc.getStopMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getStopMigrationJobMethod = + getStopMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.StopMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("StopMigrationJob")) + .build(); + } + } + } + return getStopMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest, com.google.longrunning.Operation> + getResumeMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResumeMigrationJob", + requestType = com.google.cloud.clouddms.v1.ResumeMigrationJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest, com.google.longrunning.Operation> + getResumeMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest, + com.google.longrunning.Operation> + getResumeMigrationJobMethod; + if ((getResumeMigrationJobMethod = DataMigrationServiceGrpc.getResumeMigrationJobMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getResumeMigrationJobMethod = DataMigrationServiceGrpc.getResumeMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getResumeMigrationJobMethod = + getResumeMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResumeMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("ResumeMigrationJob")) + .build(); + } + } + } + return getResumeMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest, com.google.longrunning.Operation> + getPromoteMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PromoteMigrationJob", + requestType = com.google.cloud.clouddms.v1.PromoteMigrationJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest, com.google.longrunning.Operation> + getPromoteMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest, + com.google.longrunning.Operation> + getPromoteMigrationJobMethod; + if ((getPromoteMigrationJobMethod = DataMigrationServiceGrpc.getPromoteMigrationJobMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getPromoteMigrationJobMethod = DataMigrationServiceGrpc.getPromoteMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getPromoteMigrationJobMethod = + getPromoteMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "PromoteMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("PromoteMigrationJob")) + .build(); + } + } + } + return getPromoteMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest, com.google.longrunning.Operation> + getVerifyMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "VerifyMigrationJob", + requestType = com.google.cloud.clouddms.v1.VerifyMigrationJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest, com.google.longrunning.Operation> + getVerifyMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest, + com.google.longrunning.Operation> + getVerifyMigrationJobMethod; + if ((getVerifyMigrationJobMethod = DataMigrationServiceGrpc.getVerifyMigrationJobMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getVerifyMigrationJobMethod = DataMigrationServiceGrpc.getVerifyMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getVerifyMigrationJobMethod = + getVerifyMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "VerifyMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("VerifyMigrationJob")) + .build(); + } + } + } + return getVerifyMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.RestartMigrationJobRequest, com.google.longrunning.Operation> + getRestartMigrationJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestartMigrationJob", + requestType = com.google.cloud.clouddms.v1.RestartMigrationJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.RestartMigrationJobRequest, com.google.longrunning.Operation> + getRestartMigrationJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.RestartMigrationJobRequest, + com.google.longrunning.Operation> + getRestartMigrationJobMethod; + if ((getRestartMigrationJobMethod = DataMigrationServiceGrpc.getRestartMigrationJobMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getRestartMigrationJobMethod = DataMigrationServiceGrpc.getRestartMigrationJobMethod) + == null) { + DataMigrationServiceGrpc.getRestartMigrationJobMethod = + getRestartMigrationJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RestartMigrationJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.RestartMigrationJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("RestartMigrationJob")) + .build(); + } + } + } + return getRestartMigrationJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.GenerateSshScriptRequest, + com.google.cloud.clouddms.v1.SshScript> + getGenerateSshScriptMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateSshScript", + requestType = com.google.cloud.clouddms.v1.GenerateSshScriptRequest.class, + responseType = com.google.cloud.clouddms.v1.SshScript.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.GenerateSshScriptRequest, + com.google.cloud.clouddms.v1.SshScript> + getGenerateSshScriptMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.GenerateSshScriptRequest, + com.google.cloud.clouddms.v1.SshScript> + getGenerateSshScriptMethod; + if ((getGenerateSshScriptMethod = DataMigrationServiceGrpc.getGenerateSshScriptMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getGenerateSshScriptMethod = DataMigrationServiceGrpc.getGenerateSshScriptMethod) + == null) { + DataMigrationServiceGrpc.getGenerateSshScriptMethod = + getGenerateSshScriptMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateSshScript")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.GenerateSshScriptRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.SshScript.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("GenerateSshScript")) + .build(); + } + } + } + return getGenerateSshScriptMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest, + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse> + getListConnectionProfilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListConnectionProfiles", + requestType = com.google.cloud.clouddms.v1.ListConnectionProfilesRequest.class, + responseType = com.google.cloud.clouddms.v1.ListConnectionProfilesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest, + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse> + getListConnectionProfilesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest, + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse> + getListConnectionProfilesMethod; + if ((getListConnectionProfilesMethod = DataMigrationServiceGrpc.getListConnectionProfilesMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getListConnectionProfilesMethod = + DataMigrationServiceGrpc.getListConnectionProfilesMethod) + == null) { + DataMigrationServiceGrpc.getListConnectionProfilesMethod = + getListConnectionProfilesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListConnectionProfiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier( + "ListConnectionProfiles")) + .build(); + } + } + } + return getListConnectionProfilesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.GetConnectionProfileRequest, + com.google.cloud.clouddms.v1.ConnectionProfile> + getGetConnectionProfileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetConnectionProfile", + requestType = com.google.cloud.clouddms.v1.GetConnectionProfileRequest.class, + responseType = com.google.cloud.clouddms.v1.ConnectionProfile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.GetConnectionProfileRequest, + com.google.cloud.clouddms.v1.ConnectionProfile> + getGetConnectionProfileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.GetConnectionProfileRequest, + com.google.cloud.clouddms.v1.ConnectionProfile> + getGetConnectionProfileMethod; + if ((getGetConnectionProfileMethod = DataMigrationServiceGrpc.getGetConnectionProfileMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getGetConnectionProfileMethod = DataMigrationServiceGrpc.getGetConnectionProfileMethod) + == null) { + DataMigrationServiceGrpc.getGetConnectionProfileMethod = + getGetConnectionProfileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetConnectionProfile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.GetConnectionProfileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier("GetConnectionProfile")) + .build(); + } + } + } + return getGetConnectionProfileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest, + com.google.longrunning.Operation> + getCreateConnectionProfileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateConnectionProfile", + requestType = com.google.cloud.clouddms.v1.CreateConnectionProfileRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest, + com.google.longrunning.Operation> + getCreateConnectionProfileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest, + com.google.longrunning.Operation> + getCreateConnectionProfileMethod; + if ((getCreateConnectionProfileMethod = + DataMigrationServiceGrpc.getCreateConnectionProfileMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getCreateConnectionProfileMethod = + DataMigrationServiceGrpc.getCreateConnectionProfileMethod) + == null) { + DataMigrationServiceGrpc.getCreateConnectionProfileMethod = + getCreateConnectionProfileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateConnectionProfile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier( + "CreateConnectionProfile")) + .build(); + } + } + } + return getCreateConnectionProfileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest, + com.google.longrunning.Operation> + getUpdateConnectionProfileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateConnectionProfile", + requestType = com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest, + com.google.longrunning.Operation> + getUpdateConnectionProfileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest, + com.google.longrunning.Operation> + getUpdateConnectionProfileMethod; + if ((getUpdateConnectionProfileMethod = + DataMigrationServiceGrpc.getUpdateConnectionProfileMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getUpdateConnectionProfileMethod = + DataMigrationServiceGrpc.getUpdateConnectionProfileMethod) + == null) { + DataMigrationServiceGrpc.getUpdateConnectionProfileMethod = + getUpdateConnectionProfileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateConnectionProfile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier( + "UpdateConnectionProfile")) + .build(); + } + } + } + return getUpdateConnectionProfileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest, + com.google.longrunning.Operation> + getDeleteConnectionProfileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteConnectionProfile", + requestType = com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest, + com.google.longrunning.Operation> + getDeleteConnectionProfileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest, + com.google.longrunning.Operation> + getDeleteConnectionProfileMethod; + if ((getDeleteConnectionProfileMethod = + DataMigrationServiceGrpc.getDeleteConnectionProfileMethod) + == null) { + synchronized (DataMigrationServiceGrpc.class) { + if ((getDeleteConnectionProfileMethod = + DataMigrationServiceGrpc.getDeleteConnectionProfileMethod) + == null) { + DataMigrationServiceGrpc.getDeleteConnectionProfileMethod = + getDeleteConnectionProfileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteConnectionProfile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataMigrationServiceMethodDescriptorSupplier( + "DeleteConnectionProfile")) + .build(); + } + } + } + return getDeleteConnectionProfileMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataMigrationServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataMigrationServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataMigrationServiceStub(channel, callOptions); + } + }; + return DataMigrationServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataMigrationServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataMigrationServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataMigrationServiceBlockingStub(channel, callOptions); + } + }; + return DataMigrationServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataMigrationServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataMigrationServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataMigrationServiceFutureStub(channel, callOptions); + } + }; + return DataMigrationServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Database Migration service
+   * 
+ */ + public abstract static class DataMigrationServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists migration jobs in a given project and location.
+     * 
+ */ + public void listMigrationJobs( + com.google.cloud.clouddms.v1.ListMigrationJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMigrationJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single migration job.
+     * 
+ */ + public void getMigrationJob( + com.google.cloud.clouddms.v1.GetMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new migration job in a given project and location.
+     * 
+ */ + public void createMigrationJob( + com.google.cloud.clouddms.v1.CreateMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single migration job.
+     * 
+ */ + public void updateMigrationJob( + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single migration job.
+     * 
+ */ + public void deleteMigrationJob( + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Start an already created migration job.
+     * 
+ */ + public void startMigrationJob( + com.google.cloud.clouddms.v1.StartMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStartMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Stops a running migration job.
+     * 
+ */ + public void stopMigrationJob( + com.google.cloud.clouddms.v1.StopMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStopMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Resume a migration job that is currently stopped and is resumable (was
+     * stopped during CDC phase).
+     * 
+ */ + public void resumeMigrationJob( + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResumeMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Promote a migration job, stopping replication to the destination and
+     * promoting the destination to be a standalone database.
+     * 
+ */ + public void promoteMigrationJob( + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPromoteMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Verify a migration job, making sure the destination can reach the source
+     * and that all configuration and prerequisites are met.
+     * 
+ */ + public void verifyMigrationJob( + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getVerifyMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Restart a stopped or failed migration job, resetting the destination
+     * instance to its original state and starting the migration process from
+     * scratch.
+     * 
+ */ + public void restartMigrationJob( + com.google.cloud.clouddms.v1.RestartMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRestartMigrationJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Generate a SSH configuration script to configure the reverse SSH
+     * connectivity.
+     * 
+ */ + public void generateSshScript( + com.google.cloud.clouddms.v1.GenerateSshScriptRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGenerateSshScriptMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieve a list of all connection profiles in a given project and location.
+     * 
+ */ + public void listConnectionProfiles( + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListConnectionProfilesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single connection profile.
+     * 
+ */ + public void getConnectionProfile( + com.google.cloud.clouddms.v1.GetConnectionProfileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetConnectionProfileMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new connection profile in a given project and location.
+     * 
+ */ + public void createConnectionProfile( + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateConnectionProfileMethod(), responseObserver); + } + + /** + * + * + *
+     * Update the configuration of a single connection profile.
+     * 
+ */ + public void updateConnectionProfile( + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateConnectionProfileMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Database Migration Service connection profile.
+     * A connection profile can only be deleted if it is not in use by any
+     * active migration jobs.
+     * 
+ */ + public void deleteConnectionProfile( + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteConnectionProfileMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListMigrationJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.ListMigrationJobsRequest, + com.google.cloud.clouddms.v1.ListMigrationJobsResponse>( + this, METHODID_LIST_MIGRATION_JOBS))) + .addMethod( + getGetMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.GetMigrationJobRequest, + com.google.cloud.clouddms.v1.MigrationJob>(this, METHODID_GET_MIGRATION_JOB))) + .addMethod( + getCreateMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.CreateMigrationJobRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_MIGRATION_JOB))) + .addMethod( + getUpdateMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_MIGRATION_JOB))) + .addMethod( + getDeleteMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_MIGRATION_JOB))) + .addMethod( + getStartMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.StartMigrationJobRequest, + com.google.longrunning.Operation>(this, METHODID_START_MIGRATION_JOB))) + .addMethod( + getStopMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.StopMigrationJobRequest, + com.google.longrunning.Operation>(this, METHODID_STOP_MIGRATION_JOB))) + .addMethod( + getResumeMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest, + com.google.longrunning.Operation>(this, METHODID_RESUME_MIGRATION_JOB))) + .addMethod( + getPromoteMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest, + com.google.longrunning.Operation>(this, METHODID_PROMOTE_MIGRATION_JOB))) + .addMethod( + getVerifyMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest, + com.google.longrunning.Operation>(this, METHODID_VERIFY_MIGRATION_JOB))) + .addMethod( + getRestartMigrationJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.RestartMigrationJobRequest, + com.google.longrunning.Operation>(this, METHODID_RESTART_MIGRATION_JOB))) + .addMethod( + getGenerateSshScriptMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.GenerateSshScriptRequest, + com.google.cloud.clouddms.v1.SshScript>(this, METHODID_GENERATE_SSH_SCRIPT))) + .addMethod( + getListConnectionProfilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest, + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse>( + this, METHODID_LIST_CONNECTION_PROFILES))) + .addMethod( + getGetConnectionProfileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.GetConnectionProfileRequest, + com.google.cloud.clouddms.v1.ConnectionProfile>( + this, METHODID_GET_CONNECTION_PROFILE))) + .addMethod( + getCreateConnectionProfileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_CONNECTION_PROFILE))) + .addMethod( + getUpdateConnectionProfileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_CONNECTION_PROFILE))) + .addMethod( + getDeleteConnectionProfileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_CONNECTION_PROFILE))) + .build(); + } + } + + /** + * + * + *
+   * Database Migration service
+   * 
+ */ + public static final class DataMigrationServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DataMigrationServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataMigrationServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataMigrationServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists migration jobs in a given project and location.
+     * 
+ */ + public void listMigrationJobs( + com.google.cloud.clouddms.v1.ListMigrationJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMigrationJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single migration job.
+     * 
+ */ + public void getMigrationJob( + com.google.cloud.clouddms.v1.GetMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new migration job in a given project and location.
+     * 
+ */ + public void createMigrationJob( + com.google.cloud.clouddms.v1.CreateMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single migration job.
+     * 
+ */ + public void updateMigrationJob( + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single migration job.
+     * 
+ */ + public void deleteMigrationJob( + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Start an already created migration job.
+     * 
+ */ + public void startMigrationJob( + com.google.cloud.clouddms.v1.StartMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStartMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stops a running migration job.
+     * 
+ */ + public void stopMigrationJob( + com.google.cloud.clouddms.v1.StopMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Resume a migration job that is currently stopped and is resumable (was
+     * stopped during CDC phase).
+     * 
+ */ + public void resumeMigrationJob( + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResumeMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Promote a migration job, stopping replication to the destination and
+     * promoting the destination to be a standalone database.
+     * 
+ */ + public void promoteMigrationJob( + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPromoteMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Verify a migration job, making sure the destination can reach the source
+     * and that all configuration and prerequisites are met.
+     * 
+ */ + public void verifyMigrationJob( + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getVerifyMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Restart a stopped or failed migration job, resetting the destination
+     * instance to its original state and starting the migration process from
+     * scratch.
+     * 
+ */ + public void restartMigrationJob( + com.google.cloud.clouddms.v1.RestartMigrationJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestartMigrationJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Generate a SSH configuration script to configure the reverse SSH
+     * connectivity.
+     * 
+ */ + public void generateSshScript( + com.google.cloud.clouddms.v1.GenerateSshScriptRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateSshScriptMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieve a list of all connection profiles in a given project and location.
+     * 
+ */ + public void listConnectionProfiles( + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListConnectionProfilesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single connection profile.
+     * 
+ */ + public void getConnectionProfile( + com.google.cloud.clouddms.v1.GetConnectionProfileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetConnectionProfileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new connection profile in a given project and location.
+     * 
+ */ + public void createConnectionProfile( + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateConnectionProfileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update the configuration of a single connection profile.
+     * 
+ */ + public void updateConnectionProfile( + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateConnectionProfileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Database Migration Service connection profile.
+     * A connection profile can only be deleted if it is not in use by any
+     * active migration jobs.
+     * 
+ */ + public void deleteConnectionProfile( + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteConnectionProfileMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Database Migration service
+   * 
+ */ + public static final class DataMigrationServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataMigrationServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataMigrationServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataMigrationServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists migration jobs in a given project and location.
+     * 
+ */ + public com.google.cloud.clouddms.v1.ListMigrationJobsResponse listMigrationJobs( + com.google.cloud.clouddms.v1.ListMigrationJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMigrationJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single migration job.
+     * 
+ */ + public com.google.cloud.clouddms.v1.MigrationJob getMigrationJob( + com.google.cloud.clouddms.v1.GetMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new migration job in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createMigrationJob( + com.google.cloud.clouddms.v1.CreateMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single migration job.
+     * 
+ */ + public com.google.longrunning.Operation updateMigrationJob( + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single migration job.
+     * 
+ */ + public com.google.longrunning.Operation deleteMigrationJob( + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Start an already created migration job.
+     * 
+ */ + public com.google.longrunning.Operation startMigrationJob( + com.google.cloud.clouddms.v1.StartMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStartMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops a running migration job.
+     * 
+ */ + public com.google.longrunning.Operation stopMigrationJob( + com.google.cloud.clouddms.v1.StopMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Resume a migration job that is currently stopped and is resumable (was
+     * stopped during CDC phase).
+     * 
+ */ + public com.google.longrunning.Operation resumeMigrationJob( + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResumeMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Promote a migration job, stopping replication to the destination and
+     * promoting the destination to be a standalone database.
+     * 
+ */ + public com.google.longrunning.Operation promoteMigrationJob( + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPromoteMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Verify a migration job, making sure the destination can reach the source
+     * and that all configuration and prerequisites are met.
+     * 
+ */ + public com.google.longrunning.Operation verifyMigrationJob( + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getVerifyMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Restart a stopped or failed migration job, resetting the destination
+     * instance to its original state and starting the migration process from
+     * scratch.
+     * 
+ */ + public com.google.longrunning.Operation restartMigrationJob( + com.google.cloud.clouddms.v1.RestartMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestartMigrationJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Generate a SSH configuration script to configure the reverse SSH
+     * connectivity.
+     * 
+ */ + public com.google.cloud.clouddms.v1.SshScript generateSshScript( + com.google.cloud.clouddms.v1.GenerateSshScriptRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateSshScriptMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieve a list of all connection profiles in a given project and location.
+     * 
+ */ + public com.google.cloud.clouddms.v1.ListConnectionProfilesResponse listConnectionProfiles( + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListConnectionProfilesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single connection profile.
+     * 
+ */ + public com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfile( + com.google.cloud.clouddms.v1.GetConnectionProfileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConnectionProfileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new connection profile in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createConnectionProfile( + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateConnectionProfileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update the configuration of a single connection profile.
+     * 
+ */ + public com.google.longrunning.Operation updateConnectionProfile( + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateConnectionProfileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Database Migration Service connection profile.
+     * A connection profile can only be deleted if it is not in use by any
+     * active migration jobs.
+     * 
+ */ + public com.google.longrunning.Operation deleteConnectionProfile( + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteConnectionProfileMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Database Migration service
+   * 
+ */ + public static final class DataMigrationServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataMigrationServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataMigrationServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataMigrationServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists migration jobs in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.clouddms.v1.ListMigrationJobsResponse> + listMigrationJobs(com.google.cloud.clouddms.v1.ListMigrationJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMigrationJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single migration job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.clouddms.v1.MigrationJob> + getMigrationJob(com.google.cloud.clouddms.v1.GetMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new migration job in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createMigrationJob(com.google.cloud.clouddms.v1.CreateMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single migration job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateMigrationJob(com.google.cloud.clouddms.v1.UpdateMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single migration job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteMigrationJob(com.google.cloud.clouddms.v1.DeleteMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Start an already created migration job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + startMigrationJob(com.google.cloud.clouddms.v1.StartMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStartMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Stops a running migration job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + stopMigrationJob(com.google.cloud.clouddms.v1.StopMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStopMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Resume a migration job that is currently stopped and is resumable (was
+     * stopped during CDC phase).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + resumeMigrationJob(com.google.cloud.clouddms.v1.ResumeMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResumeMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Promote a migration job, stopping replication to the destination and
+     * promoting the destination to be a standalone database.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + promoteMigrationJob(com.google.cloud.clouddms.v1.PromoteMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPromoteMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Verify a migration job, making sure the destination can reach the source
+     * and that all configuration and prerequisites are met.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + verifyMigrationJob(com.google.cloud.clouddms.v1.VerifyMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getVerifyMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Restart a stopped or failed migration job, resetting the destination
+     * instance to its original state and starting the migration process from
+     * scratch.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + restartMigrationJob(com.google.cloud.clouddms.v1.RestartMigrationJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestartMigrationJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Generate a SSH configuration script to configure the reverse SSH
+     * connectivity.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.clouddms.v1.SshScript> + generateSshScript(com.google.cloud.clouddms.v1.GenerateSshScriptRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateSshScriptMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieve a list of all connection profiles in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse> + listConnectionProfiles(com.google.cloud.clouddms.v1.ListConnectionProfilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListConnectionProfilesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single connection profile.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.clouddms.v1.ConnectionProfile> + getConnectionProfile(com.google.cloud.clouddms.v1.GetConnectionProfileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetConnectionProfileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new connection profile in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createConnectionProfile( + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateConnectionProfileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update the configuration of a single connection profile.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateConnectionProfile( + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateConnectionProfileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Database Migration Service connection profile.
+     * A connection profile can only be deleted if it is not in use by any
+     * active migration jobs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteConnectionProfile( + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteConnectionProfileMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_MIGRATION_JOBS = 0; + private static final int METHODID_GET_MIGRATION_JOB = 1; + private static final int METHODID_CREATE_MIGRATION_JOB = 2; + private static final int METHODID_UPDATE_MIGRATION_JOB = 3; + private static final int METHODID_DELETE_MIGRATION_JOB = 4; + private static final int METHODID_START_MIGRATION_JOB = 5; + private static final int METHODID_STOP_MIGRATION_JOB = 6; + private static final int METHODID_RESUME_MIGRATION_JOB = 7; + private static final int METHODID_PROMOTE_MIGRATION_JOB = 8; + private static final int METHODID_VERIFY_MIGRATION_JOB = 9; + private static final int METHODID_RESTART_MIGRATION_JOB = 10; + private static final int METHODID_GENERATE_SSH_SCRIPT = 11; + private static final int METHODID_LIST_CONNECTION_PROFILES = 12; + private static final int METHODID_GET_CONNECTION_PROFILE = 13; + private static final int METHODID_CREATE_CONNECTION_PROFILE = 14; + private static final int METHODID_UPDATE_CONNECTION_PROFILE = 15; + private static final int METHODID_DELETE_CONNECTION_PROFILE = 16; + + 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 DataMigrationServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DataMigrationServiceImplBase 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_MIGRATION_JOBS: + serviceImpl.listMigrationJobs( + (com.google.cloud.clouddms.v1.ListMigrationJobsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_MIGRATION_JOB: + serviceImpl.getMigrationJob( + (com.google.cloud.clouddms.v1.GetMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_MIGRATION_JOB: + serviceImpl.createMigrationJob( + (com.google.cloud.clouddms.v1.CreateMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_MIGRATION_JOB: + serviceImpl.updateMigrationJob( + (com.google.cloud.clouddms.v1.UpdateMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_MIGRATION_JOB: + serviceImpl.deleteMigrationJob( + (com.google.cloud.clouddms.v1.DeleteMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_MIGRATION_JOB: + serviceImpl.startMigrationJob( + (com.google.cloud.clouddms.v1.StartMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_STOP_MIGRATION_JOB: + serviceImpl.stopMigrationJob( + (com.google.cloud.clouddms.v1.StopMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESUME_MIGRATION_JOB: + serviceImpl.resumeMigrationJob( + (com.google.cloud.clouddms.v1.ResumeMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PROMOTE_MIGRATION_JOB: + serviceImpl.promoteMigrationJob( + (com.google.cloud.clouddms.v1.PromoteMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VERIFY_MIGRATION_JOB: + serviceImpl.verifyMigrationJob( + (com.google.cloud.clouddms.v1.VerifyMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTART_MIGRATION_JOB: + serviceImpl.restartMigrationJob( + (com.google.cloud.clouddms.v1.RestartMigrationJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GENERATE_SSH_SCRIPT: + serviceImpl.generateSshScript( + (com.google.cloud.clouddms.v1.GenerateSshScriptRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_CONNECTION_PROFILES: + serviceImpl.listConnectionProfiles( + (com.google.cloud.clouddms.v1.ListConnectionProfilesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse>) + responseObserver); + break; + case METHODID_GET_CONNECTION_PROFILE: + serviceImpl.getConnectionProfile( + (com.google.cloud.clouddms.v1.GetConnectionProfileRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_CONNECTION_PROFILE: + serviceImpl.createConnectionProfile( + (com.google.cloud.clouddms.v1.CreateConnectionProfileRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CONNECTION_PROFILE: + serviceImpl.updateConnectionProfile( + (com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CONNECTION_PROFILE: + serviceImpl.deleteConnectionProfile( + (com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest) 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 abstract static class DataMigrationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataMigrationServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataMigrationService"); + } + } + + private static final class DataMigrationServiceFileDescriptorSupplier + extends DataMigrationServiceBaseDescriptorSupplier { + DataMigrationServiceFileDescriptorSupplier() {} + } + + private static final class DataMigrationServiceMethodDescriptorSupplier + extends DataMigrationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataMigrationServiceMethodDescriptorSupplier(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 (DataMigrationServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataMigrationServiceFileDescriptorSupplier()) + .addMethod(getListMigrationJobsMethod()) + .addMethod(getGetMigrationJobMethod()) + .addMethod(getCreateMigrationJobMethod()) + .addMethod(getUpdateMigrationJobMethod()) + .addMethod(getDeleteMigrationJobMethod()) + .addMethod(getStartMigrationJobMethod()) + .addMethod(getStopMigrationJobMethod()) + .addMethod(getResumeMigrationJobMethod()) + .addMethod(getPromoteMigrationJobMethod()) + .addMethod(getVerifyMigrationJobMethod()) + .addMethod(getRestartMigrationJobMethod()) + .addMethod(getGenerateSshScriptMethod()) + .addMethod(getListConnectionProfilesMethod()) + .addMethod(getGetConnectionProfileMethod()) + .addMethod(getCreateConnectionProfileMethod()) + .addMethod(getUpdateConnectionProfileMethod()) + .addMethod(getDeleteConnectionProfileMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/pom.xml b/pom.xml index f474da5b..13fc0f1c 100644 --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,16 @@ 0.0.1-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-dms-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-dms-v1 + 0.0.1-SNAPSHOT + com.google.cloud google-cloud-shared-dependencies @@ -92,6 +102,8 @@ google-cloud-dms + grpc-google-cloud-dms-v1 + proto-google-cloud-dms-v1 google-cloud-dms-bom @@ -164,4 +176,4 @@ - \ No newline at end of file + diff --git a/proto-google-cloud-dms-v1/clirr-ignored-differences.xml b/proto-google-cloud-dms-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000..6046a3bd --- /dev/null +++ b/proto-google-cloud-dms-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/clouddms/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/clouddms/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/clouddms/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-dms-v1/pom.xml b/proto-google-cloud-dms-v1/pom.xml new file mode 100644 index 00000000..e926ce14 --- /dev/null +++ b/proto-google-cloud-dms-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-dms-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-dms-v1 + Proto library for google-cloud-dms + + com.google.cloud + google-cloud-dms-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlConnectionProfile.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlConnectionProfile.java new file mode 100644 index 00000000..5b1f07f3 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlConnectionProfile.java @@ -0,0 +1,1299 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Specifies required connection parameters, and, optionally, the parameters
+ * required to create a Cloud SQL destination database instance.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.CloudSqlConnectionProfile} + */ +public final class CloudSqlConnectionProfile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.CloudSqlConnectionProfile) + CloudSqlConnectionProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudSqlConnectionProfile.newBuilder() to construct. + private CloudSqlConnectionProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudSqlConnectionProfile() { + cloudSqlId_ = ""; + privateIp_ = ""; + publicIp_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudSqlConnectionProfile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CloudSqlConnectionProfile( + 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(); + + cloudSqlId_ = s; + break; + } + case 18: + { + com.google.cloud.clouddms.v1.CloudSqlSettings.Builder subBuilder = null; + if (settings_ != null) { + subBuilder = settings_.toBuilder(); + } + settings_ = + input.readMessage( + com.google.cloud.clouddms.v1.CloudSqlSettings.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(settings_); + settings_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + privateIp_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + publicIp_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.class, + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.Builder.class); + } + + public static final int CLOUD_SQL_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object cloudSqlId_; + /** + * + * + *
+   * Output only. The Cloud SQL instance ID that this connection profile is associated with.
+   * 
+ * + * string cloud_sql_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The cloudSqlId. + */ + @java.lang.Override + public java.lang.String getCloudSqlId() { + java.lang.Object ref = cloudSqlId_; + 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(); + cloudSqlId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Cloud SQL instance ID that this connection profile is associated with.
+   * 
+ * + * string cloud_sql_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for cloudSqlId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudSqlIdBytes() { + java.lang.Object ref = cloudSqlId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SETTINGS_FIELD_NUMBER = 2; + private com.google.cloud.clouddms.v1.CloudSqlSettings settings_; + /** + * + * + *
+   * Immutable. Metadata used to create the destination Cloud SQL database.
+   * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the settings field is set. + */ + @java.lang.Override + public boolean hasSettings() { + return settings_ != null; + } + /** + * + * + *
+   * Immutable. Metadata used to create the destination Cloud SQL database.
+   * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The settings. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings getSettings() { + return settings_ == null + ? com.google.cloud.clouddms.v1.CloudSqlSettings.getDefaultInstance() + : settings_; + } + /** + * + * + *
+   * Immutable. Metadata used to create the destination Cloud SQL database.
+   * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettingsOrBuilder getSettingsOrBuilder() { + return getSettings(); + } + + public static final int PRIVATE_IP_FIELD_NUMBER = 3; + private volatile java.lang.Object privateIp_; + /** + * + * + *
+   * Output only. The Cloud SQL database instance's private IP.
+   * 
+ * + * string private_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The privateIp. + */ + @java.lang.Override + public java.lang.String getPrivateIp() { + java.lang.Object ref = privateIp_; + 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(); + privateIp_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Cloud SQL database instance's private IP.
+   * 
+ * + * string private_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for privateIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrivateIpBytes() { + java.lang.Object ref = privateIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_IP_FIELD_NUMBER = 4; + private volatile java.lang.Object publicIp_; + /** + * + * + *
+   * Output only. The Cloud SQL database instance's public IP.
+   * 
+ * + * string public_ip = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicIp. + */ + @java.lang.Override + public java.lang.String getPublicIp() { + java.lang.Object ref = publicIp_; + 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(); + publicIp_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Cloud SQL database instance's public IP.
+   * 
+ * + * string public_ip = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicIpBytes() { + java.lang.Object ref = publicIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIp_ = 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 (!getCloudSqlIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cloudSqlId_); + } + if (settings_ != null) { + output.writeMessage(2, getSettings()); + } + if (!getPrivateIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, privateIp_); + } + if (!getPublicIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, publicIp_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCloudSqlIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cloudSqlId_); + } + if (settings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSettings()); + } + if (!getPrivateIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, privateIp_); + } + if (!getPublicIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, publicIp_); + } + 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.clouddms.v1.CloudSqlConnectionProfile)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile other = + (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) obj; + + if (!getCloudSqlId().equals(other.getCloudSqlId())) return false; + if (hasSettings() != other.hasSettings()) return false; + if (hasSettings()) { + if (!getSettings().equals(other.getSettings())) return false; + } + if (!getPrivateIp().equals(other.getPrivateIp())) return false; + if (!getPublicIp().equals(other.getPublicIp())) 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) + CLOUD_SQL_ID_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlId().hashCode(); + if (hasSettings()) { + hash = (37 * hash) + SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSettings().hashCode(); + } + hash = (37 * hash) + PRIVATE_IP_FIELD_NUMBER; + hash = (53 * hash) + getPrivateIp().hashCode(); + hash = (37 * hash) + PUBLIC_IP_FIELD_NUMBER; + hash = (53 * hash) + getPublicIp().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.CloudSqlConnectionProfile parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CloudSqlConnectionProfile 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.clouddms.v1.CloudSqlConnectionProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CloudSqlConnectionProfile 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.clouddms.v1.CloudSqlConnectionProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CloudSqlConnectionProfile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.CloudSqlConnectionProfile parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CloudSqlConnectionProfile 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.clouddms.v1.CloudSqlConnectionProfile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CloudSqlConnectionProfile 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.clouddms.v1.CloudSqlConnectionProfile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CloudSqlConnectionProfile 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.clouddms.v1.CloudSqlConnectionProfile 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; + } + /** + * + * + *
+   * Specifies required connection parameters, and, optionally, the parameters
+   * required to create a Cloud SQL destination database instance.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.CloudSqlConnectionProfile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.CloudSqlConnectionProfile) + com.google.cloud.clouddms.v1.CloudSqlConnectionProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.class, + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.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(); + cloudSqlId_ = ""; + + if (settingsBuilder_ == null) { + settings_ = null; + } else { + settings_ = null; + settingsBuilder_ = null; + } + privateIp_ = ""; + + publicIp_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlConnectionProfile getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlConnectionProfile build() { + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlConnectionProfile buildPartial() { + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile result = + new com.google.cloud.clouddms.v1.CloudSqlConnectionProfile(this); + result.cloudSqlId_ = cloudSqlId_; + if (settingsBuilder_ == null) { + result.settings_ = settings_; + } else { + result.settings_ = settingsBuilder_.build(); + } + result.privateIp_ = privateIp_; + result.publicIp_ = publicIp_; + 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.clouddms.v1.CloudSqlConnectionProfile) { + return mergeFrom((com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.CloudSqlConnectionProfile other) { + if (other == com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.getDefaultInstance()) + return this; + if (!other.getCloudSqlId().isEmpty()) { + cloudSqlId_ = other.cloudSqlId_; + onChanged(); + } + if (other.hasSettings()) { + mergeSettings(other.getSettings()); + } + if (!other.getPrivateIp().isEmpty()) { + privateIp_ = other.privateIp_; + onChanged(); + } + if (!other.getPublicIp().isEmpty()) { + publicIp_ = other.publicIp_; + 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.clouddms.v1.CloudSqlConnectionProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object cloudSqlId_ = ""; + /** + * + * + *
+     * Output only. The Cloud SQL instance ID that this connection profile is associated with.
+     * 
+ * + * string cloud_sql_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The cloudSqlId. + */ + public java.lang.String getCloudSqlId() { + java.lang.Object ref = cloudSqlId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud SQL instance ID that this connection profile is associated with.
+     * 
+ * + * string cloud_sql_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for cloudSqlId. + */ + public com.google.protobuf.ByteString getCloudSqlIdBytes() { + java.lang.Object ref = cloudSqlId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud SQL instance ID that this connection profile is associated with.
+     * 
+ * + * string cloud_sql_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The cloudSqlId to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudSqlId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud SQL instance ID that this connection profile is associated with.
+     * 
+ * + * string cloud_sql_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCloudSqlId() { + + cloudSqlId_ = getDefaultInstance().getCloudSqlId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud SQL instance ID that this connection profile is associated with.
+     * 
+ * + * string cloud_sql_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for cloudSqlId to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudSqlId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.clouddms.v1.CloudSqlSettings settings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.CloudSqlSettings, + com.google.cloud.clouddms.v1.CloudSqlSettings.Builder, + com.google.cloud.clouddms.v1.CloudSqlSettingsOrBuilder> + settingsBuilder_; + /** + * + * + *
+     * Immutable. Metadata used to create the destination Cloud SQL database.
+     * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the settings field is set. + */ + public boolean hasSettings() { + return settingsBuilder_ != null || settings_ != null; + } + /** + * + * + *
+     * Immutable. Metadata used to create the destination Cloud SQL database.
+     * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The settings. + */ + public com.google.cloud.clouddms.v1.CloudSqlSettings getSettings() { + if (settingsBuilder_ == null) { + return settings_ == null + ? com.google.cloud.clouddms.v1.CloudSqlSettings.getDefaultInstance() + : settings_; + } else { + return settingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. Metadata used to create the destination Cloud SQL database.
+     * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setSettings(com.google.cloud.clouddms.v1.CloudSqlSettings value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + settings_ = value; + onChanged(); + } else { + settingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Immutable. Metadata used to create the destination Cloud SQL database.
+     * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setSettings( + com.google.cloud.clouddms.v1.CloudSqlSettings.Builder builderForValue) { + if (settingsBuilder_ == null) { + settings_ = builderForValue.build(); + onChanged(); + } else { + settingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Immutable. Metadata used to create the destination Cloud SQL database.
+     * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeSettings(com.google.cloud.clouddms.v1.CloudSqlSettings value) { + if (settingsBuilder_ == null) { + if (settings_ != null) { + settings_ = + com.google.cloud.clouddms.v1.CloudSqlSettings.newBuilder(settings_) + .mergeFrom(value) + .buildPartial(); + } else { + settings_ = value; + } + onChanged(); + } else { + settingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Immutable. Metadata used to create the destination Cloud SQL database.
+     * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearSettings() { + if (settingsBuilder_ == null) { + settings_ = null; + onChanged(); + } else { + settings_ = null; + settingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Immutable. Metadata used to create the destination Cloud SQL database.
+     * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.clouddms.v1.CloudSqlSettings.Builder getSettingsBuilder() { + + onChanged(); + return getSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. Metadata used to create the destination Cloud SQL database.
+     * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.clouddms.v1.CloudSqlSettingsOrBuilder getSettingsOrBuilder() { + if (settingsBuilder_ != null) { + return settingsBuilder_.getMessageOrBuilder(); + } else { + return settings_ == null + ? com.google.cloud.clouddms.v1.CloudSqlSettings.getDefaultInstance() + : settings_; + } + } + /** + * + * + *
+     * Immutable. Metadata used to create the destination Cloud SQL database.
+     * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.CloudSqlSettings, + com.google.cloud.clouddms.v1.CloudSqlSettings.Builder, + com.google.cloud.clouddms.v1.CloudSqlSettingsOrBuilder> + getSettingsFieldBuilder() { + if (settingsBuilder_ == null) { + settingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.CloudSqlSettings, + com.google.cloud.clouddms.v1.CloudSqlSettings.Builder, + com.google.cloud.clouddms.v1.CloudSqlSettingsOrBuilder>( + getSettings(), getParentForChildren(), isClean()); + settings_ = null; + } + return settingsBuilder_; + } + + private java.lang.Object privateIp_ = ""; + /** + * + * + *
+     * Output only. The Cloud SQL database instance's private IP.
+     * 
+ * + * string private_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The privateIp. + */ + public java.lang.String getPrivateIp() { + java.lang.Object ref = privateIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud SQL database instance's private IP.
+     * 
+ * + * string private_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for privateIp. + */ + public com.google.protobuf.ByteString getPrivateIpBytes() { + java.lang.Object ref = privateIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud SQL database instance's private IP.
+     * 
+ * + * string private_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The privateIp to set. + * @return This builder for chaining. + */ + public Builder setPrivateIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + privateIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud SQL database instance's private IP.
+     * 
+ * + * string private_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPrivateIp() { + + privateIp_ = getDefaultInstance().getPrivateIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud SQL database instance's private IP.
+     * 
+ * + * string private_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for privateIp to set. + * @return This builder for chaining. + */ + public Builder setPrivateIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + privateIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object publicIp_ = ""; + /** + * + * + *
+     * Output only. The Cloud SQL database instance's public IP.
+     * 
+ * + * string public_ip = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicIp. + */ + public java.lang.String getPublicIp() { + java.lang.Object ref = publicIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud SQL database instance's public IP.
+     * 
+ * + * string public_ip = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicIp. + */ + public com.google.protobuf.ByteString getPublicIpBytes() { + java.lang.Object ref = publicIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud SQL database instance's public IP.
+     * 
+ * + * string public_ip = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The publicIp to set. + * @return This builder for chaining. + */ + public Builder setPublicIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud SQL database instance's public IP.
+     * 
+ * + * string public_ip = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPublicIp() { + + publicIp_ = getDefaultInstance().getPublicIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud SQL database instance's public IP.
+     * 
+ * + * string public_ip = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for publicIp to set. + * @return This builder for chaining. + */ + public Builder setPublicIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicIp_ = 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.clouddms.v1.CloudSqlConnectionProfile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.CloudSqlConnectionProfile) + private static final com.google.cloud.clouddms.v1.CloudSqlConnectionProfile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.CloudSqlConnectionProfile(); + } + + public static com.google.cloud.clouddms.v1.CloudSqlConnectionProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSqlConnectionProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudSqlConnectionProfile(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.clouddms.v1.CloudSqlConnectionProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlConnectionProfileOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlConnectionProfileOrBuilder.java new file mode 100644 index 00000000..4433a014 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlConnectionProfileOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface CloudSqlConnectionProfileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.CloudSqlConnectionProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The Cloud SQL instance ID that this connection profile is associated with.
+   * 
+ * + * string cloud_sql_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The cloudSqlId. + */ + java.lang.String getCloudSqlId(); + /** + * + * + *
+   * Output only. The Cloud SQL instance ID that this connection profile is associated with.
+   * 
+ * + * string cloud_sql_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for cloudSqlId. + */ + com.google.protobuf.ByteString getCloudSqlIdBytes(); + + /** + * + * + *
+   * Immutable. Metadata used to create the destination Cloud SQL database.
+   * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the settings field is set. + */ + boolean hasSettings(); + /** + * + * + *
+   * Immutable. Metadata used to create the destination Cloud SQL database.
+   * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The settings. + */ + com.google.cloud.clouddms.v1.CloudSqlSettings getSettings(); + /** + * + * + *
+   * Immutable. Metadata used to create the destination Cloud SQL database.
+   * 
+ * + * + * .google.cloud.clouddms.v1.CloudSqlSettings settings = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.clouddms.v1.CloudSqlSettingsOrBuilder getSettingsOrBuilder(); + + /** + * + * + *
+   * Output only. The Cloud SQL database instance's private IP.
+   * 
+ * + * string private_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The privateIp. + */ + java.lang.String getPrivateIp(); + /** + * + * + *
+   * Output only. The Cloud SQL database instance's private IP.
+   * 
+ * + * string private_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for privateIp. + */ + com.google.protobuf.ByteString getPrivateIpBytes(); + + /** + * + * + *
+   * Output only. The Cloud SQL database instance's public IP.
+   * 
+ * + * string public_ip = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicIp. + */ + java.lang.String getPublicIp(); + /** + * + * + *
+   * Output only. The Cloud SQL database instance's public IP.
+   * 
+ * + * string public_ip = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicIp. + */ + com.google.protobuf.ByteString getPublicIpBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlSettings.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlSettings.java new file mode 100644 index 00000000..01070b0b --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlSettings.java @@ -0,0 +1,4535 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Settings for creating a Cloud SQL database instance.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.CloudSqlSettings} + */ +public final class CloudSqlSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.CloudSqlSettings) + CloudSqlSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudSqlSettings.newBuilder() to construct. + private CloudSqlSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudSqlSettings() { + databaseVersion_ = 0; + tier_ = ""; + activationPolicy_ = 0; + dataDiskType_ = 0; + zone_ = ""; + sourceId_ = ""; + rootPassword_ = ""; + collation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudSqlSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CloudSqlSettings( + 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 8: + { + int rawValue = input.readEnum(); + + databaseVersion_ = rawValue; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + userLabels_ = + com.google.protobuf.MapField.newMapField( + UserLabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry userLabels__ = + input.readMessage( + UserLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + userLabels_.getMutableMap().put(userLabels__.getKey(), userLabels__.getValue()); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + tier_ = s; + break; + } + case 34: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (storageAutoResizeLimit_ != null) { + subBuilder = storageAutoResizeLimit_.toBuilder(); + } + storageAutoResizeLimit_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(storageAutoResizeLimit_); + storageAutoResizeLimit_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + int rawValue = input.readEnum(); + + activationPolicy_ = rawValue; + break; + } + case 50: + { + com.google.cloud.clouddms.v1.SqlIpConfig.Builder subBuilder = null; + if (ipConfig_ != null) { + subBuilder = ipConfig_.toBuilder(); + } + ipConfig_ = + input.readMessage( + com.google.cloud.clouddms.v1.SqlIpConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(ipConfig_); + ipConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.BoolValue.Builder subBuilder = null; + if (autoStorageIncrease_ != null) { + subBuilder = autoStorageIncrease_.toBuilder(); + } + autoStorageIncrease_ = + input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(autoStorageIncrease_); + autoStorageIncrease_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + databaseFlags_ = + com.google.protobuf.MapField.newMapField( + DatabaseFlagsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry databaseFlags__ = + input.readMessage( + DatabaseFlagsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + databaseFlags_ + .getMutableMap() + .put(databaseFlags__.getKey(), databaseFlags__.getValue()); + break; + } + case 72: + { + int rawValue = input.readEnum(); + + dataDiskType_ = rawValue; + break; + } + case 82: + { + com.google.protobuf.Int64Value.Builder subBuilder = null; + if (dataDiskSizeGb_ != null) { + subBuilder = dataDiskSizeGb_.toBuilder(); + } + dataDiskSizeGb_ = + input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataDiskSizeGb_); + dataDiskSizeGb_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + zone_ = s; + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceId_ = s; + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + rootPassword_ = s; + break; + } + case 112: + { + rootPasswordSet_ = input.readBool(); + break; + } + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + + collation_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlSettings_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetUserLabels(); + case 8: + return internalGetDatabaseFlags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.CloudSqlSettings.class, + com.google.cloud.clouddms.v1.CloudSqlSettings.Builder.class); + } + + /** + * + * + *
+   * Specifies when the instance should be activated.
+   * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy} + */ + public enum SqlActivationPolicy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * unspecified policy.
+     * 
+ * + * SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; + */ + SQL_ACTIVATION_POLICY_UNSPECIFIED(0), + /** + * + * + *
+     * The instance is always up and running.
+     * 
+ * + * ALWAYS = 1; + */ + ALWAYS(1), + /** + * + * + *
+     * The instance should never spin up.
+     * 
+ * + * NEVER = 2; + */ + NEVER(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * unspecified policy.
+     * 
+ * + * SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; + */ + public static final int SQL_ACTIVATION_POLICY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The instance is always up and running.
+     * 
+ * + * ALWAYS = 1; + */ + public static final int ALWAYS_VALUE = 1; + /** + * + * + *
+     * The instance should never spin up.
+     * 
+ * + * NEVER = 2; + */ + public static final int NEVER_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 SqlActivationPolicy 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 SqlActivationPolicy forNumber(int value) { + switch (value) { + case 0: + return SQL_ACTIVATION_POLICY_UNSPECIFIED; + case 1: + return ALWAYS; + case 2: + return NEVER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SqlActivationPolicy findValueByNumber(int number) { + return SqlActivationPolicy.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.clouddms.v1.CloudSqlSettings.getDescriptor().getEnumTypes().get(0); + } + + private static final SqlActivationPolicy[] VALUES = values(); + + public static SqlActivationPolicy 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 SqlActivationPolicy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy) + } + + /** + * + * + *
+   * The storage options for Cloud SQL databases.
+   * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType} + */ + public enum SqlDataDiskType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; + */ + SQL_DATA_DISK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * SSD disk.
+     * 
+ * + * PD_SSD = 1; + */ + PD_SSD(1), + /** + * + * + *
+     * HDD disk.
+     * 
+ * + * PD_HDD = 2; + */ + PD_HDD(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; + */ + public static final int SQL_DATA_DISK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * SSD disk.
+     * 
+ * + * PD_SSD = 1; + */ + public static final int PD_SSD_VALUE = 1; + /** + * + * + *
+     * HDD disk.
+     * 
+ * + * PD_HDD = 2; + */ + public static final int PD_HDD_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 SqlDataDiskType 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 SqlDataDiskType forNumber(int value) { + switch (value) { + case 0: + return SQL_DATA_DISK_TYPE_UNSPECIFIED; + case 1: + return PD_SSD; + case 2: + return PD_HDD; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SqlDataDiskType findValueByNumber(int number) { + return SqlDataDiskType.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.clouddms.v1.CloudSqlSettings.getDescriptor().getEnumTypes().get(1); + } + + private static final SqlDataDiskType[] VALUES = values(); + + public static SqlDataDiskType 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 SqlDataDiskType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType) + } + + /** + * + * + *
+   * The database engine type and version.
+   * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion} + */ + public enum SqlDatabaseVersion implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified version.
+     * 
+ * + * SQL_DATABASE_VERSION_UNSPECIFIED = 0; + */ + SQL_DATABASE_VERSION_UNSPECIFIED(0), + /** + * + * + *
+     * MySQL 5.6.
+     * 
+ * + * MYSQL_5_6 = 1; + */ + MYSQL_5_6(1), + /** + * + * + *
+     * MySQL 5.7.
+     * 
+ * + * MYSQL_5_7 = 2; + */ + MYSQL_5_7(2), + /** + * + * + *
+     * PostgreSQL 9.6.
+     * 
+ * + * POSTGRES_9_6 = 3; + */ + POSTGRES_9_6(3), + /** + * + * + *
+     * PostgreSQL 11.
+     * 
+ * + * POSTGRES_11 = 4; + */ + POSTGRES_11(4), + /** + * + * + *
+     * PostgreSQL 10.
+     * 
+ * + * POSTGRES_10 = 5; + */ + POSTGRES_10(5), + /** + * + * + *
+     * MySQL 8.0.
+     * 
+ * + * MYSQL_8_0 = 6; + */ + MYSQL_8_0(6), + /** + * + * + *
+     * PostgreSQL 12.
+     * 
+ * + * POSTGRES_12 = 7; + */ + POSTGRES_12(7), + /** + * + * + *
+     * PostgreSQL 13.
+     * 
+ * + * POSTGRES_13 = 8; + */ + POSTGRES_13(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified version.
+     * 
+ * + * SQL_DATABASE_VERSION_UNSPECIFIED = 0; + */ + public static final int SQL_DATABASE_VERSION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * MySQL 5.6.
+     * 
+ * + * MYSQL_5_6 = 1; + */ + public static final int MYSQL_5_6_VALUE = 1; + /** + * + * + *
+     * MySQL 5.7.
+     * 
+ * + * MYSQL_5_7 = 2; + */ + public static final int MYSQL_5_7_VALUE = 2; + /** + * + * + *
+     * PostgreSQL 9.6.
+     * 
+ * + * POSTGRES_9_6 = 3; + */ + public static final int POSTGRES_9_6_VALUE = 3; + /** + * + * + *
+     * PostgreSQL 11.
+     * 
+ * + * POSTGRES_11 = 4; + */ + public static final int POSTGRES_11_VALUE = 4; + /** + * + * + *
+     * PostgreSQL 10.
+     * 
+ * + * POSTGRES_10 = 5; + */ + public static final int POSTGRES_10_VALUE = 5; + /** + * + * + *
+     * MySQL 8.0.
+     * 
+ * + * MYSQL_8_0 = 6; + */ + public static final int MYSQL_8_0_VALUE = 6; + /** + * + * + *
+     * PostgreSQL 12.
+     * 
+ * + * POSTGRES_12 = 7; + */ + public static final int POSTGRES_12_VALUE = 7; + /** + * + * + *
+     * PostgreSQL 13.
+     * 
+ * + * POSTGRES_13 = 8; + */ + public static final int POSTGRES_13_VALUE = 8; + + 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 SqlDatabaseVersion 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 SqlDatabaseVersion forNumber(int value) { + switch (value) { + case 0: + return SQL_DATABASE_VERSION_UNSPECIFIED; + case 1: + return MYSQL_5_6; + case 2: + return MYSQL_5_7; + case 3: + return POSTGRES_9_6; + case 4: + return POSTGRES_11; + case 5: + return POSTGRES_10; + case 6: + return MYSQL_8_0; + case 7: + return POSTGRES_12; + case 8: + return POSTGRES_13; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SqlDatabaseVersion findValueByNumber(int number) { + return SqlDatabaseVersion.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.clouddms.v1.CloudSqlSettings.getDescriptor().getEnumTypes().get(2); + } + + private static final SqlDatabaseVersion[] VALUES = values(); + + public static SqlDatabaseVersion 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 SqlDatabaseVersion(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion) + } + + public static final int DATABASE_VERSION_FIELD_NUMBER = 1; + private int databaseVersion_; + /** + * + * + *
+   * The database engine type and version.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion database_version = 1; + * + * + * @return The enum numeric value on the wire for databaseVersion. + */ + @java.lang.Override + public int getDatabaseVersionValue() { + return databaseVersion_; + } + /** + * + * + *
+   * The database engine type and version.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion database_version = 1; + * + * + * @return The databaseVersion. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion getDatabaseVersion() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion result = + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion.valueOf(databaseVersion_); + return result == null + ? com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion.UNRECOGNIZED + : result; + } + + public static final int USER_LABELS_FIELD_NUMBER = 2; + + private static final class UserLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlSettings_UserLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+   * The resource labels for a Cloud SQL instance to use to annotate any related
+   * underlying resources such as Compute Engine VMs.
+   * An object containing a list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+   * The resource labels for a Cloud SQL instance to use to annotate any related
+   * underlying resources such as Compute Engine VMs.
+   * An object containing a list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+   * The resource labels for a Cloud SQL instance to use to annotate any related
+   * underlying resources such as Compute Engine VMs.
+   * An object containing a list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The resource labels for a Cloud SQL instance to use to annotate any related
+   * underlying resources such as Compute Engine VMs.
+   * An object containing a list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TIER_FIELD_NUMBER = 3; + private volatile java.lang.Object tier_; + /** + * + * + *
+   * The tier (or machine type) for this instance, for example:
+   * `db-n1-standard-1` (MySQL instances) or
+   * `db-custom-1-3840` (PostgreSQL instances).
+   * For more information, see
+   * [Cloud SQL Instance
+   * Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).
+   * 
+ * + * string tier = 3; + * + * @return The tier. + */ + @java.lang.Override + public java.lang.String getTier() { + java.lang.Object ref = tier_; + 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(); + tier_ = s; + return s; + } + } + /** + * + * + *
+   * The tier (or machine type) for this instance, for example:
+   * `db-n1-standard-1` (MySQL instances) or
+   * `db-custom-1-3840` (PostgreSQL instances).
+   * For more information, see
+   * [Cloud SQL Instance
+   * Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).
+   * 
+ * + * string tier = 3; + * + * @return The bytes for tier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTierBytes() { + java.lang.Object ref = tier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STORAGE_AUTO_RESIZE_LIMIT_FIELD_NUMBER = 4; + private com.google.protobuf.Int64Value storageAutoResizeLimit_; + /** + * + * + *
+   * The maximum size to which storage capacity can be automatically increased.
+   * The default value is 0, which specifies that there is no limit.
+   * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + * + * @return Whether the storageAutoResizeLimit field is set. + */ + @java.lang.Override + public boolean hasStorageAutoResizeLimit() { + return storageAutoResizeLimit_ != null; + } + /** + * + * + *
+   * The maximum size to which storage capacity can be automatically increased.
+   * The default value is 0, which specifies that there is no limit.
+   * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + * + * @return The storageAutoResizeLimit. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getStorageAutoResizeLimit() { + return storageAutoResizeLimit_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : storageAutoResizeLimit_; + } + /** + * + * + *
+   * The maximum size to which storage capacity can be automatically increased.
+   * The default value is 0, which specifies that there is no limit.
+   * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getStorageAutoResizeLimitOrBuilder() { + return getStorageAutoResizeLimit(); + } + + public static final int ACTIVATION_POLICY_FIELD_NUMBER = 5; + private int activationPolicy_; + /** + * + * + *
+   * The activation policy specifies when the instance is activated; it is
+   * applicable only when the instance state is 'RUNNABLE'. Valid values:
+   * 'ALWAYS': The instance is on, and remains so even in
+   * the absence of connection requests.
+   * `NEVER`: The instance is off; it is not activated, even if a
+   * connection request arrives.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy activation_policy = 5; + * + * + * @return The enum numeric value on the wire for activationPolicy. + */ + @java.lang.Override + public int getActivationPolicyValue() { + return activationPolicy_; + } + /** + * + * + *
+   * The activation policy specifies when the instance is activated; it is
+   * applicable only when the instance state is 'RUNNABLE'. Valid values:
+   * 'ALWAYS': The instance is on, and remains so even in
+   * the absence of connection requests.
+   * `NEVER`: The instance is off; it is not activated, even if a
+   * connection request arrives.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy activation_policy = 5; + * + * + * @return The activationPolicy. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy getActivationPolicy() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy result = + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy.valueOf( + activationPolicy_); + return result == null + ? com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy.UNRECOGNIZED + : result; + } + + public static final int IP_CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.clouddms.v1.SqlIpConfig ipConfig_; + /** + * + * + *
+   * The settings for IP Management. This allows to enable or disable the
+   * instance IP and manage which external networks can connect to the instance.
+   * The IPv4 address cannot be disabled.
+   * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + * + * @return Whether the ipConfig field is set. + */ + @java.lang.Override + public boolean hasIpConfig() { + return ipConfig_ != null; + } + /** + * + * + *
+   * The settings for IP Management. This allows to enable or disable the
+   * instance IP and manage which external networks can connect to the instance.
+   * The IPv4 address cannot be disabled.
+   * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + * + * @return The ipConfig. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlIpConfig getIpConfig() { + return ipConfig_ == null + ? com.google.cloud.clouddms.v1.SqlIpConfig.getDefaultInstance() + : ipConfig_; + } + /** + * + * + *
+   * The settings for IP Management. This allows to enable or disable the
+   * instance IP and manage which external networks can connect to the instance.
+   * The IPv4 address cannot be disabled.
+   * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlIpConfigOrBuilder getIpConfigOrBuilder() { + return getIpConfig(); + } + + public static final int AUTO_STORAGE_INCREASE_FIELD_NUMBER = 7; + private com.google.protobuf.BoolValue autoStorageIncrease_; + /** + * + * + *
+   * [default: ON] If you enable this setting, Cloud SQL checks your available
+   * storage every 30 seconds. If the available storage falls below a threshold
+   * size, Cloud SQL automatically adds additional storage capacity. If the
+   * available storage repeatedly falls below the threshold size, Cloud SQL
+   * continues to add storage until it reaches the maximum of 30 TB.
+   * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + * + * @return Whether the autoStorageIncrease field is set. + */ + @java.lang.Override + public boolean hasAutoStorageIncrease() { + return autoStorageIncrease_ != null; + } + /** + * + * + *
+   * [default: ON] If you enable this setting, Cloud SQL checks your available
+   * storage every 30 seconds. If the available storage falls below a threshold
+   * size, Cloud SQL automatically adds additional storage capacity. If the
+   * available storage repeatedly falls below the threshold size, Cloud SQL
+   * continues to add storage until it reaches the maximum of 30 TB.
+   * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + * + * @return The autoStorageIncrease. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getAutoStorageIncrease() { + return autoStorageIncrease_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : autoStorageIncrease_; + } + /** + * + * + *
+   * [default: ON] If you enable this setting, Cloud SQL checks your available
+   * storage every 30 seconds. If the available storage falls below a threshold
+   * size, Cloud SQL automatically adds additional storage capacity. If the
+   * available storage repeatedly falls below the threshold size, Cloud SQL
+   * continues to add storage until it reaches the maximum of 30 TB.
+   * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getAutoStorageIncreaseOrBuilder() { + return getAutoStorageIncrease(); + } + + public static final int DATABASE_FLAGS_FIELD_NUMBER = 8; + + private static final class DatabaseFlagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlSettings_DatabaseFlagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField databaseFlags_; + + private com.google.protobuf.MapField + internalGetDatabaseFlags() { + if (databaseFlags_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DatabaseFlagsDefaultEntryHolder.defaultEntry); + } + return databaseFlags_; + } + + public int getDatabaseFlagsCount() { + return internalGetDatabaseFlags().getMap().size(); + } + /** + * + * + *
+   * The database flags passed to the Cloud SQL instance at startup.
+   * An object containing a list of "key": value pairs.
+   * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> database_flags = 8; + */ + @java.lang.Override + public boolean containsDatabaseFlags(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetDatabaseFlags().getMap().containsKey(key); + } + /** Use {@link #getDatabaseFlagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDatabaseFlags() { + return getDatabaseFlagsMap(); + } + /** + * + * + *
+   * The database flags passed to the Cloud SQL instance at startup.
+   * An object containing a list of "key": value pairs.
+   * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> database_flags = 8; + */ + @java.lang.Override + public java.util.Map getDatabaseFlagsMap() { + return internalGetDatabaseFlags().getMap(); + } + /** + * + * + *
+   * The database flags passed to the Cloud SQL instance at startup.
+   * An object containing a list of "key": value pairs.
+   * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> database_flags = 8; + */ + @java.lang.Override + public java.lang.String getDatabaseFlagsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetDatabaseFlags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The database flags passed to the Cloud SQL instance at startup.
+   * An object containing a list of "key": value pairs.
+   * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> database_flags = 8; + */ + @java.lang.Override + public java.lang.String getDatabaseFlagsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetDatabaseFlags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DATA_DISK_TYPE_FIELD_NUMBER = 9; + private int dataDiskType_; + /** + * + * + *
+   * The type of storage: `PD_SSD` (default) or `PD_HDD`.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType data_disk_type = 9; + * + * @return The enum numeric value on the wire for dataDiskType. + */ + @java.lang.Override + public int getDataDiskTypeValue() { + return dataDiskType_; + } + /** + * + * + *
+   * The type of storage: `PD_SSD` (default) or `PD_HDD`.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType data_disk_type = 9; + * + * @return The dataDiskType. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType getDataDiskType() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType result = + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType.valueOf(dataDiskType_); + return result == null + ? com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType.UNRECOGNIZED + : result; + } + + public static final int DATA_DISK_SIZE_GB_FIELD_NUMBER = 10; + private com.google.protobuf.Int64Value dataDiskSizeGb_; + /** + * + * + *
+   * The storage capacity available to the database, in GB.
+   * The minimum (and default) size is 10GB.
+   * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + * + * @return Whether the dataDiskSizeGb field is set. + */ + @java.lang.Override + public boolean hasDataDiskSizeGb() { + return dataDiskSizeGb_ != null; + } + /** + * + * + *
+   * The storage capacity available to the database, in GB.
+   * The minimum (and default) size is 10GB.
+   * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + * + * @return The dataDiskSizeGb. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getDataDiskSizeGb() { + return dataDiskSizeGb_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : dataDiskSizeGb_; + } + /** + * + * + *
+   * The storage capacity available to the database, in GB.
+   * The minimum (and default) size is 10GB.
+   * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getDataDiskSizeGbOrBuilder() { + return getDataDiskSizeGb(); + } + + public static final int ZONE_FIELD_NUMBER = 11; + private volatile java.lang.Object zone_; + /** + * + * + *
+   * The Google Cloud Platform zone where your Cloud SQL datdabse instance is
+   * located.
+   * 
+ * + * string zone = 11; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + 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(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * The Google Cloud Platform zone where your Cloud SQL datdabse instance is
+   * located.
+   * 
+ * + * string zone = 11; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_ID_FIELD_NUMBER = 12; + private volatile java.lang.Object sourceId_; + /** + * + * + *
+   * The Database Migration Service source connection profile ID,
+   * in the format:
+   * `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
+   * 
+ * + * string source_id = 12; + * + * @return The sourceId. + */ + @java.lang.Override + public java.lang.String getSourceId() { + java.lang.Object ref = sourceId_; + 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(); + sourceId_ = s; + return s; + } + } + /** + * + * + *
+   * The Database Migration Service source connection profile ID,
+   * in the format:
+   * `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
+   * 
+ * + * string source_id = 12; + * + * @return The bytes for sourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceIdBytes() { + java.lang.Object ref = sourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROOT_PASSWORD_FIELD_NUMBER = 13; + private volatile java.lang.Object rootPassword_; + /** + * + * + *
+   * Input only. Initial root password.
+   * 
+ * + * string root_password = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The rootPassword. + */ + @java.lang.Override + public java.lang.String getRootPassword() { + java.lang.Object ref = rootPassword_; + 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(); + rootPassword_ = s; + return s; + } + } + /** + * + * + *
+   * Input only. Initial root password.
+   * 
+ * + * string root_password = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for rootPassword. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRootPasswordBytes() { + java.lang.Object ref = rootPassword_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rootPassword_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROOT_PASSWORD_SET_FIELD_NUMBER = 14; + private boolean rootPasswordSet_; + /** + * + * + *
+   * Output only. Indicates If this connection profile root password is stored.
+   * 
+ * + * bool root_password_set = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rootPasswordSet. + */ + @java.lang.Override + public boolean getRootPasswordSet() { + return rootPasswordSet_; + } + + public static final int COLLATION_FIELD_NUMBER = 15; + private volatile java.lang.Object collation_; + /** + * + * + *
+   * The Cloud SQL default instance level collation.
+   * 
+ * + * string collation = 15; + * + * @return The collation. + */ + @java.lang.Override + public java.lang.String getCollation() { + java.lang.Object ref = collation_; + 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(); + collation_ = s; + return s; + } + } + /** + * + * + *
+   * The Cloud SQL default instance level collation.
+   * 
+ * + * string collation = 15; + * + * @return The bytes for collation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCollationBytes() { + java.lang.Object ref = collation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collation_ = 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 (databaseVersion_ + != com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion + .SQL_DATABASE_VERSION_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, databaseVersion_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 2); + if (!getTierBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tier_); + } + if (storageAutoResizeLimit_ != null) { + output.writeMessage(4, getStorageAutoResizeLimit()); + } + if (activationPolicy_ + != com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy + .SQL_ACTIVATION_POLICY_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, activationPolicy_); + } + if (ipConfig_ != null) { + output.writeMessage(6, getIpConfig()); + } + if (autoStorageIncrease_ != null) { + output.writeMessage(7, getAutoStorageIncrease()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetDatabaseFlags(), DatabaseFlagsDefaultEntryHolder.defaultEntry, 8); + if (dataDiskType_ + != com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType + .SQL_DATA_DISK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, dataDiskType_); + } + if (dataDiskSizeGb_ != null) { + output.writeMessage(10, getDataDiskSizeGb()); + } + if (!getZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, zone_); + } + if (!getSourceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, sourceId_); + } + if (!getRootPasswordBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, rootPassword_); + } + if (rootPasswordSet_ != false) { + output.writeBool(14, rootPasswordSet_); + } + if (!getCollationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, collation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (databaseVersion_ + != com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion + .SQL_DATABASE_VERSION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, databaseVersion_); + } + for (java.util.Map.Entry entry : + internalGetUserLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry userLabels__ = + UserLabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, userLabels__); + } + if (!getTierBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tier_); + } + if (storageAutoResizeLimit_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStorageAutoResizeLimit()); + } + if (activationPolicy_ + != com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy + .SQL_ACTIVATION_POLICY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, activationPolicy_); + } + if (ipConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getIpConfig()); + } + if (autoStorageIncrease_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAutoStorageIncrease()); + } + for (java.util.Map.Entry entry : + internalGetDatabaseFlags().getMap().entrySet()) { + com.google.protobuf.MapEntry databaseFlags__ = + DatabaseFlagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, databaseFlags__); + } + if (dataDiskType_ + != com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType + .SQL_DATA_DISK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, dataDiskType_); + } + if (dataDiskSizeGb_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDataDiskSizeGb()); + } + if (!getZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, zone_); + } + if (!getSourceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, sourceId_); + } + if (!getRootPasswordBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, rootPassword_); + } + if (rootPasswordSet_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, rootPasswordSet_); + } + if (!getCollationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, collation_); + } + 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.clouddms.v1.CloudSqlSettings)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.CloudSqlSettings other = + (com.google.cloud.clouddms.v1.CloudSqlSettings) obj; + + if (databaseVersion_ != other.databaseVersion_) return false; + if (!internalGetUserLabels().equals(other.internalGetUserLabels())) return false; + if (!getTier().equals(other.getTier())) return false; + if (hasStorageAutoResizeLimit() != other.hasStorageAutoResizeLimit()) return false; + if (hasStorageAutoResizeLimit()) { + if (!getStorageAutoResizeLimit().equals(other.getStorageAutoResizeLimit())) return false; + } + if (activationPolicy_ != other.activationPolicy_) return false; + if (hasIpConfig() != other.hasIpConfig()) return false; + if (hasIpConfig()) { + if (!getIpConfig().equals(other.getIpConfig())) return false; + } + if (hasAutoStorageIncrease() != other.hasAutoStorageIncrease()) return false; + if (hasAutoStorageIncrease()) { + if (!getAutoStorageIncrease().equals(other.getAutoStorageIncrease())) return false; + } + if (!internalGetDatabaseFlags().equals(other.internalGetDatabaseFlags())) return false; + if (dataDiskType_ != other.dataDiskType_) return false; + if (hasDataDiskSizeGb() != other.hasDataDiskSizeGb()) return false; + if (hasDataDiskSizeGb()) { + if (!getDataDiskSizeGb().equals(other.getDataDiskSizeGb())) return false; + } + if (!getZone().equals(other.getZone())) return false; + if (!getSourceId().equals(other.getSourceId())) return false; + if (!getRootPassword().equals(other.getRootPassword())) return false; + if (getRootPasswordSet() != other.getRootPasswordSet()) return false; + if (!getCollation().equals(other.getCollation())) 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) + DATABASE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + databaseVersion_; + if (!internalGetUserLabels().getMap().isEmpty()) { + hash = (37 * hash) + USER_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetUserLabels().hashCode(); + } + hash = (37 * hash) + TIER_FIELD_NUMBER; + hash = (53 * hash) + getTier().hashCode(); + if (hasStorageAutoResizeLimit()) { + hash = (37 * hash) + STORAGE_AUTO_RESIZE_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getStorageAutoResizeLimit().hashCode(); + } + hash = (37 * hash) + ACTIVATION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + activationPolicy_; + if (hasIpConfig()) { + hash = (37 * hash) + IP_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIpConfig().hashCode(); + } + if (hasAutoStorageIncrease()) { + hash = (37 * hash) + AUTO_STORAGE_INCREASE_FIELD_NUMBER; + hash = (53 * hash) + getAutoStorageIncrease().hashCode(); + } + if (!internalGetDatabaseFlags().getMap().isEmpty()) { + hash = (37 * hash) + DATABASE_FLAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetDatabaseFlags().hashCode(); + } + hash = (37 * hash) + DATA_DISK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataDiskType_; + if (hasDataDiskSizeGb()) { + hash = (37 * hash) + DATA_DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + getDataDiskSizeGb().hashCode(); + } + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (37 * hash) + SOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSourceId().hashCode(); + hash = (37 * hash) + ROOT_PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getRootPassword().hashCode(); + hash = (37 * hash) + ROOT_PASSWORD_SET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRootPasswordSet()); + hash = (37 * hash) + COLLATION_FIELD_NUMBER; + hash = (53 * hash) + getCollation().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.CloudSqlSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CloudSqlSettings 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.clouddms.v1.CloudSqlSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CloudSqlSettings 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.clouddms.v1.CloudSqlSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CloudSqlSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.CloudSqlSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CloudSqlSettings 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.clouddms.v1.CloudSqlSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CloudSqlSettings 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.clouddms.v1.CloudSqlSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CloudSqlSettings 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.clouddms.v1.CloudSqlSettings 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; + } + /** + * + * + *
+   * Settings for creating a Cloud SQL database instance.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.CloudSqlSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.CloudSqlSettings) + com.google.cloud.clouddms.v1.CloudSqlSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlSettings_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetUserLabels(); + case 8: + return internalGetDatabaseFlags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableUserLabels(); + case 8: + return internalGetMutableDatabaseFlags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.CloudSqlSettings.class, + com.google.cloud.clouddms.v1.CloudSqlSettings.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.CloudSqlSettings.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(); + databaseVersion_ = 0; + + internalGetMutableUserLabels().clear(); + tier_ = ""; + + if (storageAutoResizeLimitBuilder_ == null) { + storageAutoResizeLimit_ = null; + } else { + storageAutoResizeLimit_ = null; + storageAutoResizeLimitBuilder_ = null; + } + activationPolicy_ = 0; + + if (ipConfigBuilder_ == null) { + ipConfig_ = null; + } else { + ipConfig_ = null; + ipConfigBuilder_ = null; + } + if (autoStorageIncreaseBuilder_ == null) { + autoStorageIncrease_ = null; + } else { + autoStorageIncrease_ = null; + autoStorageIncreaseBuilder_ = null; + } + internalGetMutableDatabaseFlags().clear(); + dataDiskType_ = 0; + + if (dataDiskSizeGbBuilder_ == null) { + dataDiskSizeGb_ = null; + } else { + dataDiskSizeGb_ = null; + dataDiskSizeGbBuilder_ = null; + } + zone_ = ""; + + sourceId_ = ""; + + rootPassword_ = ""; + + rootPasswordSet_ = false; + + collation_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_CloudSqlSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.CloudSqlSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings build() { + com.google.cloud.clouddms.v1.CloudSqlSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings buildPartial() { + com.google.cloud.clouddms.v1.CloudSqlSettings result = + new com.google.cloud.clouddms.v1.CloudSqlSettings(this); + int from_bitField0_ = bitField0_; + result.databaseVersion_ = databaseVersion_; + result.userLabels_ = internalGetUserLabels(); + result.userLabels_.makeImmutable(); + result.tier_ = tier_; + if (storageAutoResizeLimitBuilder_ == null) { + result.storageAutoResizeLimit_ = storageAutoResizeLimit_; + } else { + result.storageAutoResizeLimit_ = storageAutoResizeLimitBuilder_.build(); + } + result.activationPolicy_ = activationPolicy_; + if (ipConfigBuilder_ == null) { + result.ipConfig_ = ipConfig_; + } else { + result.ipConfig_ = ipConfigBuilder_.build(); + } + if (autoStorageIncreaseBuilder_ == null) { + result.autoStorageIncrease_ = autoStorageIncrease_; + } else { + result.autoStorageIncrease_ = autoStorageIncreaseBuilder_.build(); + } + result.databaseFlags_ = internalGetDatabaseFlags(); + result.databaseFlags_.makeImmutable(); + result.dataDiskType_ = dataDiskType_; + if (dataDiskSizeGbBuilder_ == null) { + result.dataDiskSizeGb_ = dataDiskSizeGb_; + } else { + result.dataDiskSizeGb_ = dataDiskSizeGbBuilder_.build(); + } + result.zone_ = zone_; + result.sourceId_ = sourceId_; + result.rootPassword_ = rootPassword_; + result.rootPasswordSet_ = rootPasswordSet_; + result.collation_ = collation_; + 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.clouddms.v1.CloudSqlSettings) { + return mergeFrom((com.google.cloud.clouddms.v1.CloudSqlSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.CloudSqlSettings other) { + if (other == com.google.cloud.clouddms.v1.CloudSqlSettings.getDefaultInstance()) return this; + if (other.databaseVersion_ != 0) { + setDatabaseVersionValue(other.getDatabaseVersionValue()); + } + internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels()); + if (!other.getTier().isEmpty()) { + tier_ = other.tier_; + onChanged(); + } + if (other.hasStorageAutoResizeLimit()) { + mergeStorageAutoResizeLimit(other.getStorageAutoResizeLimit()); + } + if (other.activationPolicy_ != 0) { + setActivationPolicyValue(other.getActivationPolicyValue()); + } + if (other.hasIpConfig()) { + mergeIpConfig(other.getIpConfig()); + } + if (other.hasAutoStorageIncrease()) { + mergeAutoStorageIncrease(other.getAutoStorageIncrease()); + } + internalGetMutableDatabaseFlags().mergeFrom(other.internalGetDatabaseFlags()); + if (other.dataDiskType_ != 0) { + setDataDiskTypeValue(other.getDataDiskTypeValue()); + } + if (other.hasDataDiskSizeGb()) { + mergeDataDiskSizeGb(other.getDataDiskSizeGb()); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + onChanged(); + } + if (!other.getSourceId().isEmpty()) { + sourceId_ = other.sourceId_; + onChanged(); + } + if (!other.getRootPassword().isEmpty()) { + rootPassword_ = other.rootPassword_; + onChanged(); + } + if (other.getRootPasswordSet() != false) { + setRootPasswordSet(other.getRootPasswordSet()); + } + if (!other.getCollation().isEmpty()) { + collation_ = other.collation_; + 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.clouddms.v1.CloudSqlSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.CloudSqlSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int databaseVersion_ = 0; + /** + * + * + *
+     * The database engine type and version.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion database_version = 1; + * + * + * @return The enum numeric value on the wire for databaseVersion. + */ + @java.lang.Override + public int getDatabaseVersionValue() { + return databaseVersion_; + } + /** + * + * + *
+     * The database engine type and version.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion database_version = 1; + * + * + * @param value The enum numeric value on the wire for databaseVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseVersionValue(int value) { + + databaseVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The database engine type and version.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion database_version = 1; + * + * + * @return The databaseVersion. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion getDatabaseVersion() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion result = + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion.valueOf( + databaseVersion_); + return result == null + ? com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The database engine type and version.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion database_version = 1; + * + * + * @param value The databaseVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseVersion( + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion value) { + if (value == null) { + throw new NullPointerException(); + } + + databaseVersion_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The database engine type and version.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion database_version = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearDatabaseVersion() { + + databaseVersion_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField + internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + private com.google.protobuf.MapField + internalGetMutableUserLabels() { + onChanged(); + ; + if (userLabels_ == null) { + userLabels_ = + com.google.protobuf.MapField.newMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + if (!userLabels_.isMutable()) { + userLabels_ = userLabels_.copy(); + } + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+     * The resource labels for a Cloud SQL instance to use to annotate any related
+     * underlying resources such as Compute Engine VMs.
+     * An object containing a list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+     * The resource labels for a Cloud SQL instance to use to annotate any related
+     * underlying resources such as Compute Engine VMs.
+     * An object containing a list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+     * The resource labels for a Cloud SQL instance to use to annotate any related
+     * underlying resources such as Compute Engine VMs.
+     * An object containing a list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The resource labels for a Cloud SQL instance to use to annotate any related
+     * underlying resources such as Compute Engine VMs.
+     * An object containing a list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearUserLabels() { + internalGetMutableUserLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The resource labels for a Cloud SQL instance to use to annotate any related
+     * underlying resources such as Compute Engine VMs.
+     * An object containing a list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + public Builder removeUserLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableUserLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableUserLabels() { + return internalGetMutableUserLabels().getMutableMap(); + } + /** + * + * + *
+     * The resource labels for a Cloud SQL instance to use to annotate any related
+     * underlying resources such as Compute Engine VMs.
+     * An object containing a list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + public Builder putUserLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableUserLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The resource labels for a Cloud SQL instance to use to annotate any related
+     * underlying resources such as Compute Engine VMs.
+     * An object containing a list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + public Builder putAllUserLabels(java.util.Map values) { + internalGetMutableUserLabels().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object tier_ = ""; + /** + * + * + *
+     * The tier (or machine type) for this instance, for example:
+     * `db-n1-standard-1` (MySQL instances) or
+     * `db-custom-1-3840` (PostgreSQL instances).
+     * For more information, see
+     * [Cloud SQL Instance
+     * Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).
+     * 
+ * + * string tier = 3; + * + * @return The tier. + */ + public java.lang.String getTier() { + java.lang.Object ref = tier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The tier (or machine type) for this instance, for example:
+     * `db-n1-standard-1` (MySQL instances) or
+     * `db-custom-1-3840` (PostgreSQL instances).
+     * For more information, see
+     * [Cloud SQL Instance
+     * Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).
+     * 
+ * + * string tier = 3; + * + * @return The bytes for tier. + */ + public com.google.protobuf.ByteString getTierBytes() { + java.lang.Object ref = tier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The tier (or machine type) for this instance, for example:
+     * `db-n1-standard-1` (MySQL instances) or
+     * `db-custom-1-3840` (PostgreSQL instances).
+     * For more information, see
+     * [Cloud SQL Instance
+     * Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).
+     * 
+ * + * string tier = 3; + * + * @param value The tier to set. + * @return This builder for chaining. + */ + public Builder setTier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tier_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The tier (or machine type) for this instance, for example:
+     * `db-n1-standard-1` (MySQL instances) or
+     * `db-custom-1-3840` (PostgreSQL instances).
+     * For more information, see
+     * [Cloud SQL Instance
+     * Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).
+     * 
+ * + * string tier = 3; + * + * @return This builder for chaining. + */ + public Builder clearTier() { + + tier_ = getDefaultInstance().getTier(); + onChanged(); + return this; + } + /** + * + * + *
+     * The tier (or machine type) for this instance, for example:
+     * `db-n1-standard-1` (MySQL instances) or
+     * `db-custom-1-3840` (PostgreSQL instances).
+     * For more information, see
+     * [Cloud SQL Instance
+     * Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).
+     * 
+ * + * string tier = 3; + * + * @param value The bytes for tier to set. + * @return This builder for chaining. + */ + public Builder setTierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tier_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Int64Value storageAutoResizeLimit_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + storageAutoResizeLimitBuilder_; + /** + * + * + *
+     * The maximum size to which storage capacity can be automatically increased.
+     * The default value is 0, which specifies that there is no limit.
+     * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + * + * @return Whether the storageAutoResizeLimit field is set. + */ + public boolean hasStorageAutoResizeLimit() { + return storageAutoResizeLimitBuilder_ != null || storageAutoResizeLimit_ != null; + } + /** + * + * + *
+     * The maximum size to which storage capacity can be automatically increased.
+     * The default value is 0, which specifies that there is no limit.
+     * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + * + * @return The storageAutoResizeLimit. + */ + public com.google.protobuf.Int64Value getStorageAutoResizeLimit() { + if (storageAutoResizeLimitBuilder_ == null) { + return storageAutoResizeLimit_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : storageAutoResizeLimit_; + } else { + return storageAutoResizeLimitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The maximum size to which storage capacity can be automatically increased.
+     * The default value is 0, which specifies that there is no limit.
+     * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + */ + public Builder setStorageAutoResizeLimit(com.google.protobuf.Int64Value value) { + if (storageAutoResizeLimitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storageAutoResizeLimit_ = value; + onChanged(); + } else { + storageAutoResizeLimitBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The maximum size to which storage capacity can be automatically increased.
+     * The default value is 0, which specifies that there is no limit.
+     * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + */ + public Builder setStorageAutoResizeLimit( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (storageAutoResizeLimitBuilder_ == null) { + storageAutoResizeLimit_ = builderForValue.build(); + onChanged(); + } else { + storageAutoResizeLimitBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The maximum size to which storage capacity can be automatically increased.
+     * The default value is 0, which specifies that there is no limit.
+     * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + */ + public Builder mergeStorageAutoResizeLimit(com.google.protobuf.Int64Value value) { + if (storageAutoResizeLimitBuilder_ == null) { + if (storageAutoResizeLimit_ != null) { + storageAutoResizeLimit_ = + com.google.protobuf.Int64Value.newBuilder(storageAutoResizeLimit_) + .mergeFrom(value) + .buildPartial(); + } else { + storageAutoResizeLimit_ = value; + } + onChanged(); + } else { + storageAutoResizeLimitBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The maximum size to which storage capacity can be automatically increased.
+     * The default value is 0, which specifies that there is no limit.
+     * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + */ + public Builder clearStorageAutoResizeLimit() { + if (storageAutoResizeLimitBuilder_ == null) { + storageAutoResizeLimit_ = null; + onChanged(); + } else { + storageAutoResizeLimit_ = null; + storageAutoResizeLimitBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The maximum size to which storage capacity can be automatically increased.
+     * The default value is 0, which specifies that there is no limit.
+     * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + */ + public com.google.protobuf.Int64Value.Builder getStorageAutoResizeLimitBuilder() { + + onChanged(); + return getStorageAutoResizeLimitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The maximum size to which storage capacity can be automatically increased.
+     * The default value is 0, which specifies that there is no limit.
+     * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + */ + public com.google.protobuf.Int64ValueOrBuilder getStorageAutoResizeLimitOrBuilder() { + if (storageAutoResizeLimitBuilder_ != null) { + return storageAutoResizeLimitBuilder_.getMessageOrBuilder(); + } else { + return storageAutoResizeLimit_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : storageAutoResizeLimit_; + } + } + /** + * + * + *
+     * The maximum size to which storage capacity can be automatically increased.
+     * The default value is 0, which specifies that there is no limit.
+     * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getStorageAutoResizeLimitFieldBuilder() { + if (storageAutoResizeLimitBuilder_ == null) { + storageAutoResizeLimitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getStorageAutoResizeLimit(), getParentForChildren(), isClean()); + storageAutoResizeLimit_ = null; + } + return storageAutoResizeLimitBuilder_; + } + + private int activationPolicy_ = 0; + /** + * + * + *
+     * The activation policy specifies when the instance is activated; it is
+     * applicable only when the instance state is 'RUNNABLE'. Valid values:
+     * 'ALWAYS': The instance is on, and remains so even in
+     * the absence of connection requests.
+     * `NEVER`: The instance is off; it is not activated, even if a
+     * connection request arrives.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy activation_policy = 5; + * + * + * @return The enum numeric value on the wire for activationPolicy. + */ + @java.lang.Override + public int getActivationPolicyValue() { + return activationPolicy_; + } + /** + * + * + *
+     * The activation policy specifies when the instance is activated; it is
+     * applicable only when the instance state is 'RUNNABLE'. Valid values:
+     * 'ALWAYS': The instance is on, and remains so even in
+     * the absence of connection requests.
+     * `NEVER`: The instance is off; it is not activated, even if a
+     * connection request arrives.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy activation_policy = 5; + * + * + * @param value The enum numeric value on the wire for activationPolicy to set. + * @return This builder for chaining. + */ + public Builder setActivationPolicyValue(int value) { + + activationPolicy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The activation policy specifies when the instance is activated; it is
+     * applicable only when the instance state is 'RUNNABLE'. Valid values:
+     * 'ALWAYS': The instance is on, and remains so even in
+     * the absence of connection requests.
+     * `NEVER`: The instance is off; it is not activated, even if a
+     * connection request arrives.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy activation_policy = 5; + * + * + * @return The activationPolicy. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy getActivationPolicy() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy result = + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy.valueOf( + activationPolicy_); + return result == null + ? com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The activation policy specifies when the instance is activated; it is
+     * applicable only when the instance state is 'RUNNABLE'. Valid values:
+     * 'ALWAYS': The instance is on, and remains so even in
+     * the absence of connection requests.
+     * `NEVER`: The instance is off; it is not activated, even if a
+     * connection request arrives.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy activation_policy = 5; + * + * + * @param value The activationPolicy to set. + * @return This builder for chaining. + */ + public Builder setActivationPolicy( + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy value) { + if (value == null) { + throw new NullPointerException(); + } + + activationPolicy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The activation policy specifies when the instance is activated; it is
+     * applicable only when the instance state is 'RUNNABLE'. Valid values:
+     * 'ALWAYS': The instance is on, and remains so even in
+     * the absence of connection requests.
+     * `NEVER`: The instance is off; it is not activated, even if a
+     * connection request arrives.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy activation_policy = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearActivationPolicy() { + + activationPolicy_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.clouddms.v1.SqlIpConfig ipConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.SqlIpConfig, + com.google.cloud.clouddms.v1.SqlIpConfig.Builder, + com.google.cloud.clouddms.v1.SqlIpConfigOrBuilder> + ipConfigBuilder_; + /** + * + * + *
+     * The settings for IP Management. This allows to enable or disable the
+     * instance IP and manage which external networks can connect to the instance.
+     * The IPv4 address cannot be disabled.
+     * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + * + * @return Whether the ipConfig field is set. + */ + public boolean hasIpConfig() { + return ipConfigBuilder_ != null || ipConfig_ != null; + } + /** + * + * + *
+     * The settings for IP Management. This allows to enable or disable the
+     * instance IP and manage which external networks can connect to the instance.
+     * The IPv4 address cannot be disabled.
+     * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + * + * @return The ipConfig. + */ + public com.google.cloud.clouddms.v1.SqlIpConfig getIpConfig() { + if (ipConfigBuilder_ == null) { + return ipConfig_ == null + ? com.google.cloud.clouddms.v1.SqlIpConfig.getDefaultInstance() + : ipConfig_; + } else { + return ipConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The settings for IP Management. This allows to enable or disable the
+     * instance IP and manage which external networks can connect to the instance.
+     * The IPv4 address cannot be disabled.
+     * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + */ + public Builder setIpConfig(com.google.cloud.clouddms.v1.SqlIpConfig value) { + if (ipConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ipConfig_ = value; + onChanged(); + } else { + ipConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The settings for IP Management. This allows to enable or disable the
+     * instance IP and manage which external networks can connect to the instance.
+     * The IPv4 address cannot be disabled.
+     * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + */ + public Builder setIpConfig(com.google.cloud.clouddms.v1.SqlIpConfig.Builder builderForValue) { + if (ipConfigBuilder_ == null) { + ipConfig_ = builderForValue.build(); + onChanged(); + } else { + ipConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The settings for IP Management. This allows to enable or disable the
+     * instance IP and manage which external networks can connect to the instance.
+     * The IPv4 address cannot be disabled.
+     * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + */ + public Builder mergeIpConfig(com.google.cloud.clouddms.v1.SqlIpConfig value) { + if (ipConfigBuilder_ == null) { + if (ipConfig_ != null) { + ipConfig_ = + com.google.cloud.clouddms.v1.SqlIpConfig.newBuilder(ipConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + ipConfig_ = value; + } + onChanged(); + } else { + ipConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The settings for IP Management. This allows to enable or disable the
+     * instance IP and manage which external networks can connect to the instance.
+     * The IPv4 address cannot be disabled.
+     * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + */ + public Builder clearIpConfig() { + if (ipConfigBuilder_ == null) { + ipConfig_ = null; + onChanged(); + } else { + ipConfig_ = null; + ipConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The settings for IP Management. This allows to enable or disable the
+     * instance IP and manage which external networks can connect to the instance.
+     * The IPv4 address cannot be disabled.
+     * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + */ + public com.google.cloud.clouddms.v1.SqlIpConfig.Builder getIpConfigBuilder() { + + onChanged(); + return getIpConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The settings for IP Management. This allows to enable or disable the
+     * instance IP and manage which external networks can connect to the instance.
+     * The IPv4 address cannot be disabled.
+     * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + */ + public com.google.cloud.clouddms.v1.SqlIpConfigOrBuilder getIpConfigOrBuilder() { + if (ipConfigBuilder_ != null) { + return ipConfigBuilder_.getMessageOrBuilder(); + } else { + return ipConfig_ == null + ? com.google.cloud.clouddms.v1.SqlIpConfig.getDefaultInstance() + : ipConfig_; + } + } + /** + * + * + *
+     * The settings for IP Management. This allows to enable or disable the
+     * instance IP and manage which external networks can connect to the instance.
+     * The IPv4 address cannot be disabled.
+     * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.SqlIpConfig, + com.google.cloud.clouddms.v1.SqlIpConfig.Builder, + com.google.cloud.clouddms.v1.SqlIpConfigOrBuilder> + getIpConfigFieldBuilder() { + if (ipConfigBuilder_ == null) { + ipConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.SqlIpConfig, + com.google.cloud.clouddms.v1.SqlIpConfig.Builder, + com.google.cloud.clouddms.v1.SqlIpConfigOrBuilder>( + getIpConfig(), getParentForChildren(), isClean()); + ipConfig_ = null; + } + return ipConfigBuilder_; + } + + private com.google.protobuf.BoolValue autoStorageIncrease_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + autoStorageIncreaseBuilder_; + /** + * + * + *
+     * [default: ON] If you enable this setting, Cloud SQL checks your available
+     * storage every 30 seconds. If the available storage falls below a threshold
+     * size, Cloud SQL automatically adds additional storage capacity. If the
+     * available storage repeatedly falls below the threshold size, Cloud SQL
+     * continues to add storage until it reaches the maximum of 30 TB.
+     * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + * + * @return Whether the autoStorageIncrease field is set. + */ + public boolean hasAutoStorageIncrease() { + return autoStorageIncreaseBuilder_ != null || autoStorageIncrease_ != null; + } + /** + * + * + *
+     * [default: ON] If you enable this setting, Cloud SQL checks your available
+     * storage every 30 seconds. If the available storage falls below a threshold
+     * size, Cloud SQL automatically adds additional storage capacity. If the
+     * available storage repeatedly falls below the threshold size, Cloud SQL
+     * continues to add storage until it reaches the maximum of 30 TB.
+     * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + * + * @return The autoStorageIncrease. + */ + public com.google.protobuf.BoolValue getAutoStorageIncrease() { + if (autoStorageIncreaseBuilder_ == null) { + return autoStorageIncrease_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : autoStorageIncrease_; + } else { + return autoStorageIncreaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * [default: ON] If you enable this setting, Cloud SQL checks your available
+     * storage every 30 seconds. If the available storage falls below a threshold
+     * size, Cloud SQL automatically adds additional storage capacity. If the
+     * available storage repeatedly falls below the threshold size, Cloud SQL
+     * continues to add storage until it reaches the maximum of 30 TB.
+     * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + */ + public Builder setAutoStorageIncrease(com.google.protobuf.BoolValue value) { + if (autoStorageIncreaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoStorageIncrease_ = value; + onChanged(); + } else { + autoStorageIncreaseBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * [default: ON] If you enable this setting, Cloud SQL checks your available
+     * storage every 30 seconds. If the available storage falls below a threshold
+     * size, Cloud SQL automatically adds additional storage capacity. If the
+     * available storage repeatedly falls below the threshold size, Cloud SQL
+     * continues to add storage until it reaches the maximum of 30 TB.
+     * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + */ + public Builder setAutoStorageIncrease(com.google.protobuf.BoolValue.Builder builderForValue) { + if (autoStorageIncreaseBuilder_ == null) { + autoStorageIncrease_ = builderForValue.build(); + onChanged(); + } else { + autoStorageIncreaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * [default: ON] If you enable this setting, Cloud SQL checks your available
+     * storage every 30 seconds. If the available storage falls below a threshold
+     * size, Cloud SQL automatically adds additional storage capacity. If the
+     * available storage repeatedly falls below the threshold size, Cloud SQL
+     * continues to add storage until it reaches the maximum of 30 TB.
+     * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + */ + public Builder mergeAutoStorageIncrease(com.google.protobuf.BoolValue value) { + if (autoStorageIncreaseBuilder_ == null) { + if (autoStorageIncrease_ != null) { + autoStorageIncrease_ = + com.google.protobuf.BoolValue.newBuilder(autoStorageIncrease_) + .mergeFrom(value) + .buildPartial(); + } else { + autoStorageIncrease_ = value; + } + onChanged(); + } else { + autoStorageIncreaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * [default: ON] If you enable this setting, Cloud SQL checks your available
+     * storage every 30 seconds. If the available storage falls below a threshold
+     * size, Cloud SQL automatically adds additional storage capacity. If the
+     * available storage repeatedly falls below the threshold size, Cloud SQL
+     * continues to add storage until it reaches the maximum of 30 TB.
+     * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + */ + public Builder clearAutoStorageIncrease() { + if (autoStorageIncreaseBuilder_ == null) { + autoStorageIncrease_ = null; + onChanged(); + } else { + autoStorageIncrease_ = null; + autoStorageIncreaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * [default: ON] If you enable this setting, Cloud SQL checks your available
+     * storage every 30 seconds. If the available storage falls below a threshold
+     * size, Cloud SQL automatically adds additional storage capacity. If the
+     * available storage repeatedly falls below the threshold size, Cloud SQL
+     * continues to add storage until it reaches the maximum of 30 TB.
+     * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + */ + public com.google.protobuf.BoolValue.Builder getAutoStorageIncreaseBuilder() { + + onChanged(); + return getAutoStorageIncreaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * [default: ON] If you enable this setting, Cloud SQL checks your available
+     * storage every 30 seconds. If the available storage falls below a threshold
+     * size, Cloud SQL automatically adds additional storage capacity. If the
+     * available storage repeatedly falls below the threshold size, Cloud SQL
+     * continues to add storage until it reaches the maximum of 30 TB.
+     * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + */ + public com.google.protobuf.BoolValueOrBuilder getAutoStorageIncreaseOrBuilder() { + if (autoStorageIncreaseBuilder_ != null) { + return autoStorageIncreaseBuilder_.getMessageOrBuilder(); + } else { + return autoStorageIncrease_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : autoStorageIncrease_; + } + } + /** + * + * + *
+     * [default: ON] If you enable this setting, Cloud SQL checks your available
+     * storage every 30 seconds. If the available storage falls below a threshold
+     * size, Cloud SQL automatically adds additional storage capacity. If the
+     * available storage repeatedly falls below the threshold size, Cloud SQL
+     * continues to add storage until it reaches the maximum of 30 TB.
+     * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getAutoStorageIncreaseFieldBuilder() { + if (autoStorageIncreaseBuilder_ == null) { + autoStorageIncreaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getAutoStorageIncrease(), getParentForChildren(), isClean()); + autoStorageIncrease_ = null; + } + return autoStorageIncreaseBuilder_; + } + + private com.google.protobuf.MapField databaseFlags_; + + private com.google.protobuf.MapField + internalGetDatabaseFlags() { + if (databaseFlags_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DatabaseFlagsDefaultEntryHolder.defaultEntry); + } + return databaseFlags_; + } + + private com.google.protobuf.MapField + internalGetMutableDatabaseFlags() { + onChanged(); + ; + if (databaseFlags_ == null) { + databaseFlags_ = + com.google.protobuf.MapField.newMapField(DatabaseFlagsDefaultEntryHolder.defaultEntry); + } + if (!databaseFlags_.isMutable()) { + databaseFlags_ = databaseFlags_.copy(); + } + return databaseFlags_; + } + + public int getDatabaseFlagsCount() { + return internalGetDatabaseFlags().getMap().size(); + } + /** + * + * + *
+     * The database flags passed to the Cloud SQL instance at startup.
+     * An object containing a list of "key": value pairs.
+     * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> database_flags = 8; + */ + @java.lang.Override + public boolean containsDatabaseFlags(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetDatabaseFlags().getMap().containsKey(key); + } + /** Use {@link #getDatabaseFlagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDatabaseFlags() { + return getDatabaseFlagsMap(); + } + /** + * + * + *
+     * The database flags passed to the Cloud SQL instance at startup.
+     * An object containing a list of "key": value pairs.
+     * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> database_flags = 8; + */ + @java.lang.Override + public java.util.Map getDatabaseFlagsMap() { + return internalGetDatabaseFlags().getMap(); + } + /** + * + * + *
+     * The database flags passed to the Cloud SQL instance at startup.
+     * An object containing a list of "key": value pairs.
+     * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> database_flags = 8; + */ + @java.lang.Override + public java.lang.String getDatabaseFlagsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetDatabaseFlags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The database flags passed to the Cloud SQL instance at startup.
+     * An object containing a list of "key": value pairs.
+     * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> database_flags = 8; + */ + @java.lang.Override + public java.lang.String getDatabaseFlagsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetDatabaseFlags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearDatabaseFlags() { + internalGetMutableDatabaseFlags().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The database flags passed to the Cloud SQL instance at startup.
+     * An object containing a list of "key": value pairs.
+     * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> database_flags = 8; + */ + public Builder removeDatabaseFlags(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableDatabaseFlags().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableDatabaseFlags() { + return internalGetMutableDatabaseFlags().getMutableMap(); + } + /** + * + * + *
+     * The database flags passed to the Cloud SQL instance at startup.
+     * An object containing a list of "key": value pairs.
+     * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> database_flags = 8; + */ + public Builder putDatabaseFlags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableDatabaseFlags().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The database flags passed to the Cloud SQL instance at startup.
+     * An object containing a list of "key": value pairs.
+     * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+     * 
+ * + * map<string, string> database_flags = 8; + */ + public Builder putAllDatabaseFlags(java.util.Map values) { + internalGetMutableDatabaseFlags().getMutableMap().putAll(values); + return this; + } + + private int dataDiskType_ = 0; + /** + * + * + *
+     * The type of storage: `PD_SSD` (default) or `PD_HDD`.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType data_disk_type = 9; + * + * @return The enum numeric value on the wire for dataDiskType. + */ + @java.lang.Override + public int getDataDiskTypeValue() { + return dataDiskType_; + } + /** + * + * + *
+     * The type of storage: `PD_SSD` (default) or `PD_HDD`.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType data_disk_type = 9; + * + * @param value The enum numeric value on the wire for dataDiskType to set. + * @return This builder for chaining. + */ + public Builder setDataDiskTypeValue(int value) { + + dataDiskType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of storage: `PD_SSD` (default) or `PD_HDD`.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType data_disk_type = 9; + * + * @return The dataDiskType. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType getDataDiskType() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType result = + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType.valueOf(dataDiskType_); + return result == null + ? com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of storage: `PD_SSD` (default) or `PD_HDD`.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType data_disk_type = 9; + * + * @param value The dataDiskType to set. + * @return This builder for chaining. + */ + public Builder setDataDiskType( + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType value) { + if (value == null) { + throw new NullPointerException(); + } + + dataDiskType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of storage: `PD_SSD` (default) or `PD_HDD`.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType data_disk_type = 9; + * + * @return This builder for chaining. + */ + public Builder clearDataDiskType() { + + dataDiskType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Int64Value dataDiskSizeGb_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + dataDiskSizeGbBuilder_; + /** + * + * + *
+     * The storage capacity available to the database, in GB.
+     * The minimum (and default) size is 10GB.
+     * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + * + * @return Whether the dataDiskSizeGb field is set. + */ + public boolean hasDataDiskSizeGb() { + return dataDiskSizeGbBuilder_ != null || dataDiskSizeGb_ != null; + } + /** + * + * + *
+     * The storage capacity available to the database, in GB.
+     * The minimum (and default) size is 10GB.
+     * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + * + * @return The dataDiskSizeGb. + */ + public com.google.protobuf.Int64Value getDataDiskSizeGb() { + if (dataDiskSizeGbBuilder_ == null) { + return dataDiskSizeGb_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : dataDiskSizeGb_; + } else { + return dataDiskSizeGbBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The storage capacity available to the database, in GB.
+     * The minimum (and default) size is 10GB.
+     * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + */ + public Builder setDataDiskSizeGb(com.google.protobuf.Int64Value value) { + if (dataDiskSizeGbBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataDiskSizeGb_ = value; + onChanged(); + } else { + dataDiskSizeGbBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The storage capacity available to the database, in GB.
+     * The minimum (and default) size is 10GB.
+     * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + */ + public Builder setDataDiskSizeGb(com.google.protobuf.Int64Value.Builder builderForValue) { + if (dataDiskSizeGbBuilder_ == null) { + dataDiskSizeGb_ = builderForValue.build(); + onChanged(); + } else { + dataDiskSizeGbBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The storage capacity available to the database, in GB.
+     * The minimum (and default) size is 10GB.
+     * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + */ + public Builder mergeDataDiskSizeGb(com.google.protobuf.Int64Value value) { + if (dataDiskSizeGbBuilder_ == null) { + if (dataDiskSizeGb_ != null) { + dataDiskSizeGb_ = + com.google.protobuf.Int64Value.newBuilder(dataDiskSizeGb_) + .mergeFrom(value) + .buildPartial(); + } else { + dataDiskSizeGb_ = value; + } + onChanged(); + } else { + dataDiskSizeGbBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The storage capacity available to the database, in GB.
+     * The minimum (and default) size is 10GB.
+     * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + */ + public Builder clearDataDiskSizeGb() { + if (dataDiskSizeGbBuilder_ == null) { + dataDiskSizeGb_ = null; + onChanged(); + } else { + dataDiskSizeGb_ = null; + dataDiskSizeGbBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The storage capacity available to the database, in GB.
+     * The minimum (and default) size is 10GB.
+     * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + */ + public com.google.protobuf.Int64Value.Builder getDataDiskSizeGbBuilder() { + + onChanged(); + return getDataDiskSizeGbFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The storage capacity available to the database, in GB.
+     * The minimum (and default) size is 10GB.
+     * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + */ + public com.google.protobuf.Int64ValueOrBuilder getDataDiskSizeGbOrBuilder() { + if (dataDiskSizeGbBuilder_ != null) { + return dataDiskSizeGbBuilder_.getMessageOrBuilder(); + } else { + return dataDiskSizeGb_ == null + ? com.google.protobuf.Int64Value.getDefaultInstance() + : dataDiskSizeGb_; + } + } + /** + * + * + *
+     * The storage capacity available to the database, in GB.
+     * The minimum (and default) size is 10GB.
+     * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder> + getDataDiskSizeGbFieldBuilder() { + if (dataDiskSizeGbBuilder_ == null) { + dataDiskSizeGbBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int64Value, + com.google.protobuf.Int64Value.Builder, + com.google.protobuf.Int64ValueOrBuilder>( + getDataDiskSizeGb(), getParentForChildren(), isClean()); + dataDiskSizeGb_ = null; + } + return dataDiskSizeGbBuilder_; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * The Google Cloud Platform zone where your Cloud SQL datdabse instance is
+     * located.
+     * 
+ * + * string zone = 11; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Google Cloud Platform zone where your Cloud SQL datdabse instance is
+     * located.
+     * 
+ * + * string zone = 11; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Google Cloud Platform zone where your Cloud SQL datdabse instance is
+     * located.
+     * 
+ * + * string zone = 11; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + zone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Platform zone where your Cloud SQL datdabse instance is
+     * located.
+     * 
+ * + * string zone = 11; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + + zone_ = getDefaultInstance().getZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Platform zone where your Cloud SQL datdabse instance is
+     * located.
+     * 
+ * + * string zone = 11; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + zone_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceId_ = ""; + /** + * + * + *
+     * The Database Migration Service source connection profile ID,
+     * in the format:
+     * `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
+     * 
+ * + * string source_id = 12; + * + * @return The sourceId. + */ + public java.lang.String getSourceId() { + java.lang.Object ref = sourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Database Migration Service source connection profile ID,
+     * in the format:
+     * `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
+     * 
+ * + * string source_id = 12; + * + * @return The bytes for sourceId. + */ + public com.google.protobuf.ByteString getSourceIdBytes() { + java.lang.Object ref = sourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Database Migration Service source connection profile ID,
+     * in the format:
+     * `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
+     * 
+ * + * string source_id = 12; + * + * @param value The sourceId to set. + * @return This builder for chaining. + */ + public Builder setSourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Database Migration Service source connection profile ID,
+     * in the format:
+     * `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
+     * 
+ * + * string source_id = 12; + * + * @return This builder for chaining. + */ + public Builder clearSourceId() { + + sourceId_ = getDefaultInstance().getSourceId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Database Migration Service source connection profile ID,
+     * in the format:
+     * `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
+     * 
+ * + * string source_id = 12; + * + * @param value The bytes for sourceId to set. + * @return This builder for chaining. + */ + public Builder setSourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceId_ = value; + onChanged(); + return this; + } + + private java.lang.Object rootPassword_ = ""; + /** + * + * + *
+     * Input only. Initial root password.
+     * 
+ * + * string root_password = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The rootPassword. + */ + public java.lang.String getRootPassword() { + java.lang.Object ref = rootPassword_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rootPassword_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Input only. Initial root password.
+     * 
+ * + * string root_password = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for rootPassword. + */ + public com.google.protobuf.ByteString getRootPasswordBytes() { + java.lang.Object ref = rootPassword_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rootPassword_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Input only. Initial root password.
+     * 
+ * + * string root_password = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The rootPassword to set. + * @return This builder for chaining. + */ + public Builder setRootPassword(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rootPassword_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Initial root password.
+     * 
+ * + * string root_password = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRootPassword() { + + rootPassword_ = getDefaultInstance().getRootPassword(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Initial root password.
+     * 
+ * + * string root_password = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes for rootPassword to set. + * @return This builder for chaining. + */ + public Builder setRootPasswordBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rootPassword_ = value; + onChanged(); + return this; + } + + private boolean rootPasswordSet_; + /** + * + * + *
+     * Output only. Indicates If this connection profile root password is stored.
+     * 
+ * + * bool root_password_set = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rootPasswordSet. + */ + @java.lang.Override + public boolean getRootPasswordSet() { + return rootPasswordSet_; + } + /** + * + * + *
+     * Output only. Indicates If this connection profile root password is stored.
+     * 
+ * + * bool root_password_set = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The rootPasswordSet to set. + * @return This builder for chaining. + */ + public Builder setRootPasswordSet(boolean value) { + + rootPasswordSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates If this connection profile root password is stored.
+     * 
+ * + * bool root_password_set = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRootPasswordSet() { + + rootPasswordSet_ = false; + onChanged(); + return this; + } + + private java.lang.Object collation_ = ""; + /** + * + * + *
+     * The Cloud SQL default instance level collation.
+     * 
+ * + * string collation = 15; + * + * @return The collation. + */ + public java.lang.String getCollation() { + java.lang.Object ref = collation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Cloud SQL default instance level collation.
+     * 
+ * + * string collation = 15; + * + * @return The bytes for collation. + */ + public com.google.protobuf.ByteString getCollationBytes() { + java.lang.Object ref = collation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Cloud SQL default instance level collation.
+     * 
+ * + * string collation = 15; + * + * @param value The collation to set. + * @return This builder for chaining. + */ + public Builder setCollation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + collation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud SQL default instance level collation.
+     * 
+ * + * string collation = 15; + * + * @return This builder for chaining. + */ + public Builder clearCollation() { + + collation_ = getDefaultInstance().getCollation(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud SQL default instance level collation.
+     * 
+ * + * string collation = 15; + * + * @param value The bytes for collation to set. + * @return This builder for chaining. + */ + public Builder setCollationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + collation_ = 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.clouddms.v1.CloudSqlSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.CloudSqlSettings) + private static final com.google.cloud.clouddms.v1.CloudSqlSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.CloudSqlSettings(); + } + + public static com.google.cloud.clouddms.v1.CloudSqlSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSqlSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudSqlSettings(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.clouddms.v1.CloudSqlSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlSettingsOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlSettingsOrBuilder.java new file mode 100644 index 00000000..e88ace94 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CloudSqlSettingsOrBuilder.java @@ -0,0 +1,565 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface CloudSqlSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.CloudSqlSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The database engine type and version.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion database_version = 1; + * + * + * @return The enum numeric value on the wire for databaseVersion. + */ + int getDatabaseVersionValue(); + /** + * + * + *
+   * The database engine type and version.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion database_version = 1; + * + * + * @return The databaseVersion. + */ + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion getDatabaseVersion(); + + /** + * + * + *
+   * The resource labels for a Cloud SQL instance to use to annotate any related
+   * underlying resources such as Compute Engine VMs.
+   * An object containing a list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + int getUserLabelsCount(); + /** + * + * + *
+   * The resource labels for a Cloud SQL instance to use to annotate any related
+   * underlying resources such as Compute Engine VMs.
+   * An object containing a list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + boolean containsUserLabels(java.lang.String key); + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getUserLabels(); + /** + * + * + *
+   * The resource labels for a Cloud SQL instance to use to annotate any related
+   * underlying resources such as Compute Engine VMs.
+   * An object containing a list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + java.util.Map getUserLabelsMap(); + /** + * + * + *
+   * The resource labels for a Cloud SQL instance to use to annotate any related
+   * underlying resources such as Compute Engine VMs.
+   * An object containing a list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + java.lang.String getUserLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The resource labels for a Cloud SQL instance to use to annotate any related
+   * underlying resources such as Compute Engine VMs.
+   * An object containing a list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + java.lang.String getUserLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The tier (or machine type) for this instance, for example:
+   * `db-n1-standard-1` (MySQL instances) or
+   * `db-custom-1-3840` (PostgreSQL instances).
+   * For more information, see
+   * [Cloud SQL Instance
+   * Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).
+   * 
+ * + * string tier = 3; + * + * @return The tier. + */ + java.lang.String getTier(); + /** + * + * + *
+   * The tier (or machine type) for this instance, for example:
+   * `db-n1-standard-1` (MySQL instances) or
+   * `db-custom-1-3840` (PostgreSQL instances).
+   * For more information, see
+   * [Cloud SQL Instance
+   * Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).
+   * 
+ * + * string tier = 3; + * + * @return The bytes for tier. + */ + com.google.protobuf.ByteString getTierBytes(); + + /** + * + * + *
+   * The maximum size to which storage capacity can be automatically increased.
+   * The default value is 0, which specifies that there is no limit.
+   * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + * + * @return Whether the storageAutoResizeLimit field is set. + */ + boolean hasStorageAutoResizeLimit(); + /** + * + * + *
+   * The maximum size to which storage capacity can be automatically increased.
+   * The default value is 0, which specifies that there is no limit.
+   * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + * + * @return The storageAutoResizeLimit. + */ + com.google.protobuf.Int64Value getStorageAutoResizeLimit(); + /** + * + * + *
+   * The maximum size to which storage capacity can be automatically increased.
+   * The default value is 0, which specifies that there is no limit.
+   * 
+ * + * .google.protobuf.Int64Value storage_auto_resize_limit = 4; + */ + com.google.protobuf.Int64ValueOrBuilder getStorageAutoResizeLimitOrBuilder(); + + /** + * + * + *
+   * The activation policy specifies when the instance is activated; it is
+   * applicable only when the instance state is 'RUNNABLE'. Valid values:
+   * 'ALWAYS': The instance is on, and remains so even in
+   * the absence of connection requests.
+   * `NEVER`: The instance is off; it is not activated, even if a
+   * connection request arrives.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy activation_policy = 5; + * + * + * @return The enum numeric value on the wire for activationPolicy. + */ + int getActivationPolicyValue(); + /** + * + * + *
+   * The activation policy specifies when the instance is activated; it is
+   * applicable only when the instance state is 'RUNNABLE'. Valid values:
+   * 'ALWAYS': The instance is on, and remains so even in
+   * the absence of connection requests.
+   * `NEVER`: The instance is off; it is not activated, even if a
+   * connection request arrives.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy activation_policy = 5; + * + * + * @return The activationPolicy. + */ + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy getActivationPolicy(); + + /** + * + * + *
+   * The settings for IP Management. This allows to enable or disable the
+   * instance IP and manage which external networks can connect to the instance.
+   * The IPv4 address cannot be disabled.
+   * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + * + * @return Whether the ipConfig field is set. + */ + boolean hasIpConfig(); + /** + * + * + *
+   * The settings for IP Management. This allows to enable or disable the
+   * instance IP and manage which external networks can connect to the instance.
+   * The IPv4 address cannot be disabled.
+   * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + * + * @return The ipConfig. + */ + com.google.cloud.clouddms.v1.SqlIpConfig getIpConfig(); + /** + * + * + *
+   * The settings for IP Management. This allows to enable or disable the
+   * instance IP and manage which external networks can connect to the instance.
+   * The IPv4 address cannot be disabled.
+   * 
+ * + * .google.cloud.clouddms.v1.SqlIpConfig ip_config = 6; + */ + com.google.cloud.clouddms.v1.SqlIpConfigOrBuilder getIpConfigOrBuilder(); + + /** + * + * + *
+   * [default: ON] If you enable this setting, Cloud SQL checks your available
+   * storage every 30 seconds. If the available storage falls below a threshold
+   * size, Cloud SQL automatically adds additional storage capacity. If the
+   * available storage repeatedly falls below the threshold size, Cloud SQL
+   * continues to add storage until it reaches the maximum of 30 TB.
+   * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + * + * @return Whether the autoStorageIncrease field is set. + */ + boolean hasAutoStorageIncrease(); + /** + * + * + *
+   * [default: ON] If you enable this setting, Cloud SQL checks your available
+   * storage every 30 seconds. If the available storage falls below a threshold
+   * size, Cloud SQL automatically adds additional storage capacity. If the
+   * available storage repeatedly falls below the threshold size, Cloud SQL
+   * continues to add storage until it reaches the maximum of 30 TB.
+   * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + * + * @return The autoStorageIncrease. + */ + com.google.protobuf.BoolValue getAutoStorageIncrease(); + /** + * + * + *
+   * [default: ON] If you enable this setting, Cloud SQL checks your available
+   * storage every 30 seconds. If the available storage falls below a threshold
+   * size, Cloud SQL automatically adds additional storage capacity. If the
+   * available storage repeatedly falls below the threshold size, Cloud SQL
+   * continues to add storage until it reaches the maximum of 30 TB.
+   * 
+ * + * .google.protobuf.BoolValue auto_storage_increase = 7; + */ + com.google.protobuf.BoolValueOrBuilder getAutoStorageIncreaseOrBuilder(); + + /** + * + * + *
+   * The database flags passed to the Cloud SQL instance at startup.
+   * An object containing a list of "key": value pairs.
+   * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> database_flags = 8; + */ + int getDatabaseFlagsCount(); + /** + * + * + *
+   * The database flags passed to the Cloud SQL instance at startup.
+   * An object containing a list of "key": value pairs.
+   * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> database_flags = 8; + */ + boolean containsDatabaseFlags(java.lang.String key); + /** Use {@link #getDatabaseFlagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getDatabaseFlags(); + /** + * + * + *
+   * The database flags passed to the Cloud SQL instance at startup.
+   * An object containing a list of "key": value pairs.
+   * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> database_flags = 8; + */ + java.util.Map getDatabaseFlagsMap(); + /** + * + * + *
+   * The database flags passed to the Cloud SQL instance at startup.
+   * An object containing a list of "key": value pairs.
+   * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> database_flags = 8; + */ + java.lang.String getDatabaseFlagsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The database flags passed to the Cloud SQL instance at startup.
+   * An object containing a list of "key": value pairs.
+   * Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
+   * 
+ * + * map<string, string> database_flags = 8; + */ + java.lang.String getDatabaseFlagsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The type of storage: `PD_SSD` (default) or `PD_HDD`.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType data_disk_type = 9; + * + * @return The enum numeric value on the wire for dataDiskType. + */ + int getDataDiskTypeValue(); + /** + * + * + *
+   * The type of storage: `PD_SSD` (default) or `PD_HDD`.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType data_disk_type = 9; + * + * @return The dataDiskType. + */ + com.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType getDataDiskType(); + + /** + * + * + *
+   * The storage capacity available to the database, in GB.
+   * The minimum (and default) size is 10GB.
+   * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + * + * @return Whether the dataDiskSizeGb field is set. + */ + boolean hasDataDiskSizeGb(); + /** + * + * + *
+   * The storage capacity available to the database, in GB.
+   * The minimum (and default) size is 10GB.
+   * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + * + * @return The dataDiskSizeGb. + */ + com.google.protobuf.Int64Value getDataDiskSizeGb(); + /** + * + * + *
+   * The storage capacity available to the database, in GB.
+   * The minimum (and default) size is 10GB.
+   * 
+ * + * .google.protobuf.Int64Value data_disk_size_gb = 10; + */ + com.google.protobuf.Int64ValueOrBuilder getDataDiskSizeGbOrBuilder(); + + /** + * + * + *
+   * The Google Cloud Platform zone where your Cloud SQL datdabse instance is
+   * located.
+   * 
+ * + * string zone = 11; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * The Google Cloud Platform zone where your Cloud SQL datdabse instance is
+   * located.
+   * 
+ * + * string zone = 11; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * The Database Migration Service source connection profile ID,
+   * in the format:
+   * `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
+   * 
+ * + * string source_id = 12; + * + * @return The sourceId. + */ + java.lang.String getSourceId(); + /** + * + * + *
+   * The Database Migration Service source connection profile ID,
+   * in the format:
+   * `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
+   * 
+ * + * string source_id = 12; + * + * @return The bytes for sourceId. + */ + com.google.protobuf.ByteString getSourceIdBytes(); + + /** + * + * + *
+   * Input only. Initial root password.
+   * 
+ * + * string root_password = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The rootPassword. + */ + java.lang.String getRootPassword(); + /** + * + * + *
+   * Input only. Initial root password.
+   * 
+ * + * string root_password = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for rootPassword. + */ + com.google.protobuf.ByteString getRootPasswordBytes(); + + /** + * + * + *
+   * Output only. Indicates If this connection profile root password is stored.
+   * 
+ * + * bool root_password_set = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rootPasswordSet. + */ + boolean getRootPasswordSet(); + + /** + * + * + *
+   * The Cloud SQL default instance level collation.
+   * 
+ * + * string collation = 15; + * + * @return The collation. + */ + java.lang.String getCollation(); + /** + * + * + *
+   * The Cloud SQL default instance level collation.
+   * 
+ * + * string collation = 15; + * + * @return The bytes for collation. + */ + com.google.protobuf.ByteString getCollationBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ClouddmsProto.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ClouddmsProto.java new file mode 100644 index 00000000..d53dad43 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ClouddmsProto.java @@ -0,0 +1,546 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public final class ClouddmsProto { + private ClouddmsProto() {} + + 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_clouddms_v1_ListMigrationJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_ListMigrationJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_VmCreationConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_VmCreationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_VmSelectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_VmSelectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_SshScript_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_SshScript_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_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/clouddms/v1/clouddms.prot" + + "o\022\030google.cloud.clouddms.v1\032\034google/api/" + + "annotations.proto\032\027google/api/client.pro" + + "to\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\0321google/cloud/clo" + + "uddms/v1/clouddms_resources.proto\032#googl" + + "e/longrunning/operations.proto\032 google/p" + + "rotobuf/field_mask.proto\032\037google/protobu" + + "f/timestamp.proto\"\246\001\n\030ListMigrationJobsR" + + "equest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)datamigr" + + "ation.googleapis.com/MigrationJob\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filt" + + "er\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\211\001\n\031ListMigra" + + "tionJobsResponse\022>\n\016migration_jobs\030\001 \003(\013" + + "2&.google.cloud.clouddms.v1.MigrationJob" + + "\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable" + + "\030\003 \003(\t\"Y\n\026GetMigrationJobRequest\022?\n\004name" + + "\030\001 \001(\tB1\340A\002\372A+\n)datamigration.googleapis" + + ".com/MigrationJob\"\325\001\n\031CreateMigrationJob" + + "Request\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)datamig" + + "ration.googleapis.com/MigrationJob\022\035\n\020mi" + + "gration_job_id\030\002 \001(\tB\003\340A\002\022B\n\rmigration_j" + + "ob\030\003 \001(\0132&.google.cloud.clouddms.v1.Migr" + + "ationJobB\003\340A\002\022\022\n\nrequest_id\030\004 \001(\t\"\251\001\n\031Up" + + "dateMigrationJobRequest\0224\n\013update_mask\030\001" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022B\n" + + "\rmigration_job\030\002 \001(\0132&.google.cloud.clou" + + "ddms.v1.MigrationJobB\003\340A\002\022\022\n\nrequest_id\030" + + "\003 \001(\t\"\177\n\031DeleteMigrationJobRequest\022?\n\004na" + + "me\030\001 \001(\tB1\340A\002\372A+\n)datamigration.googleap" + + "is.com/MigrationJob\022\022\n\nrequest_id\030\002 \001(\t\022" + + "\r\n\005force\030\003 \001(\010\"X\n\030StartMigrationJobReque" + + "st\022<\n\004name\030\001 \001(\tB.\372A+\n)datamigration.goo" + + "gleapis.com/MigrationJob\"W\n\027StopMigratio" + + "nJobRequest\022<\n\004name\030\001 \001(\tB.\372A+\n)datamigr" + + "ation.googleapis.com/MigrationJob\"Y\n\031Res" + + "umeMigrationJobRequest\022<\n\004name\030\001 \001(\tB.\372A" + + "+\n)datamigration.googleapis.com/Migratio" + + "nJob\"Z\n\032PromoteMigrationJobRequest\022<\n\004na" + + "me\030\001 \001(\tB.\372A+\n)datamigration.googleapis." + + "com/MigrationJob\"Y\n\031VerifyMigrationJobRe" + + "quest\022<\n\004name\030\001 \001(\tB.\372A+\n)datamigration." + + "googleapis.com/MigrationJob\"Z\n\032RestartMi" + + "grationJobRequest\022<\n\004name\030\001 \001(\tB.\372A+\n)da" + + "tamigration.googleapis.com/MigrationJob\"" + + "\246\002\n\030GenerateSshScriptRequest\022E\n\rmigratio" + + "n_job\030\001 \001(\tB.\372A+\n)datamigration.googleap" + + "is.com/MigrationJob\022\017\n\002vm\030\002 \001(\tB\003\340A\002\022H\n\022" + + "vm_creation_config\030d \001(\0132*.google.cloud." + + "clouddms.v1.VmCreationConfigH\000\022J\n\023vm_sel" + + "ection_config\030e \001(\0132+.google.cloud.cloud" + + "dms.v1.VmSelectionConfigH\000\022\017\n\007vm_port\030\003 " + + "\001(\005B\013\n\tvm_config\"Q\n\020VmCreationConfig\022\034\n\017" + + "vm_machine_type\030\001 \001(\tB\003\340A\002\022\017\n\007vm_zone\030\002 " + + "\001(\t\022\016\n\006subnet\030\003 \001(\t\")\n\021VmSelectionConfig" + + "\022\024\n\007vm_zone\030\001 \001(\tB\003\340A\002\"\033\n\tSshScript\022\016\n\006s" + + "cript\030\001 \001(\t\"\260\001\n\035ListConnectionProfilesRe" + + "quest\022F\n\006parent\030\001 \001(\tB6\340A\002\372A0\022.datamigra" + + "tion.googleapis.com/ConnectionProfile\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006" + + "filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\230\001\n\036ListC" + + "onnectionProfilesResponse\022H\n\023connection_" + + "profiles\030\001 \003(\0132+.google.cloud.clouddms.v" + + "1.ConnectionProfile\022\027\n\017next_page_token\030\002" + + " \001(\t\022\023\n\013unreachable\030\003 \003(\t\"c\n\033GetConnecti" + + "onProfileRequest\022D\n\004name\030\001 \001(\tB6\340A\002\372A0\n." + + "datamigration.googleapis.com/ConnectionP" + + "rofile\"\356\001\n\036CreateConnectionProfileReques" + + "t\022F\n\006parent\030\001 \001(\tB6\340A\002\372A0\n.datamigration" + + ".googleapis.com/ConnectionProfile\022\"\n\025con" + + "nection_profile_id\030\002 \001(\tB\003\340A\002\022L\n\022connect" + + "ion_profile\030\003 \001(\0132+.google.cloud.clouddm" + + "s.v1.ConnectionProfileB\003\340A\002\022\022\n\nrequest_i" + + "d\030\004 \001(\t\"\270\001\n\036UpdateConnectionProfileReque" + + "st\0224\n\013update_mask\030\001 \001(\0132\032.google.protobu" + + "f.FieldMaskB\003\340A\002\022L\n\022connection_profile\030\002" + + " \001(\0132+.google.cloud.clouddms.v1.Connecti" + + "onProfileB\003\340A\002\022\022\n\nrequest_id\030\003 \001(\t\"\211\001\n\036D" + + "eleteConnectionProfileRequest\022D\n\004name\030\001 " + + "\001(\tB6\340A\002\372A0\n.datamigration.googleapis.co" + + "m/ConnectionProfile\022\022\n\nrequest_id\030\002 \001(\t\022" + + "\r\n\005force\030\003 \001(\010\"\200\002\n\021OperationMetadata\0224\n\013" + + "create_time\030\001 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340" + + "A\003\022\021\n\004verb\030\004 \001(\tB\003\340A\003\022\033\n\016status_message\030" + + "\005 \001(\tB\003\340A\003\022#\n\026requested_cancellation\030\006 \001" + + "(\010B\003\340A\003\022\030\n\013api_version\030\007 \001(\tB\003\340A\0032\310\036\n\024Da" + + "taMigrationService\022\300\001\n\021ListMigrationJobs" + + "\0222.google.cloud.clouddms.v1.ListMigratio" + + "nJobsRequest\0323.google.cloud.clouddms.v1." + + "ListMigrationJobsResponse\"B\202\323\344\223\0023\0221/v1/{" + + "parent=projects/*/locations/*}/migration" + + "Jobs\332A\006parent\022\255\001\n\017GetMigrationJob\0220.goog" + + "le.cloud.clouddms.v1.GetMigrationJobRequ" + + "est\032&.google.cloud.clouddms.v1.Migration" + + "Job\"@\202\323\344\223\0023\0221/v1/{name=projects/*/locati" + + "ons/*/migrationJobs/*}\332A\004name\022\377\001\n\022Create" + + "MigrationJob\0223.google.cloud.clouddms.v1." + + "CreateMigrationJobRequest\032\035.google.longr" + + "unning.Operation\"\224\001\202\323\344\223\002B\"1/v1/{parent=p" + + "rojects/*/locations/*}/migrationJobs:\rmi" + + "gration_job\332A%parent,migration_job,migra" + + "tion_job_id\312A!\n\014MigrationJob\022\021OperationM" + + "etadata\022\201\002\n\022UpdateMigrationJob\0223.google." + + "cloud.clouddms.v1.UpdateMigrationJobRequ" + + "est\032\035.google.longrunning.Operation\"\226\001\202\323\344" + + "\223\002P2?/v1/{migration_job.name=projects/*/" + + "locations/*/migrationJobs/*}:\rmigration_" + + "job\332A\031migration_job,update_mask\312A!\n\014Migr" + + "ationJob\022\021OperationMetadata\022\327\001\n\022DeleteMi" + + "grationJob\0223.google.cloud.clouddms.v1.De" + + "leteMigrationJobRequest\032\035.google.longrun" + + "ning.Operation\"m\202\323\344\223\0023*1/v1/{name=projec" + + "ts/*/locations/*/migrationJobs/*}\332A\004name" + + "\312A*\n\025google.protobuf.Empty\022\021OperationMet" + + "adata\022\316\001\n\021StartMigrationJob\0222.google.clo" + + "ud.clouddms.v1.StartMigrationJobRequest\032" + + "\035.google.longrunning.Operation\"f\202\323\344\223\002<\"7" + + "/v1/{name=projects/*/locations/*/migrati" + + "onJobs/*}:start:\001*\312A!\n\014MigrationJob\022\021Ope" + + "rationMetadata\022\313\001\n\020StopMigrationJob\0221.go" + + "ogle.cloud.clouddms.v1.StopMigrationJobR" + + "equest\032\035.google.longrunning.Operation\"e\202" + + "\323\344\223\002;\"6/v1/{name=projects/*/locations/*/" + + "migrationJobs/*}:stop:\001*\312A!\n\014MigrationJo" + + "b\022\021OperationMetadata\022\321\001\n\022ResumeMigration" + + "Job\0223.google.cloud.clouddms.v1.ResumeMig" + + "rationJobRequest\032\035.google.longrunning.Op" + + "eration\"g\202\323\344\223\002=\"8/v1/{name=projects/*/lo" + + "cations/*/migrationJobs/*}:resume:\001*\312A!\n" + + "\014MigrationJob\022\021OperationMetadata\022\324\001\n\023Pro" + + "moteMigrationJob\0224.google.cloud.clouddms" + + ".v1.PromoteMigrationJobRequest\032\035.google." + + "longrunning.Operation\"h\202\323\344\223\002>\"9/v1/{name" + + "=projects/*/locations/*/migrationJobs/*}" + + ":promote:\001*\312A!\n\014MigrationJob\022\021OperationM" + + "etadata\022\321\001\n\022VerifyMigrationJob\0223.google." + + "cloud.clouddms.v1.VerifyMigrationJobRequ" + + "est\032\035.google.longrunning.Operation\"g\202\323\344\223" + + "\002=\"8/v1/{name=projects/*/locations/*/mig" + + "rationJobs/*}:verify:\001*\312A!\n\014MigrationJob" + + "\022\021OperationMetadata\022\324\001\n\023RestartMigration" + + "Job\0224.google.cloud.clouddms.v1.RestartMi" + + "grationJobRequest\032\035.google.longrunning.O" + + "peration\"h\202\323\344\223\002>\"9/v1/{name=projects/*/l" + + "ocations/*/migrationJobs/*}:restart:\001*\312A" + + "!\n\014MigrationJob\022\021OperationMetadata\022\305\001\n\021G" + + "enerateSshScript\0222.google.cloud.clouddms" + + ".v1.GenerateSshScriptRequest\032#.google.cl" + + "oud.clouddms.v1.SshScript\"W\202\323\344\223\002Q\"L/v1/{" + + "migration_job=projects/*/locations/*/mig" + + "rationJobs/*}:generateSshScript:\001*\022\324\001\n\026L" + + "istConnectionProfiles\0227.google.cloud.clo" + + "uddms.v1.ListConnectionProfilesRequest\0328" + + ".google.cloud.clouddms.v1.ListConnection" + + "ProfilesResponse\"G\202\323\344\223\0028\0226/v1/{parent=pr" + + "ojects/*/locations/*}/connectionProfiles" + + "\332A\006parent\022\301\001\n\024GetConnectionProfile\0225.goo" + + "gle.cloud.clouddms.v1.GetConnectionProfi" + + "leRequest\032+.google.cloud.clouddms.v1.Con" + + "nectionProfile\"E\202\323\344\223\0028\0226/v1/{name=projec" + + "ts/*/locations/*/connectionProfiles/*}\332A" + + "\004name\022\242\002\n\027CreateConnectionProfile\0228.goog" + + "le.cloud.clouddms.v1.CreateConnectionPro" + + "fileRequest\032\035.google.longrunning.Operati" + + "on\"\255\001\202\323\344\223\002L\"6/v1/{parent=projects/*/loca" + + "tions/*}/connectionProfiles:\022connection_" + + "profile\332A/parent,connection_profile,conn" + + "ection_profile_id\312A&\n\021ConnectionProfile\022" + + "\021OperationMetadata\022\244\002\n\027UpdateConnectionP" + + "rofile\0228.google.cloud.clouddms.v1.Update" + + "ConnectionProfileRequest\032\035.google.longru" + + "nning.Operation\"\257\001\202\323\344\223\002_2I/v1/{connectio" + + "n_profile.name=projects/*/locations/*/co" + + "nnectionProfiles/*}:\022connection_profile\332" + + "A\036connection_profile,update_mask\312A&\n\021Con" + + "nectionProfile\022\021OperationMetadata\022\346\001\n\027De" + + "leteConnectionProfile\0228.google.cloud.clo" + + "uddms.v1.DeleteConnectionProfileRequest\032" + + "\035.google.longrunning.Operation\"r\202\323\344\223\0028*6" + + "/v1/{name=projects/*/locations/*/connect" + + "ionProfiles/*}\332A\004name\312A*\n\025google.protobu" + + "f.Empty\022\021OperationMetadata\032P\312A\034datamigra" + + "tion.googleapis.com\322A.https://www.google" + + "apis.com/auth/cloud-platformBq\n\034com.goog" + + "le.cloud.clouddms.v1B\rClouddmsProtoP\001Z@g" + + "oogle.golang.org/genproto/googleapis/clo" + + "ud/clouddms/v1;clouddmsb\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.clouddms.v1.ClouddmsResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_clouddms_v1_ListMigrationJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_clouddms_v1_ListMigrationJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_ListMigrationJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_descriptor, + new java.lang.String[] { + "MigrationJobs", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_descriptor, + new java.lang.String[] { + "Parent", "MigrationJobId", "MigrationJob", "RequestId", + }); + internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "MigrationJob", "RequestId", + }); + internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", + }); + internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_descriptor, + new java.lang.String[] { + "MigrationJob", "Vm", "VmCreationConfig", "VmSelectionConfig", "VmPort", "VmConfig", + }); + internal_static_google_cloud_clouddms_v1_VmCreationConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_clouddms_v1_VmCreationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_VmCreationConfig_descriptor, + new java.lang.String[] { + "VmMachineType", "VmZone", "Subnet", + }); + internal_static_google_cloud_clouddms_v1_VmSelectionConfig_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_clouddms_v1_VmSelectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_VmSelectionConfig_descriptor, + new java.lang.String[] { + "VmZone", + }); + internal_static_google_cloud_clouddms_v1_SshScript_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_clouddms_v1_SshScript_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_SshScript_descriptor, + new java.lang.String[] { + "Script", + }); + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_descriptor, + new java.lang.String[] { + "ConnectionProfiles", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_descriptor, + new java.lang.String[] { + "Parent", "ConnectionProfileId", "ConnectionProfile", "RequestId", + }); + internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "ConnectionProfile", "RequestId", + }); + internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", + }); + internal_static_google_cloud_clouddms_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_clouddms_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + 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.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.clouddms.v1.ClouddmsResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ClouddmsResourcesProto.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ClouddmsResourcesProto.java new file mode 100644 index 00000000..0dbcee14 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ClouddmsResourcesProto.java @@ -0,0 +1,503 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public final class ClouddmsResourcesProto { + private ClouddmsResourcesProto() {} + + 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_clouddms_v1_SslConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_SslConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_SqlAclEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_SqlAclEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_SqlIpConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_SqlIpConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_UserLabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_UserLabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_DatabaseFlagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_DatabaseFlagsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_DatabaseType_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_DatabaseType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_MigrationJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_MigrationJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_MigrationJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_MigrationJob_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_ConnectionProfile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_ConnectionProfile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_ConnectionProfile_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_ConnectionProfile_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/clouddms/v1/clouddms_reso" + + "urces.proto\022\030google.cloud.clouddms.v1\032\037g" + + "oogle/api/field_behavior.proto\032\031google/a" + + "pi/resource.proto\032\036google/protobuf/durat" + + "ion.proto\032\037google/protobuf/timestamp.pro" + + "to\032\036google/protobuf/wrappers.proto\032\027goog" + + "le/rpc/status.proto\032\034google/api/annotati" + + "ons.proto\"\356\001\n\tSslConfig\022>\n\004type\030\001 \001(\0162+." + + "google.cloud.clouddms.v1.SslConfig.SslTy" + + "peB\003\340A\003\022\027\n\nclient_key\030\002 \001(\tB\003\340A\004\022\037\n\022clie" + + "nt_certificate\030\003 \001(\tB\003\340A\004\022\036\n\016ca_certific" + + "ate\030\004 \001(\tB\006\340A\004\340A\002\"G\n\007SslType\022\030\n\024SSL_TYPE" + + "_UNSPECIFIED\020\000\022\017\n\013SERVER_ONLY\020\001\022\021\n\rSERVE" + + "R_CLIENT\020\002\"\322\001\n\026MySqlConnectionProfile\022\021\n" + + "\004host\030\001 \001(\tB\003\340A\002\022\021\n\004port\030\002 \001(\005B\003\340A\002\022\025\n\010u" + + "sername\030\003 \001(\tB\003\340A\002\022\030\n\010password\030\004 \001(\tB\006\340A" + + "\004\340A\002\022\031\n\014password_set\030\005 \001(\010B\003\340A\003\0220\n\003ssl\030\006" + + " \001(\0132#.google.cloud.clouddms.v1.SslConfi" + + "g\022\024\n\014cloud_sql_id\030\007 \001(\t\"\327\001\n\033PostgreSqlCo" + + "nnectionProfile\022\021\n\004host\030\001 \001(\tB\003\340A\002\022\021\n\004po" + + "rt\030\002 \001(\005B\003\340A\002\022\025\n\010username\030\003 \001(\tB\003\340A\002\022\030\n\010" + + "password\030\004 \001(\tB\006\340A\004\340A\002\022\031\n\014password_set\030\005" + + " \001(\010B\003\340A\003\0220\n\003ssl\030\006 \001(\0132#.google.cloud.cl" + + "ouddms.v1.SslConfig\022\024\n\014cloud_sql_id\030\007 \001(" + + "\t\"\252\001\n\031CloudSqlConnectionProfile\022\031\n\014cloud" + + "_sql_id\030\001 \001(\tB\003\340A\003\022A\n\010settings\030\002 \001(\0132*.g" + + "oogle.cloud.clouddms.v1.CloudSqlSettings" + + "B\003\340A\005\022\027\n\nprivate_ip\030\003 \001(\tB\003\340A\003\022\026\n\tpublic" + + "_ip\030\004 \001(\tB\003\340A\003\"\233\001\n\013SqlAclEntry\022\r\n\005value\030" + + "\001 \001(\t\0221\n\013expire_time\030\n \001(\0132\032.google.prot" + + "obuf.TimestampH\000\022-\n\003ttl\030\013 \001(\0132\031.google.p" + + "rotobuf.DurationB\003\340A\004H\000\022\r\n\005label\030\003 \001(\tB\014" + + "\n\nexpiration\"\314\001\n\013SqlIpConfig\022/\n\013enable_i" + + "pv4\030\001 \001(\0132\032.google.protobuf.BoolValue\022\027\n" + + "\017private_network\030\002 \001(\t\022/\n\013require_ssl\030\003 " + + "\001(\0132\032.google.protobuf.BoolValue\022B\n\023autho" + + "rized_networks\030\004 \003(\0132%.google.cloud.clou" + + "ddms.v1.SqlAclEntry\"\372\t\n\020CloudSqlSettings" + + "\022W\n\020database_version\030\001 \001(\0162=.google.clou" + + "d.clouddms.v1.CloudSqlSettings.SqlDataba" + + "seVersion\022O\n\013user_labels\030\002 \003(\0132:.google." + + "cloud.clouddms.v1.CloudSqlSettings.UserL" + + "abelsEntry\022\014\n\004tier\030\003 \001(\t\022>\n\031storage_auto" + + "_resize_limit\030\004 \001(\0132\033.google.protobuf.In" + + "t64Value\022Y\n\021activation_policy\030\005 \001(\0162>.go" + + "ogle.cloud.clouddms.v1.CloudSqlSettings." + + "SqlActivationPolicy\0228\n\tip_config\030\006 \001(\0132%" + + ".google.cloud.clouddms.v1.SqlIpConfig\0229\n" + + "\025auto_storage_increase\030\007 \001(\0132\032.google.pr" + + "otobuf.BoolValue\022U\n\016database_flags\030\010 \003(\013" + + "2=.google.cloud.clouddms.v1.CloudSqlSett" + + "ings.DatabaseFlagsEntry\022R\n\016data_disk_typ" + + "e\030\t \001(\0162:.google.cloud.clouddms.v1.Cloud" + + "SqlSettings.SqlDataDiskType\0226\n\021data_disk" + + "_size_gb\030\n \001(\0132\033.google.protobuf.Int64Va" + + "lue\022\014\n\004zone\030\013 \001(\t\022\021\n\tsource_id\030\014 \001(\t\022\032\n\r" + + "root_password\030\r \001(\tB\003\340A\004\022\036\n\021root_passwor" + + "d_set\030\016 \001(\010B\003\340A\003\022\021\n\tcollation\030\017 \001(\t\0321\n\017U" + + "serLabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\0324\n\022DatabaseFlagsEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"S\n\023SqlActivationPol" + + "icy\022%\n!SQL_ACTIVATION_POLICY_UNSPECIFIED" + + "\020\000\022\n\n\006ALWAYS\020\001\022\t\n\005NEVER\020\002\"M\n\017SqlDataDisk" + + "Type\022\"\n\036SQL_DATA_DISK_TYPE_UNSPECIFIED\020\000" + + "\022\n\n\006PD_SSD\020\001\022\n\n\006PD_HDD\020\002\"\275\001\n\022SqlDatabase" + + "Version\022$\n SQL_DATABASE_VERSION_UNSPECIF" + + "IED\020\000\022\r\n\tMYSQL_5_6\020\001\022\r\n\tMYSQL_5_7\020\002\022\020\n\014P" + + "OSTGRES_9_6\020\003\022\017\n\013POSTGRES_11\020\004\022\017\n\013POSTGR" + + "ES_10\020\005\022\r\n\tMYSQL_8_0\020\006\022\017\n\013POSTGRES_12\020\007\022" + + "\017\n\013POSTGRES_13\020\010\"\026\n\024StaticIpConnectivity" + + "\"[\n\026ReverseSshConnectivity\022\022\n\005vm_ip\030\001 \001(" + + "\tB\003\340A\002\022\024\n\007vm_port\030\002 \001(\005B\003\340A\002\022\n\n\002vm\030\003 \001(\t" + + "\022\013\n\003vpc\030\004 \001(\t\"%\n\026VpcPeeringConnectivity\022" + + "\013\n\003vpc\030\001 \001(\t\"\206\001\n\014DatabaseType\022<\n\010provide" + + "r\030\001 \001(\0162*.google.cloud.clouddms.v1.Datab" + + "aseProvider\0228\n\006engine\030\002 \001(\0162(.google.clo" + + "ud.clouddms.v1.DatabaseEngine\"\354\014\n\014Migrat" + + "ionJob\022\014\n\004name\030\001 \001(\t\0224\n\013create_time\030\002 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013up" + + "date_time\030\003 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\022B\n\006labels\030\004 \003(\01322.google.cloud." + + "clouddms.v1.MigrationJob.LabelsEntry\022\024\n\014" + + "display_name\030\005 \001(\t\022;\n\005state\030\006 \001(\0162,.goog" + + "le.cloud.clouddms.v1.MigrationJob.State\022" + + "@\n\005phase\030\007 \001(\0162,.google.cloud.clouddms.v" + + "1.MigrationJob.PhaseB\003\340A\003\022>\n\004type\030\010 \001(\0162" + + "+.google.cloud.clouddms.v1.MigrationJob." + + "TypeB\003\340A\002\022\021\n\tdump_path\030\t \001(\t\022\023\n\006source\030\n" + + " \001(\tB\003\340A\002\022\030\n\013destination\030\013 \001(\tB\003\340A\002\022T\n\030r" + + "everse_ssh_connectivity\030e \001(\01320.google.c" + + "loud.clouddms.v1.ReverseSshConnectivityH" + + "\000\022T\n\030vpc_peering_connectivity\030f \001(\01320.go" + + "ogle.cloud.clouddms.v1.VpcPeeringConnect" + + "ivityH\000\022P\n\026static_ip_connectivity\030g \001(\0132" + + "..google.cloud.clouddms.v1.StaticIpConne" + + "ctivityH\000\0220\n\010duration\030\014 \001(\0132\031.google.pro" + + "tobuf.DurationB\003\340A\003\022&\n\005error\030\r \001(\0132\022.goo" + + "gle.rpc.StatusB\003\340A\003\022?\n\017source_database\030\016" + + " \001(\0132&.google.cloud.clouddms.v1.Database" + + "Type\022D\n\024destination_database\030\017 \001(\0132&.goo" + + "gle.cloud.clouddms.v1.DatabaseType\0221\n\010en" + + "d_time\030\020 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\"\361\001\n\005State\022\025\n\021STATE_UNSPECIF" + + "IED\020\000\022\017\n\013MAINTENANCE\020\001\022\t\n\005DRAFT\020\002\022\014\n\010CRE" + + "ATING\020\003\022\017\n\013NOT_STARTED\020\004\022\013\n\007RUNNING\020\005\022\n\n" + + "\006FAILED\020\006\022\r\n\tCOMPLETED\020\007\022\014\n\010DELETING\020\010\022\014" + + "\n\010STOPPING\020\t\022\013\n\007STOPPED\020\n\022\013\n\007DELETED\020\013\022\014" + + "\n\010UPDATING\020\014\022\014\n\010STARTING\020\r\022\016\n\nRESTARTING" + + "\020\016\022\014\n\010RESUMING\020\017\"\216\001\n\005Phase\022\025\n\021PHASE_UNSP" + + "ECIFIED\020\000\022\r\n\tFULL_DUMP\020\001\022\007\n\003CDC\020\002\022\027\n\023PRO" + + "MOTE_IN_PROGRESS\020\003\022%\n!WAITING_FOR_SOURCE" + + "_WRITES_TO_STOP\020\004\022\026\n\022PREPARING_THE_DUMP\020" + + "\005\":\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\014\n\010ONE_T" + + "IME\020\001\022\016\n\nCONTINUOUS\020\002:u\352Ar\n)datamigratio" + + "n.googleapis.com/MigrationJob\022Eprojects/" + + "{project}/locations/{location}/migration" + + "Jobs/{migration_job}B\016\n\014connectivity\"\263\007\n" + + "\021ConnectionProfile\022\014\n\004name\030\001 \001(\t\0224\n\013crea" + + "te_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022G\n\006labels\030\004 \003(\01327.g" + + "oogle.cloud.clouddms.v1.ConnectionProfil" + + "e.LabelsEntry\022@\n\005state\030\005 \001(\01621.google.cl" + + "oud.clouddms.v1.ConnectionProfile.State\022" + + "\024\n\014display_name\030\006 \001(\t\022A\n\005mysql\030d \001(\01320.g" + + "oogle.cloud.clouddms.v1.MySqlConnectionP" + + "rofileH\000\022K\n\npostgresql\030e \001(\01325.google.cl" + + "oud.clouddms.v1.PostgreSqlConnectionProf" + + "ileH\000\022G\n\010cloudsql\030f \001(\01323.google.cloud.c" + + "louddms.v1.CloudSqlConnectionProfileH\000\022&" + + "\n\005error\030\007 \001(\0132\022.google.rpc.StatusB\003\340A\003\022<" + + "\n\010provider\030\010 \001(\0162*.google.cloud.clouddms" + + ".v1.DatabaseProvider\032-\n\013LabelsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"w\n\005State\022\025\n\021" + + "STATE_UNSPECIFIED\020\000\022\t\n\005DRAFT\020\001\022\014\n\010CREATI" + + "NG\020\002\022\t\n\005READY\020\003\022\014\n\010UPDATING\020\004\022\014\n\010DELETIN" + + "G\020\005\022\013\n\007DELETED\020\006\022\n\n\006FAILED\020\007:\205\001\352A\201\001\n.dat" + + "amigration.googleapis.com/ConnectionProf" + + "ile\022Oprojects/{project}/locations/{locat" + + "ion}/connectionProfiles/{connection_prof" + + "ile}B\024\n\022connection_profile\"\320\006\n\035Migration" + + "JobVerificationError\022Z\n\nerror_code\030\001 \001(\016" + + "2A.google.cloud.clouddms.v1.MigrationJob" + + "VerificationError.ErrorCodeB\003\340A\003\022\032\n\rerro" + + "r_message\030\002 \001(\tB\003\340A\003\022!\n\024error_detail_mes" + + "sage\030\003 \001(\tB\003\340A\003\"\223\005\n\tErrorCode\022\032\n\026ERROR_C" + + "ODE_UNSPECIFIED\020\000\022\026\n\022CONNECTION_FAILURE\020" + + "\001\022\032\n\026AUTHENTICATION_FAILURE\020\002\022%\n!INVALID" + + "_CONNECTION_PROFILE_CONFIG\020\003\022\033\n\027VERSION_" + + "INCOMPATIBILITY\020\004\022,\n(CONNECTION_PROFILE_" + + "TYPES_INCOMPATIBILITY\020\005\022\032\n\026NO_PGLOGICAL_" + + "INSTALLED\020\007\022!\n\035PGLOGICAL_NODE_ALREADY_EX" + + "ISTS\020\010\022\025\n\021INVALID_WAL_LEVEL\020\t\022\"\n\036INVALID" + + "_SHARED_PRELOAD_LIBRARY\020\n\022&\n\"INSUFFICIEN" + + "T_MAX_REPLICATION_SLOTS\020\013\022 \n\034INSUFFICIEN" + + "T_MAX_WAL_SENDERS\020\014\022%\n!INSUFFICIENT_MAX_" + + "WORKER_PROCESSES\020\r\022\032\n\026UNSUPPORTED_EXTENS" + + "IONS\020\016\022\036\n\032UNSUPPORTED_MIGRATION_TYPE\020\017\022#" + + "\n\037INVALID_RDS_LOGICAL_REPLICATION\020\020\022\031\n\025U" + + "NSUPPORTED_GTID_MODE\020\021\022 \n\034UNSUPPORTED_TA" + + "BLE_DEFINITION\020\022\022\027\n\023UNSUPPORTED_DEFINER\020" + + "\023\022\"\n\036CANT_RESTART_RUNNING_MIGRATION\020\025*L\n" + + "\016DatabaseEngine\022\037\n\033DATABASE_ENGINE_UNSPE" + + "CIFIED\020\000\022\t\n\005MYSQL\020\001\022\016\n\nPOSTGRESQL\020\002*L\n\020D" + + "atabaseProvider\022!\n\035DATABASE_PROVIDER_UNS" + + "PECIFIED\020\000\022\014\n\010CLOUDSQL\020\001\022\007\n\003RDS\020\002Bz\n\034com" + + ".google.cloud.clouddms.v1B\026ClouddmsResou" + + "rcesProtoP\001Z@google.golang.org/genproto/" + + "googleapis/cloud/clouddms/v1;clouddmsb\006p" + + "roto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_clouddms_v1_SslConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_clouddms_v1_SslConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_SslConfig_descriptor, + new java.lang.String[] { + "Type", "ClientKey", "ClientCertificate", "CaCertificate", + }); + internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_descriptor, + new java.lang.String[] { + "Host", "Port", "Username", "Password", "PasswordSet", "Ssl", "CloudSqlId", + }); + internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_descriptor, + new java.lang.String[] { + "Host", "Port", "Username", "Password", "PasswordSet", "Ssl", "CloudSqlId", + }); + internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_CloudSqlConnectionProfile_descriptor, + new java.lang.String[] { + "CloudSqlId", "Settings", "PrivateIp", "PublicIp", + }); + internal_static_google_cloud_clouddms_v1_SqlAclEntry_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_clouddms_v1_SqlAclEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_SqlAclEntry_descriptor, + new java.lang.String[] { + "Value", "ExpireTime", "Ttl", "Label", "Expiration", + }); + internal_static_google_cloud_clouddms_v1_SqlIpConfig_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_clouddms_v1_SqlIpConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_SqlIpConfig_descriptor, + new java.lang.String[] { + "EnableIpv4", "PrivateNetwork", "RequireSsl", "AuthorizedNetworks", + }); + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_descriptor, + new java.lang.String[] { + "DatabaseVersion", + "UserLabels", + "Tier", + "StorageAutoResizeLimit", + "ActivationPolicy", + "IpConfig", + "AutoStorageIncrease", + "DatabaseFlags", + "DataDiskType", + "DataDiskSizeGb", + "Zone", + "SourceId", + "RootPassword", + "RootPasswordSet", + "Collation", + }); + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_UserLabelsEntry_descriptor = + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_UserLabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_UserLabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_DatabaseFlagsEntry_descriptor = + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_DatabaseFlagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_CloudSqlSettings_DatabaseFlagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_descriptor, + new java.lang.String[] { + "VmIp", "VmPort", "Vm", "Vpc", + }); + internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_descriptor, + new java.lang.String[] { + "Vpc", + }); + internal_static_google_cloud_clouddms_v1_DatabaseType_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_clouddms_v1_DatabaseType_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_DatabaseType_descriptor, + new java.lang.String[] { + "Provider", "Engine", + }); + internal_static_google_cloud_clouddms_v1_MigrationJob_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_clouddms_v1_MigrationJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_MigrationJob_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "DisplayName", + "State", + "Phase", + "Type", + "DumpPath", + "Source", + "Destination", + "ReverseSshConnectivity", + "VpcPeeringConnectivity", + "StaticIpConnectivity", + "Duration", + "Error", + "SourceDatabase", + "DestinationDatabase", + "EndTime", + "Connectivity", + }); + internal_static_google_cloud_clouddms_v1_MigrationJob_LabelsEntry_descriptor = + internal_static_google_cloud_clouddms_v1_MigrationJob_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_clouddms_v1_MigrationJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_MigrationJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_clouddms_v1_ConnectionProfile_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_clouddms_v1_ConnectionProfile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_ConnectionProfile_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "State", + "DisplayName", + "Mysql", + "Postgresql", + "Cloudsql", + "Error", + "Provider", + "ConnectionProfile", + }); + internal_static_google_cloud_clouddms_v1_ConnectionProfile_LabelsEntry_descriptor = + internal_static_google_cloud_clouddms_v1_ConnectionProfile_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_clouddms_v1_ConnectionProfile_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_ConnectionProfile_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_descriptor, + new java.lang.String[] { + "ErrorCode", "ErrorMessage", "ErrorDetailMessage", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ConnectionProfile.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ConnectionProfile.java new file mode 100644 index 00000000..8dcb9b43 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ConnectionProfile.java @@ -0,0 +1,3663 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * A connection profile definition.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ConnectionProfile} + */ +public final class ConnectionProfile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.ConnectionProfile) + ConnectionProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConnectionProfile.newBuilder() to construct. + private ConnectionProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionProfile() { + name_ = ""; + state_ = 0; + displayName_ = ""; + provider_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConnectionProfile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConnectionProfile( + 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: + { + 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 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + 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 40: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 58: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + int rawValue = input.readEnum(); + + provider_ = rawValue; + break; + } + case 802: + { + com.google.cloud.clouddms.v1.MySqlConnectionProfile.Builder subBuilder = null; + if (connectionProfileCase_ == 100) { + subBuilder = + ((com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_) + .toBuilder(); + } + connectionProfile_ = + input.readMessage( + com.google.cloud.clouddms.v1.MySqlConnectionProfile.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_); + connectionProfile_ = subBuilder.buildPartial(); + } + connectionProfileCase_ = 100; + break; + } + case 810: + { + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.Builder subBuilder = null; + if (connectionProfileCase_ == 101) { + subBuilder = + ((com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_) + .toBuilder(); + } + connectionProfile_ = + input.readMessage( + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_); + connectionProfile_ = subBuilder.buildPartial(); + } + connectionProfileCase_ = 101; + break; + } + case 818: + { + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.Builder subBuilder = null; + if (connectionProfileCase_ == 102) { + subBuilder = + ((com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_) + .toBuilder(); + } + connectionProfile_ = + input.readMessage( + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_); + connectionProfile_ = subBuilder.buildPartial(); + } + connectionProfileCase_ = 102; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ConnectionProfile_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + 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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ConnectionProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ConnectionProfile.class, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder.class); + } + + /** + * + * + *
+   * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+   * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.ConnectionProfile.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The state of the connection profile is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The connection profile is in draft mode and fully editable.
+     * 
+ * + * DRAFT = 1; + */ + DRAFT(1), + /** + * + * + *
+     * The connection profile is being created.
+     * 
+ * + * CREATING = 2; + */ + CREATING(2), + /** + * + * + *
+     * The connection profile is ready.
+     * 
+ * + * READY = 3; + */ + READY(3), + /** + * + * + *
+     * The connection profile is being updated.
+     * 
+ * + * UPDATING = 4; + */ + UPDATING(4), + /** + * + * + *
+     * The connection profile is being deleted.
+     * 
+ * + * DELETING = 5; + */ + DELETING(5), + /** + * + * + *
+     * The connection profile has been deleted.
+     * 
+ * + * DELETED = 6; + */ + DELETED(6), + /** + * + * + *
+     * The last action on the connection profile failed.
+     * 
+ * + * FAILED = 7; + */ + FAILED(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The state of the connection profile is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The connection profile is in draft mode and fully editable.
+     * 
+ * + * DRAFT = 1; + */ + public static final int DRAFT_VALUE = 1; + /** + * + * + *
+     * The connection profile is being created.
+     * 
+ * + * CREATING = 2; + */ + public static final int CREATING_VALUE = 2; + /** + * + * + *
+     * The connection profile is ready.
+     * 
+ * + * READY = 3; + */ + public static final int READY_VALUE = 3; + /** + * + * + *
+     * The connection profile is being updated.
+     * 
+ * + * UPDATING = 4; + */ + public static final int UPDATING_VALUE = 4; + /** + * + * + *
+     * The connection profile is being deleted.
+     * 
+ * + * DELETING = 5; + */ + public static final int DELETING_VALUE = 5; + /** + * + * + *
+     * The connection profile has been deleted.
+     * 
+ * + * DELETED = 6; + */ + public static final int DELETED_VALUE = 6; + /** + * + * + *
+     * The last action on the connection profile failed.
+     * 
+ * + * FAILED = 7; + */ + public static final int FAILED_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 DRAFT; + case 2: + return CREATING; + case 3: + return READY; + case 4: + return UPDATING; + case 5: + return DELETING; + case 6: + return DELETED; + case 7: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ConnectionProfile.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.clouddms.v1.ConnectionProfile.State) + } + + private int connectionProfileCase_ = 0; + private java.lang.Object connectionProfile_; + + public enum ConnectionProfileCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MYSQL(100), + POSTGRESQL(101), + CLOUDSQL(102), + CONNECTIONPROFILE_NOT_SET(0); + private final int value; + + private ConnectionProfileCase(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 ConnectionProfileCase valueOf(int value) { + return forNumber(value); + } + + public static ConnectionProfileCase forNumber(int value) { + switch (value) { + case 100: + return MYSQL; + case 101: + return POSTGRESQL; + case 102: + return CLOUDSQL; + case 0: + return CONNECTIONPROFILE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConnectionProfileCase getConnectionProfileCase() { + return ConnectionProfileCase.forNumber(connectionProfileCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of this connection profile resource in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * 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 this connection profile resource in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * 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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ConnectionProfile_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The resource labels for connection profile to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The resource labels for connection profile to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The resource labels for connection profile to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The resource labels for connection profile to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_; + /** + * + * + *
+   * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+   * 
+ * + * .google.cloud.clouddms.v1.ConnectionProfile.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+   * 
+ * + * .google.cloud.clouddms.v1.ConnectionProfile.State state = 5; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfile.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.ConnectionProfile.State result = + com.google.cloud.clouddms.v1.ConnectionProfile.State.valueOf(state_); + return result == null + ? com.google.cloud.clouddms.v1.ConnectionProfile.State.UNRECOGNIZED + : result; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The connection profile display name.
+   * 
+ * + * string display_name = 6; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The connection profile display name.
+   * 
+ * + * string display_name = 6; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MYSQL_FIELD_NUMBER = 100; + /** + * + * + *
+   * A MySQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + * + * @return Whether the mysql field is set. + */ + @java.lang.Override + public boolean hasMysql() { + return connectionProfileCase_ == 100; + } + /** + * + * + *
+   * A MySQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + * + * @return The mysql. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MySqlConnectionProfile getMysql() { + if (connectionProfileCase_ == 100) { + return (com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.MySqlConnectionProfile.getDefaultInstance(); + } + /** + * + * + *
+   * A MySQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MySqlConnectionProfileOrBuilder getMysqlOrBuilder() { + if (connectionProfileCase_ == 100) { + return (com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.MySqlConnectionProfile.getDefaultInstance(); + } + + public static final int POSTGRESQL_FIELD_NUMBER = 101; + /** + * + * + *
+   * A PostgreSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + * + * @return Whether the postgresql field is set. + */ + @java.lang.Override + public boolean hasPostgresql() { + return connectionProfileCase_ == 101; + } + /** + * + * + *
+   * A PostgreSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + * + * @return The postgresql. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile getPostgresql() { + if (connectionProfileCase_ == 101) { + return (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.getDefaultInstance(); + } + /** + * + * + *
+   * A PostgreSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.PostgreSqlConnectionProfileOrBuilder + getPostgresqlOrBuilder() { + if (connectionProfileCase_ == 101) { + return (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.getDefaultInstance(); + } + + public static final int CLOUDSQL_FIELD_NUMBER = 102; + /** + * + * + *
+   * A CloudSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + * + * @return Whether the cloudsql field is set. + */ + @java.lang.Override + public boolean hasCloudsql() { + return connectionProfileCase_ == 102; + } + /** + * + * + *
+   * A CloudSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + * + * @return The cloudsql. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlConnectionProfile getCloudsql() { + if (connectionProfileCase_ == 102) { + return (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.getDefaultInstance(); + } + /** + * + * + *
+   * A CloudSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlConnectionProfileOrBuilder getCloudsqlOrBuilder() { + if (connectionProfileCase_ == 102) { + return (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 7; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int PROVIDER_FIELD_NUMBER = 8; + private int provider_; + /** + * + * + *
+   * The database provider.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 8; + * + * @return The enum numeric value on the wire for provider. + */ + @java.lang.Override + public int getProviderValue() { + return provider_; + } + /** + * + * + *
+   * The database provider.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 8; + * + * @return The provider. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseProvider getProvider() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.DatabaseProvider result = + com.google.cloud.clouddms.v1.DatabaseProvider.valueOf(provider_); + return result == null ? com.google.cloud.clouddms.v1.DatabaseProvider.UNRECOGNIZED : result; + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (state_ + != com.google.cloud.clouddms.v1.ConnectionProfile.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, displayName_); + } + if (error_ != null) { + output.writeMessage(7, getError()); + } + if (provider_ + != com.google.cloud.clouddms.v1.DatabaseProvider.DATABASE_PROVIDER_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, provider_); + } + if (connectionProfileCase_ == 100) { + output.writeMessage( + 100, (com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_); + } + if (connectionProfileCase_ == 101) { + output.writeMessage( + 101, (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_); + } + if (connectionProfileCase_ == 102) { + output.writeMessage( + 102, (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + 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(4, labels__); + } + if (state_ + != com.google.cloud.clouddms.v1.ConnectionProfile.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, displayName_); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getError()); + } + if (provider_ + != com.google.cloud.clouddms.v1.DatabaseProvider.DATABASE_PROVIDER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, provider_); + } + if (connectionProfileCase_ == 100) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 100, (com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_); + } + if (connectionProfileCase_ == 101) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 101, (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_); + } + if (connectionProfileCase_ == 102) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 102, (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_); + } + 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.clouddms.v1.ConnectionProfile)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.ConnectionProfile other = + (com.google.cloud.clouddms.v1.ConnectionProfile) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (state_ != other.state_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (provider_ != other.provider_) return false; + if (!getConnectionProfileCase().equals(other.getConnectionProfileCase())) return false; + switch (connectionProfileCase_) { + case 100: + if (!getMysql().equals(other.getMysql())) return false; + break; + case 101: + if (!getPostgresql().equals(other.getPostgresql())) return false; + break; + case 102: + if (!getCloudsql().equals(other.getCloudsql())) 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(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (37 * hash) + PROVIDER_FIELD_NUMBER; + hash = (53 * hash) + provider_; + switch (connectionProfileCase_) { + case 100: + hash = (37 * hash) + MYSQL_FIELD_NUMBER; + hash = (53 * hash) + getMysql().hashCode(); + break; + case 101: + hash = (37 * hash) + POSTGRESQL_FIELD_NUMBER; + hash = (53 * hash) + getPostgresql().hashCode(); + break; + case 102: + hash = (37 * hash) + CLOUDSQL_FIELD_NUMBER; + hash = (53 * hash) + getCloudsql().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.ConnectionProfile parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ConnectionProfile 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.clouddms.v1.ConnectionProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ConnectionProfile 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.clouddms.v1.ConnectionProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ConnectionProfile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.ConnectionProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ConnectionProfile 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.clouddms.v1.ConnectionProfile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ConnectionProfile 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.clouddms.v1.ConnectionProfile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ConnectionProfile 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.clouddms.v1.ConnectionProfile 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 connection profile definition.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ConnectionProfile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.ConnectionProfile) + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ConnectionProfile_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + 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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ConnectionProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ConnectionProfile.class, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.ConnectionProfile.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_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + state_ = 0; + + displayName_ = ""; + + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + provider_ = 0; + + connectionProfileCase_ = 0; + connectionProfile_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ConnectionProfile_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfile getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfile build() { + com.google.cloud.clouddms.v1.ConnectionProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfile buildPartial() { + com.google.cloud.clouddms.v1.ConnectionProfile result = + new com.google.cloud.clouddms.v1.ConnectionProfile(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.state_ = state_; + result.displayName_ = displayName_; + if (connectionProfileCase_ == 100) { + if (mysqlBuilder_ == null) { + result.connectionProfile_ = connectionProfile_; + } else { + result.connectionProfile_ = mysqlBuilder_.build(); + } + } + if (connectionProfileCase_ == 101) { + if (postgresqlBuilder_ == null) { + result.connectionProfile_ = connectionProfile_; + } else { + result.connectionProfile_ = postgresqlBuilder_.build(); + } + } + if (connectionProfileCase_ == 102) { + if (cloudsqlBuilder_ == null) { + result.connectionProfile_ = connectionProfile_; + } else { + result.connectionProfile_ = cloudsqlBuilder_.build(); + } + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + result.provider_ = provider_; + result.connectionProfileCase_ = connectionProfileCase_; + 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.clouddms.v1.ConnectionProfile) { + return mergeFrom((com.google.cloud.clouddms.v1.ConnectionProfile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.ConnectionProfile other) { + if (other == com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.provider_ != 0) { + setProviderValue(other.getProviderValue()); + } + switch (other.getConnectionProfileCase()) { + case MYSQL: + { + mergeMysql(other.getMysql()); + break; + } + case POSTGRESQL: + { + mergePostgresql(other.getPostgresql()); + break; + } + case CLOUDSQL: + { + mergeCloudsql(other.getCloudsql()); + break; + } + case CONNECTIONPROFILE_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.clouddms.v1.ConnectionProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.ConnectionProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int connectionProfileCase_ = 0; + private java.lang.Object connectionProfile_; + + public ConnectionProfileCase getConnectionProfileCase() { + return ConnectionProfileCase.forNumber(connectionProfileCase_); + } + + public Builder clearConnectionProfile() { + connectionProfileCase_ = 0; + connectionProfile_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of this connection profile resource in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * 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 this connection profile resource in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * 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 this connection profile resource in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * 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 this connection profile resource in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this connection profile resource in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * 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 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 timestamp when the resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_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> + 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 updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The resource labels for connection profile to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The resource labels for connection profile to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The resource labels for connection profile to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The resource labels for connection profile to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + 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; + } + /** + * + * + *
+     * The resource labels for connection profile to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The resource labels for connection profile to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The resource labels for connection profile to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+     * 
+ * + * .google.cloud.clouddms.v1.ConnectionProfile.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+     * 
+ * + * .google.cloud.clouddms.v1.ConnectionProfile.State state = 5; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+     * 
+ * + * .google.cloud.clouddms.v1.ConnectionProfile.State state = 5; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfile.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.ConnectionProfile.State result = + com.google.cloud.clouddms.v1.ConnectionProfile.State.valueOf(state_); + return result == null + ? com.google.cloud.clouddms.v1.ConnectionProfile.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+     * 
+ * + * .google.cloud.clouddms.v1.ConnectionProfile.State state = 5; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.clouddms.v1.ConnectionProfile.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+     * 
+ * + * .google.cloud.clouddms.v1.ConnectionProfile.State state = 5; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The connection profile display name.
+     * 
+ * + * string display_name = 6; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The connection profile display name.
+     * 
+ * + * string display_name = 6; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The connection profile display name.
+     * 
+ * + * string display_name = 6; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The connection profile display name.
+     * 
+ * + * string display_name = 6; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The connection profile display name.
+     * 
+ * + * string display_name = 6; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.MySqlConnectionProfile, + com.google.cloud.clouddms.v1.MySqlConnectionProfile.Builder, + com.google.cloud.clouddms.v1.MySqlConnectionProfileOrBuilder> + mysqlBuilder_; + /** + * + * + *
+     * A MySQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + * + * @return Whether the mysql field is set. + */ + @java.lang.Override + public boolean hasMysql() { + return connectionProfileCase_ == 100; + } + /** + * + * + *
+     * A MySQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + * + * @return The mysql. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MySqlConnectionProfile getMysql() { + if (mysqlBuilder_ == null) { + if (connectionProfileCase_ == 100) { + return (com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.MySqlConnectionProfile.getDefaultInstance(); + } else { + if (connectionProfileCase_ == 100) { + return mysqlBuilder_.getMessage(); + } + return com.google.cloud.clouddms.v1.MySqlConnectionProfile.getDefaultInstance(); + } + } + /** + * + * + *
+     * A MySQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + */ + public Builder setMysql(com.google.cloud.clouddms.v1.MySqlConnectionProfile value) { + if (mysqlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionProfile_ = value; + onChanged(); + } else { + mysqlBuilder_.setMessage(value); + } + connectionProfileCase_ = 100; + return this; + } + /** + * + * + *
+     * A MySQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + */ + public Builder setMysql( + com.google.cloud.clouddms.v1.MySqlConnectionProfile.Builder builderForValue) { + if (mysqlBuilder_ == null) { + connectionProfile_ = builderForValue.build(); + onChanged(); + } else { + mysqlBuilder_.setMessage(builderForValue.build()); + } + connectionProfileCase_ = 100; + return this; + } + /** + * + * + *
+     * A MySQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + */ + public Builder mergeMysql(com.google.cloud.clouddms.v1.MySqlConnectionProfile value) { + if (mysqlBuilder_ == null) { + if (connectionProfileCase_ == 100 + && connectionProfile_ + != com.google.cloud.clouddms.v1.MySqlConnectionProfile.getDefaultInstance()) { + connectionProfile_ = + com.google.cloud.clouddms.v1.MySqlConnectionProfile.newBuilder( + (com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_) + .mergeFrom(value) + .buildPartial(); + } else { + connectionProfile_ = value; + } + onChanged(); + } else { + if (connectionProfileCase_ == 100) { + mysqlBuilder_.mergeFrom(value); + } + mysqlBuilder_.setMessage(value); + } + connectionProfileCase_ = 100; + return this; + } + /** + * + * + *
+     * A MySQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + */ + public Builder clearMysql() { + if (mysqlBuilder_ == null) { + if (connectionProfileCase_ == 100) { + connectionProfileCase_ = 0; + connectionProfile_ = null; + onChanged(); + } + } else { + if (connectionProfileCase_ == 100) { + connectionProfileCase_ = 0; + connectionProfile_ = null; + } + mysqlBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A MySQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + */ + public com.google.cloud.clouddms.v1.MySqlConnectionProfile.Builder getMysqlBuilder() { + return getMysqlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A MySQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MySqlConnectionProfileOrBuilder getMysqlOrBuilder() { + if ((connectionProfileCase_ == 100) && (mysqlBuilder_ != null)) { + return mysqlBuilder_.getMessageOrBuilder(); + } else { + if (connectionProfileCase_ == 100) { + return (com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.MySqlConnectionProfile.getDefaultInstance(); + } + } + /** + * + * + *
+     * A MySQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.MySqlConnectionProfile, + com.google.cloud.clouddms.v1.MySqlConnectionProfile.Builder, + com.google.cloud.clouddms.v1.MySqlConnectionProfileOrBuilder> + getMysqlFieldBuilder() { + if (mysqlBuilder_ == null) { + if (!(connectionProfileCase_ == 100)) { + connectionProfile_ = + com.google.cloud.clouddms.v1.MySqlConnectionProfile.getDefaultInstance(); + } + mysqlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.MySqlConnectionProfile, + com.google.cloud.clouddms.v1.MySqlConnectionProfile.Builder, + com.google.cloud.clouddms.v1.MySqlConnectionProfileOrBuilder>( + (com.google.cloud.clouddms.v1.MySqlConnectionProfile) connectionProfile_, + getParentForChildren(), + isClean()); + connectionProfile_ = null; + } + connectionProfileCase_ = 100; + onChanged(); + ; + return mysqlBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile, + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.Builder, + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfileOrBuilder> + postgresqlBuilder_; + /** + * + * + *
+     * A PostgreSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + * + * @return Whether the postgresql field is set. + */ + @java.lang.Override + public boolean hasPostgresql() { + return connectionProfileCase_ == 101; + } + /** + * + * + *
+     * A PostgreSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + * + * @return The postgresql. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile getPostgresql() { + if (postgresqlBuilder_ == null) { + if (connectionProfileCase_ == 101) { + return (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.getDefaultInstance(); + } else { + if (connectionProfileCase_ == 101) { + return postgresqlBuilder_.getMessage(); + } + return com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.getDefaultInstance(); + } + } + /** + * + * + *
+     * A PostgreSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + */ + public Builder setPostgresql(com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile value) { + if (postgresqlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionProfile_ = value; + onChanged(); + } else { + postgresqlBuilder_.setMessage(value); + } + connectionProfileCase_ = 101; + return this; + } + /** + * + * + *
+     * A PostgreSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + */ + public Builder setPostgresql( + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.Builder builderForValue) { + if (postgresqlBuilder_ == null) { + connectionProfile_ = builderForValue.build(); + onChanged(); + } else { + postgresqlBuilder_.setMessage(builderForValue.build()); + } + connectionProfileCase_ = 101; + return this; + } + /** + * + * + *
+     * A PostgreSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + */ + public Builder mergePostgresql(com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile value) { + if (postgresqlBuilder_ == null) { + if (connectionProfileCase_ == 101 + && connectionProfile_ + != com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.getDefaultInstance()) { + connectionProfile_ = + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.newBuilder( + (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_) + .mergeFrom(value) + .buildPartial(); + } else { + connectionProfile_ = value; + } + onChanged(); + } else { + if (connectionProfileCase_ == 101) { + postgresqlBuilder_.mergeFrom(value); + } + postgresqlBuilder_.setMessage(value); + } + connectionProfileCase_ = 101; + return this; + } + /** + * + * + *
+     * A PostgreSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + */ + public Builder clearPostgresql() { + if (postgresqlBuilder_ == null) { + if (connectionProfileCase_ == 101) { + connectionProfileCase_ = 0; + connectionProfile_ = null; + onChanged(); + } + } else { + if (connectionProfileCase_ == 101) { + connectionProfileCase_ = 0; + connectionProfile_ = null; + } + postgresqlBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A PostgreSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + */ + public com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.Builder getPostgresqlBuilder() { + return getPostgresqlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A PostgreSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.PostgreSqlConnectionProfileOrBuilder + getPostgresqlOrBuilder() { + if ((connectionProfileCase_ == 101) && (postgresqlBuilder_ != null)) { + return postgresqlBuilder_.getMessageOrBuilder(); + } else { + if (connectionProfileCase_ == 101) { + return (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.getDefaultInstance(); + } + } + /** + * + * + *
+     * A PostgreSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile, + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.Builder, + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfileOrBuilder> + getPostgresqlFieldBuilder() { + if (postgresqlBuilder_ == null) { + if (!(connectionProfileCase_ == 101)) { + connectionProfile_ = + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.getDefaultInstance(); + } + postgresqlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile, + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.Builder, + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfileOrBuilder>( + (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) connectionProfile_, + getParentForChildren(), + isClean()); + connectionProfile_ = null; + } + connectionProfileCase_ = 101; + onChanged(); + ; + return postgresqlBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile, + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.Builder, + com.google.cloud.clouddms.v1.CloudSqlConnectionProfileOrBuilder> + cloudsqlBuilder_; + /** + * + * + *
+     * A CloudSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + * + * @return Whether the cloudsql field is set. + */ + @java.lang.Override + public boolean hasCloudsql() { + return connectionProfileCase_ == 102; + } + /** + * + * + *
+     * A CloudSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + * + * @return The cloudsql. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlConnectionProfile getCloudsql() { + if (cloudsqlBuilder_ == null) { + if (connectionProfileCase_ == 102) { + return (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.getDefaultInstance(); + } else { + if (connectionProfileCase_ == 102) { + return cloudsqlBuilder_.getMessage(); + } + return com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.getDefaultInstance(); + } + } + /** + * + * + *
+     * A CloudSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + */ + public Builder setCloudsql(com.google.cloud.clouddms.v1.CloudSqlConnectionProfile value) { + if (cloudsqlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionProfile_ = value; + onChanged(); + } else { + cloudsqlBuilder_.setMessage(value); + } + connectionProfileCase_ = 102; + return this; + } + /** + * + * + *
+     * A CloudSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + */ + public Builder setCloudsql( + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.Builder builderForValue) { + if (cloudsqlBuilder_ == null) { + connectionProfile_ = builderForValue.build(); + onChanged(); + } else { + cloudsqlBuilder_.setMessage(builderForValue.build()); + } + connectionProfileCase_ = 102; + return this; + } + /** + * + * + *
+     * A CloudSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + */ + public Builder mergeCloudsql(com.google.cloud.clouddms.v1.CloudSqlConnectionProfile value) { + if (cloudsqlBuilder_ == null) { + if (connectionProfileCase_ == 102 + && connectionProfile_ + != com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.getDefaultInstance()) { + connectionProfile_ = + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.newBuilder( + (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_) + .mergeFrom(value) + .buildPartial(); + } else { + connectionProfile_ = value; + } + onChanged(); + } else { + if (connectionProfileCase_ == 102) { + cloudsqlBuilder_.mergeFrom(value); + } + cloudsqlBuilder_.setMessage(value); + } + connectionProfileCase_ = 102; + return this; + } + /** + * + * + *
+     * A CloudSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + */ + public Builder clearCloudsql() { + if (cloudsqlBuilder_ == null) { + if (connectionProfileCase_ == 102) { + connectionProfileCase_ = 0; + connectionProfile_ = null; + onChanged(); + } + } else { + if (connectionProfileCase_ == 102) { + connectionProfileCase_ = 0; + connectionProfile_ = null; + } + cloudsqlBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A CloudSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + */ + public com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.Builder getCloudsqlBuilder() { + return getCloudsqlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A CloudSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.CloudSqlConnectionProfileOrBuilder getCloudsqlOrBuilder() { + if ((connectionProfileCase_ == 102) && (cloudsqlBuilder_ != null)) { + return cloudsqlBuilder_.getMessageOrBuilder(); + } else { + if (connectionProfileCase_ == 102) { + return (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_; + } + return com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.getDefaultInstance(); + } + } + /** + * + * + *
+     * A CloudSQL database connection profile.
+     * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile, + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.Builder, + com.google.cloud.clouddms.v1.CloudSqlConnectionProfileOrBuilder> + getCloudsqlFieldBuilder() { + if (cloudsqlBuilder_ == null) { + if (!(connectionProfileCase_ == 102)) { + connectionProfile_ = + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.getDefaultInstance(); + } + cloudsqlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile, + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile.Builder, + com.google.cloud.clouddms.v1.CloudSqlConnectionProfileOrBuilder>( + (com.google.cloud.clouddms.v1.CloudSqlConnectionProfile) connectionProfile_, + getParentForChildren(), + isClean()); + connectionProfile_ = null; + } + connectionProfileCase_ = 102; + onChanged(); + ; + return cloudsqlBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private int provider_ = 0; + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 8; + * + * @return The enum numeric value on the wire for provider. + */ + @java.lang.Override + public int getProviderValue() { + return provider_; + } + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 8; + * + * @param value The enum numeric value on the wire for provider to set. + * @return This builder for chaining. + */ + public Builder setProviderValue(int value) { + + provider_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 8; + * + * @return The provider. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseProvider getProvider() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.DatabaseProvider result = + com.google.cloud.clouddms.v1.DatabaseProvider.valueOf(provider_); + return result == null ? com.google.cloud.clouddms.v1.DatabaseProvider.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 8; + * + * @param value The provider to set. + * @return This builder for chaining. + */ + public Builder setProvider(com.google.cloud.clouddms.v1.DatabaseProvider value) { + if (value == null) { + throw new NullPointerException(); + } + + provider_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 8; + * + * @return This builder for chaining. + */ + public Builder clearProvider() { + + provider_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.clouddms.v1.ConnectionProfile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.ConnectionProfile) + private static final com.google.cloud.clouddms.v1.ConnectionProfile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.ConnectionProfile(); + } + + public static com.google.cloud.clouddms.v1.ConnectionProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConnectionProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConnectionProfile(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.clouddms.v1.ConnectionProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ConnectionProfileName.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ConnectionProfileName.java new file mode 100644 index 00000000..dbf9a9bb --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ConnectionProfileName.java @@ -0,0 +1,231 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.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 ConnectionProfileName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CONNECTION_PROFILE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String connectionProfile; + + @Deprecated + protected ConnectionProfileName() { + project = null; + location = null; + connectionProfile = null; + } + + private ConnectionProfileName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + connectionProfile = Preconditions.checkNotNull(builder.getConnectionProfile()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getConnectionProfile() { + return connectionProfile; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ConnectionProfileName of( + String project, String location, String connectionProfile) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setConnectionProfile(connectionProfile) + .build(); + } + + public static String format(String project, String location, String connectionProfile) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setConnectionProfile(connectionProfile) + .build() + .toString(); + } + + public static ConnectionProfileName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CONNECTION_PROFILE.validatedMatch( + formattedString, "ConnectionProfileName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("location"), matchMap.get("connection_profile")); + } + + 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 (ConnectionProfileName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CONNECTION_PROFILE.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 (connectionProfile != null) { + fieldMapBuilder.put("connection_profile", connectionProfile); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CONNECTION_PROFILE.instantiate( + "project", project, "location", location, "connection_profile", connectionProfile); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ConnectionProfileName that = ((ConnectionProfileName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.connectionProfile, that.connectionProfile); + } + 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(connectionProfile); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/connectionProfiles/{connection_profile}. + */ + public static class Builder { + private String project; + private String location; + private String connectionProfile; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getConnectionProfile() { + return connectionProfile; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setConnectionProfile(String connectionProfile) { + this.connectionProfile = connectionProfile; + return this; + } + + private Builder(ConnectionProfileName connectionProfileName) { + project = connectionProfileName.project; + location = connectionProfileName.location; + connectionProfile = connectionProfileName.connectionProfile; + } + + public ConnectionProfileName build() { + return new ConnectionProfileName(this); + } + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ConnectionProfileOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ConnectionProfileOrBuilder.java new file mode 100644 index 00000000..9a9a15db --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ConnectionProfileOrBuilder.java @@ -0,0 +1,427 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface ConnectionProfileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.ConnectionProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of this connection profile resource in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of this connection profile resource in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The resource labels for connection profile to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * The resource labels for connection profile to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The resource labels for connection profile to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The resource labels for connection profile to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The resource labels for connection profile to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+   * 
+ * + * .google.cloud.clouddms.v1.ConnectionProfile.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The current connection profile state (e.g. DRAFT, READY, or FAILED).
+   * 
+ * + * .google.cloud.clouddms.v1.ConnectionProfile.State state = 5; + * + * @return The state. + */ + com.google.cloud.clouddms.v1.ConnectionProfile.State getState(); + + /** + * + * + *
+   * The connection profile display name.
+   * 
+ * + * string display_name = 6; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The connection profile display name.
+   * 
+ * + * string display_name = 6; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A MySQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + * + * @return Whether the mysql field is set. + */ + boolean hasMysql(); + /** + * + * + *
+   * A MySQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + * + * @return The mysql. + */ + com.google.cloud.clouddms.v1.MySqlConnectionProfile getMysql(); + /** + * + * + *
+   * A MySQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.MySqlConnectionProfile mysql = 100; + */ + com.google.cloud.clouddms.v1.MySqlConnectionProfileOrBuilder getMysqlOrBuilder(); + + /** + * + * + *
+   * A PostgreSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + * + * @return Whether the postgresql field is set. + */ + boolean hasPostgresql(); + /** + * + * + *
+   * A PostgreSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + * + * @return The postgresql. + */ + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile getPostgresql(); + /** + * + * + *
+   * A PostgreSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.PostgreSqlConnectionProfile postgresql = 101; + */ + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfileOrBuilder getPostgresqlOrBuilder(); + + /** + * + * + *
+   * A CloudSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + * + * @return Whether the cloudsql field is set. + */ + boolean hasCloudsql(); + /** + * + * + *
+   * A CloudSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + * + * @return The cloudsql. + */ + com.google.cloud.clouddms.v1.CloudSqlConnectionProfile getCloudsql(); + /** + * + * + *
+   * A CloudSQL database connection profile.
+   * 
+ * + * .google.cloud.clouddms.v1.CloudSqlConnectionProfile cloudsql = 102; + */ + com.google.cloud.clouddms.v1.CloudSqlConnectionProfileOrBuilder getCloudsqlOrBuilder(); + + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * The database provider.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 8; + * + * @return The enum numeric value on the wire for provider. + */ + int getProviderValue(); + /** + * + * + *
+   * The database provider.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 8; + * + * @return The provider. + */ + com.google.cloud.clouddms.v1.DatabaseProvider getProvider(); + + public com.google.cloud.clouddms.v1.ConnectionProfile.ConnectionProfileCase + getConnectionProfileCase(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateConnectionProfileRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateConnectionProfileRequest.java new file mode 100644 index 00000000..017a7e92 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateConnectionProfileRequest.java @@ -0,0 +1,1340 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'CreateConnectionProfile' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.CreateConnectionProfileRequest} + */ +public final class CreateConnectionProfileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.CreateConnectionProfileRequest) + CreateConnectionProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateConnectionProfileRequest.newBuilder() to construct. + private CreateConnectionProfileRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateConnectionProfileRequest() { + parent_ = ""; + connectionProfileId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateConnectionProfileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateConnectionProfileRequest( + 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(); + + connectionProfileId_ = s; + break; + } + case 26: + { + com.google.cloud.clouddms.v1.ConnectionProfile.Builder subBuilder = null; + if (connectionProfile_ != null) { + subBuilder = connectionProfile_.toBuilder(); + } + connectionProfile_ = + input.readMessage( + com.google.cloud.clouddms.v1.ConnectionProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(connectionProfile_); + connectionProfile_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest.class, + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent, which owns this collection of connection profiles.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of connection profiles.
+   * 
+ * + * + * 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 CONNECTION_PROFILE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object connectionProfileId_; + /** + * + * + *
+   * Required. The connection profile identifier.
+   * 
+ * + * string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The connectionProfileId. + */ + @java.lang.Override + public java.lang.String getConnectionProfileId() { + java.lang.Object ref = connectionProfileId_; + 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(); + connectionProfileId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The connection profile identifier.
+   * 
+ * + * string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for connectionProfileId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConnectionProfileIdBytes() { + java.lang.Object ref = connectionProfileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + connectionProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONNECTION_PROFILE_FIELD_NUMBER = 3; + private com.google.cloud.clouddms.v1.ConnectionProfile connectionProfile_; + /** + * + * + *
+   * Required. The create request body including the connection profile data
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the connectionProfile field is set. + */ + @java.lang.Override + public boolean hasConnectionProfile() { + return connectionProfile_ != null; + } + /** + * + * + *
+   * Required. The create request body including the connection profile data
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The connectionProfile. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfile() { + return connectionProfile_ == null + ? com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance() + : connectionProfile_; + } + /** + * + * + *
+   * Required. The create request body including the connection profile data
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder getConnectionProfileOrBuilder() { + return getConnectionProfile(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getConnectionProfileIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, connectionProfileId_); + } + if (connectionProfile_ != null) { + output.writeMessage(3, getConnectionProfile()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getConnectionProfileIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, connectionProfileId_); + } + if (connectionProfile_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConnectionProfile()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + 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.clouddms.v1.CreateConnectionProfileRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest other = + (com.google.cloud.clouddms.v1.CreateConnectionProfileRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getConnectionProfileId().equals(other.getConnectionProfileId())) return false; + if (hasConnectionProfile() != other.hasConnectionProfile()) return false; + if (hasConnectionProfile()) { + if (!getConnectionProfile().equals(other.getConnectionProfile())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + CONNECTION_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionProfileId().hashCode(); + if (hasConnectionProfile()) { + hash = (37 * hash) + CONNECTION_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getConnectionProfile().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.CreateConnectionProfileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CreateConnectionProfileRequest 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.clouddms.v1.CreateConnectionProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CreateConnectionProfileRequest 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.clouddms.v1.CreateConnectionProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CreateConnectionProfileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.CreateConnectionProfileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CreateConnectionProfileRequest 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.clouddms.v1.CreateConnectionProfileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CreateConnectionProfileRequest 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.clouddms.v1.CreateConnectionProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CreateConnectionProfileRequest 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.clouddms.v1.CreateConnectionProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'CreateConnectionProfile' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.CreateConnectionProfileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.CreateConnectionProfileRequest) + com.google.cloud.clouddms.v1.CreateConnectionProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest.class, + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.CreateConnectionProfileRequest.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_ = ""; + + connectionProfileId_ = ""; + + if (connectionProfileBuilder_ == null) { + connectionProfile_ = null; + } else { + connectionProfile_ = null; + connectionProfileBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateConnectionProfileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CreateConnectionProfileRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.CreateConnectionProfileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CreateConnectionProfileRequest build() { + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CreateConnectionProfileRequest buildPartial() { + com.google.cloud.clouddms.v1.CreateConnectionProfileRequest result = + new com.google.cloud.clouddms.v1.CreateConnectionProfileRequest(this); + result.parent_ = parent_; + result.connectionProfileId_ = connectionProfileId_; + if (connectionProfileBuilder_ == null) { + result.connectionProfile_ = connectionProfile_; + } else { + result.connectionProfile_ = connectionProfileBuilder_.build(); + } + result.requestId_ = requestId_; + 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.clouddms.v1.CreateConnectionProfileRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.CreateConnectionProfileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.CreateConnectionProfileRequest other) { + if (other == com.google.cloud.clouddms.v1.CreateConnectionProfileRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getConnectionProfileId().isEmpty()) { + connectionProfileId_ = other.connectionProfileId_; + onChanged(); + } + if (other.hasConnectionProfile()) { + mergeConnectionProfile(other.getConnectionProfile()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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.clouddms.v1.CreateConnectionProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.CreateConnectionProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * 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 connectionProfileId_ = ""; + /** + * + * + *
+     * Required. The connection profile identifier.
+     * 
+ * + * string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The connectionProfileId. + */ + public java.lang.String getConnectionProfileId() { + java.lang.Object ref = connectionProfileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + connectionProfileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The connection profile identifier.
+     * 
+ * + * string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for connectionProfileId. + */ + public com.google.protobuf.ByteString getConnectionProfileIdBytes() { + java.lang.Object ref = connectionProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + connectionProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The connection profile identifier.
+     * 
+ * + * string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The connectionProfileId to set. + * @return This builder for chaining. + */ + public Builder setConnectionProfileId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + connectionProfileId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The connection profile identifier.
+     * 
+ * + * string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearConnectionProfileId() { + + connectionProfileId_ = getDefaultInstance().getConnectionProfileId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The connection profile identifier.
+     * 
+ * + * string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for connectionProfileId to set. + * @return This builder for chaining. + */ + public Builder setConnectionProfileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + connectionProfileId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.clouddms.v1.ConnectionProfile connectionProfile_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.ConnectionProfile, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder, + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder> + connectionProfileBuilder_; + /** + * + * + *
+     * Required. The create request body including the connection profile data
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the connectionProfile field is set. + */ + public boolean hasConnectionProfile() { + return connectionProfileBuilder_ != null || connectionProfile_ != null; + } + /** + * + * + *
+     * Required. The create request body including the connection profile data
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The connectionProfile. + */ + public com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfile() { + if (connectionProfileBuilder_ == null) { + return connectionProfile_ == null + ? com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance() + : connectionProfile_; + } else { + return connectionProfileBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The create request body including the connection profile data
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConnectionProfile(com.google.cloud.clouddms.v1.ConnectionProfile value) { + if (connectionProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionProfile_ = value; + onChanged(); + } else { + connectionProfileBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The create request body including the connection profile data
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConnectionProfile( + com.google.cloud.clouddms.v1.ConnectionProfile.Builder builderForValue) { + if (connectionProfileBuilder_ == null) { + connectionProfile_ = builderForValue.build(); + onChanged(); + } else { + connectionProfileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The create request body including the connection profile data
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConnectionProfile(com.google.cloud.clouddms.v1.ConnectionProfile value) { + if (connectionProfileBuilder_ == null) { + if (connectionProfile_ != null) { + connectionProfile_ = + com.google.cloud.clouddms.v1.ConnectionProfile.newBuilder(connectionProfile_) + .mergeFrom(value) + .buildPartial(); + } else { + connectionProfile_ = value; + } + onChanged(); + } else { + connectionProfileBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The create request body including the connection profile data
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConnectionProfile() { + if (connectionProfileBuilder_ == null) { + connectionProfile_ = null; + onChanged(); + } else { + connectionProfile_ = null; + connectionProfileBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The create request body including the connection profile data
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.clouddms.v1.ConnectionProfile.Builder getConnectionProfileBuilder() { + + onChanged(); + return getConnectionProfileFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The create request body including the connection profile data
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder getConnectionProfileOrBuilder() { + if (connectionProfileBuilder_ != null) { + return connectionProfileBuilder_.getMessageOrBuilder(); + } else { + return connectionProfile_ == null + ? com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance() + : connectionProfile_; + } + } + /** + * + * + *
+     * Required. The create request body including the connection profile data
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.ConnectionProfile, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder, + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder> + getConnectionProfileFieldBuilder() { + if (connectionProfileBuilder_ == null) { + connectionProfileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.ConnectionProfile, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder, + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder>( + getConnectionProfile(), getParentForChildren(), isClean()); + connectionProfile_ = null; + } + return connectionProfileBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = 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.clouddms.v1.CreateConnectionProfileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.CreateConnectionProfileRequest) + private static final com.google.cloud.clouddms.v1.CreateConnectionProfileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.CreateConnectionProfileRequest(); + } + + public static com.google.cloud.clouddms.v1.CreateConnectionProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateConnectionProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateConnectionProfileRequest(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.clouddms.v1.CreateConnectionProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateConnectionProfileRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateConnectionProfileRequestOrBuilder.java new file mode 100644 index 00000000..60a3a5bb --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateConnectionProfileRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface CreateConnectionProfileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.CreateConnectionProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of connection profiles.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of connection profiles.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The connection profile identifier.
+   * 
+ * + * string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The connectionProfileId. + */ + java.lang.String getConnectionProfileId(); + /** + * + * + *
+   * Required. The connection profile identifier.
+   * 
+ * + * string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for connectionProfileId. + */ + com.google.protobuf.ByteString getConnectionProfileIdBytes(); + + /** + * + * + *
+   * Required. The create request body including the connection profile data
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the connectionProfile field is set. + */ + boolean hasConnectionProfile(); + /** + * + * + *
+   * Required. The create request body including the connection profile data
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The connectionProfile. + */ + com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfile(); + /** + * + * + *
+   * Required. The create request body including the connection profile data
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder getConnectionProfileOrBuilder(); + + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateMigrationJobRequest.java new file mode 100644 index 00000000..d84fa5b2 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateMigrationJobRequest.java @@ -0,0 +1,1365 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message to create a new Database Migration Service migration job
+ * in the specified project and region.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.CreateMigrationJobRequest} + */ +public final class CreateMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.CreateMigrationJobRequest) + CreateMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateMigrationJobRequest.newBuilder() to construct. + private CreateMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateMigrationJobRequest() { + parent_ = ""; + migrationJobId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateMigrationJobRequest( + 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(); + + migrationJobId_ = s; + break; + } + case 26: + { + com.google.cloud.clouddms.v1.MigrationJob.Builder subBuilder = null; + if (migrationJob_ != null) { + subBuilder = migrationJob_.toBuilder(); + } + migrationJob_ = + input.readMessage( + com.google.cloud.clouddms.v1.MigrationJob.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(migrationJob_); + migrationJob_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.CreateMigrationJobRequest.class, + com.google.cloud.clouddms.v1.CreateMigrationJobRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent, which owns this collection of migration jobs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of migration jobs.
+   * 
+ * + * + * 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 MIGRATION_JOB_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object migrationJobId_; + /** + * + * + *
+   * Required. The ID of the instance to create.
+   * 
+ * + * string migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The migrationJobId. + */ + @java.lang.Override + public java.lang.String getMigrationJobId() { + java.lang.Object ref = migrationJobId_; + 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(); + migrationJobId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID of the instance to create.
+   * 
+ * + * string migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for migrationJobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMigrationJobIdBytes() { + java.lang.Object ref = migrationJobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + migrationJobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIGRATION_JOB_FIELD_NUMBER = 3; + private com.google.cloud.clouddms.v1.MigrationJob migrationJob_; + /** + * + * + *
+   * Required. Represents a [migration
+   * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+   * object.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the migrationJob field is set. + */ + @java.lang.Override + public boolean hasMigrationJob() { + return migrationJob_ != null; + } + /** + * + * + *
+   * Required. Represents a [migration
+   * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+   * object.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The migrationJob. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob getMigrationJob() { + return migrationJob_ == null + ? com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance() + : migrationJob_; + } + /** + * + * + *
+   * Required. Represents a [migration
+   * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+   * object.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJobOrBuilder getMigrationJobOrBuilder() { + return getMigrationJob(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getMigrationJobIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, migrationJobId_); + } + if (migrationJob_ != null) { + output.writeMessage(3, getMigrationJob()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getMigrationJobIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, migrationJobId_); + } + if (migrationJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMigrationJob()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + 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.clouddms.v1.CreateMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.CreateMigrationJobRequest other = + (com.google.cloud.clouddms.v1.CreateMigrationJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getMigrationJobId().equals(other.getMigrationJobId())) return false; + if (hasMigrationJob() != other.hasMigrationJob()) return false; + if (hasMigrationJob()) { + if (!getMigrationJob().equals(other.getMigrationJob())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + MIGRATION_JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getMigrationJobId().hashCode(); + if (hasMigrationJob()) { + hash = (37 * hash) + MIGRATION_JOB_FIELD_NUMBER; + hash = (53 * hash) + getMigrationJob().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.CreateMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CreateMigrationJobRequest 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.clouddms.v1.CreateMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CreateMigrationJobRequest 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.clouddms.v1.CreateMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.CreateMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.CreateMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CreateMigrationJobRequest 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.clouddms.v1.CreateMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CreateMigrationJobRequest 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.clouddms.v1.CreateMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.CreateMigrationJobRequest 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.clouddms.v1.CreateMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message to create a new Database Migration Service migration job
+   * in the specified project and region.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.CreateMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.CreateMigrationJobRequest) + com.google.cloud.clouddms.v1.CreateMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.CreateMigrationJobRequest.class, + com.google.cloud.clouddms.v1.CreateMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.CreateMigrationJobRequest.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_ = ""; + + migrationJobId_ = ""; + + if (migrationJobBuilder_ == null) { + migrationJob_ = null; + } else { + migrationJob_ = null; + migrationJobBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_CreateMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CreateMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.CreateMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CreateMigrationJobRequest build() { + com.google.cloud.clouddms.v1.CreateMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.CreateMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.CreateMigrationJobRequest result = + new com.google.cloud.clouddms.v1.CreateMigrationJobRequest(this); + result.parent_ = parent_; + result.migrationJobId_ = migrationJobId_; + if (migrationJobBuilder_ == null) { + result.migrationJob_ = migrationJob_; + } else { + result.migrationJob_ = migrationJobBuilder_.build(); + } + result.requestId_ = requestId_; + 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.clouddms.v1.CreateMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.CreateMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.CreateMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.CreateMigrationJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getMigrationJobId().isEmpty()) { + migrationJobId_ = other.migrationJobId_; + onChanged(); + } + if (other.hasMigrationJob()) { + mergeMigrationJob(other.getMigrationJob()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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.clouddms.v1.CreateMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.CreateMigrationJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of migration jobs.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of migration jobs.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of migration jobs.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of migration jobs.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of migration jobs.
+     * 
+ * + * + * 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 migrationJobId_ = ""; + /** + * + * + *
+     * Required. The ID of the instance to create.
+     * 
+ * + * string migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The migrationJobId. + */ + public java.lang.String getMigrationJobId() { + java.lang.Object ref = migrationJobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + migrationJobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID of the instance to create.
+     * 
+ * + * string migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for migrationJobId. + */ + public com.google.protobuf.ByteString getMigrationJobIdBytes() { + java.lang.Object ref = migrationJobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + migrationJobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID of the instance to create.
+     * 
+ * + * string migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The migrationJobId to set. + * @return This builder for chaining. + */ + public Builder setMigrationJobId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + migrationJobId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the instance to create.
+     * 
+ * + * string migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMigrationJobId() { + + migrationJobId_ = getDefaultInstance().getMigrationJobId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the instance to create.
+     * 
+ * + * string migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for migrationJobId to set. + * @return This builder for chaining. + */ + public Builder setMigrationJobIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + migrationJobId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.clouddms.v1.MigrationJob migrationJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.MigrationJob, + com.google.cloud.clouddms.v1.MigrationJob.Builder, + com.google.cloud.clouddms.v1.MigrationJobOrBuilder> + migrationJobBuilder_; + /** + * + * + *
+     * Required. Represents a [migration
+     * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+     * object.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the migrationJob field is set. + */ + public boolean hasMigrationJob() { + return migrationJobBuilder_ != null || migrationJob_ != null; + } + /** + * + * + *
+     * Required. Represents a [migration
+     * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+     * object.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The migrationJob. + */ + public com.google.cloud.clouddms.v1.MigrationJob getMigrationJob() { + if (migrationJobBuilder_ == null) { + return migrationJob_ == null + ? com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance() + : migrationJob_; + } else { + return migrationJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Represents a [migration
+     * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+     * object.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMigrationJob(com.google.cloud.clouddms.v1.MigrationJob value) { + if (migrationJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + migrationJob_ = value; + onChanged(); + } else { + migrationJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Represents a [migration
+     * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+     * object.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMigrationJob( + com.google.cloud.clouddms.v1.MigrationJob.Builder builderForValue) { + if (migrationJobBuilder_ == null) { + migrationJob_ = builderForValue.build(); + onChanged(); + } else { + migrationJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Represents a [migration
+     * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+     * object.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMigrationJob(com.google.cloud.clouddms.v1.MigrationJob value) { + if (migrationJobBuilder_ == null) { + if (migrationJob_ != null) { + migrationJob_ = + com.google.cloud.clouddms.v1.MigrationJob.newBuilder(migrationJob_) + .mergeFrom(value) + .buildPartial(); + } else { + migrationJob_ = value; + } + onChanged(); + } else { + migrationJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Represents a [migration
+     * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+     * object.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMigrationJob() { + if (migrationJobBuilder_ == null) { + migrationJob_ = null; + onChanged(); + } else { + migrationJob_ = null; + migrationJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Represents a [migration
+     * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+     * object.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.clouddms.v1.MigrationJob.Builder getMigrationJobBuilder() { + + onChanged(); + return getMigrationJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Represents a [migration
+     * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+     * object.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.clouddms.v1.MigrationJobOrBuilder getMigrationJobOrBuilder() { + if (migrationJobBuilder_ != null) { + return migrationJobBuilder_.getMessageOrBuilder(); + } else { + return migrationJob_ == null + ? com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance() + : migrationJob_; + } + } + /** + * + * + *
+     * Required. Represents a [migration
+     * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+     * object.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.MigrationJob, + com.google.cloud.clouddms.v1.MigrationJob.Builder, + com.google.cloud.clouddms.v1.MigrationJobOrBuilder> + getMigrationJobFieldBuilder() { + if (migrationJobBuilder_ == null) { + migrationJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.MigrationJob, + com.google.cloud.clouddms.v1.MigrationJob.Builder, + com.google.cloud.clouddms.v1.MigrationJobOrBuilder>( + getMigrationJob(), getParentForChildren(), isClean()); + migrationJob_ = null; + } + return migrationJobBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 4; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = 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.clouddms.v1.CreateMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.CreateMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.CreateMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.CreateMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.CreateMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateMigrationJobRequest(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.clouddms.v1.CreateMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..3e3baf72 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/CreateMigrationJobRequestOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface CreateMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.CreateMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of migration jobs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of migration jobs.
+   * 
+ * + * + * 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.
+   * 
+ * + * string migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The migrationJobId. + */ + java.lang.String getMigrationJobId(); + /** + * + * + *
+   * Required. The ID of the instance to create.
+   * 
+ * + * string migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for migrationJobId. + */ + com.google.protobuf.ByteString getMigrationJobIdBytes(); + + /** + * + * + *
+   * Required. Represents a [migration
+   * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+   * object.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the migrationJob field is set. + */ + boolean hasMigrationJob(); + /** + * + * + *
+   * Required. Represents a [migration
+   * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+   * object.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The migrationJob. + */ + com.google.cloud.clouddms.v1.MigrationJob getMigrationJob(); + /** + * + * + *
+   * Required. Represents a [migration
+   * job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs)
+   * object.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.clouddms.v1.MigrationJobOrBuilder getMigrationJobOrBuilder(); + + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseEngine.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseEngine.java new file mode 100644 index 00000000..61db75fd --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseEngine.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * The database engine types.
+ * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.DatabaseEngine} + */ +public enum DatabaseEngine implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The source database engine of the migration job is unknown.
+   * 
+ * + * DATABASE_ENGINE_UNSPECIFIED = 0; + */ + DATABASE_ENGINE_UNSPECIFIED(0), + /** + * + * + *
+   * The source engine is MySQL.
+   * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + /** + * + * + *
+   * The source engine is PostgreSQL.
+   * 
+ * + * POSTGRESQL = 2; + */ + POSTGRESQL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The source database engine of the migration job is unknown.
+   * 
+ * + * DATABASE_ENGINE_UNSPECIFIED = 0; + */ + public static final int DATABASE_ENGINE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The source engine is MySQL.
+   * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + /** + * + * + *
+   * The source engine is PostgreSQL.
+   * 
+ * + * POSTGRESQL = 2; + */ + public static final int POSTGRESQL_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 DatabaseEngine 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 DatabaseEngine forNumber(int value) { + switch (value) { + case 0: + return DATABASE_ENGINE_UNSPECIFIED; + case 1: + return MYSQL; + case 2: + return POSTGRESQL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatabaseEngine findValueByNumber(int number) { + return DatabaseEngine.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.clouddms.v1.ClouddmsResourcesProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DatabaseEngine[] VALUES = values(); + + public static DatabaseEngine 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 DatabaseEngine(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.clouddms.v1.DatabaseEngine) +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseProvider.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseProvider.java new file mode 100644 index 00000000..c17ee0c1 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseProvider.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * The database providers.
+ * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.DatabaseProvider} + */ +public enum DatabaseProvider implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The database provider is unknown.
+   * 
+ * + * DATABASE_PROVIDER_UNSPECIFIED = 0; + */ + DATABASE_PROVIDER_UNSPECIFIED(0), + /** + * + * + *
+   * CloudSQL runs the database.
+   * 
+ * + * CLOUDSQL = 1; + */ + CLOUDSQL(1), + /** + * + * + *
+   * RDS runs the database.
+   * 
+ * + * RDS = 2; + */ + RDS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The database provider is unknown.
+   * 
+ * + * DATABASE_PROVIDER_UNSPECIFIED = 0; + */ + public static final int DATABASE_PROVIDER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * CloudSQL runs the database.
+   * 
+ * + * CLOUDSQL = 1; + */ + public static final int CLOUDSQL_VALUE = 1; + /** + * + * + *
+   * RDS runs the database.
+   * 
+ * + * RDS = 2; + */ + public static final int RDS_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 DatabaseProvider 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 DatabaseProvider forNumber(int value) { + switch (value) { + case 0: + return DATABASE_PROVIDER_UNSPECIFIED; + case 1: + return CLOUDSQL; + case 2: + return RDS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatabaseProvider findValueByNumber(int number) { + return DatabaseProvider.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.clouddms.v1.ClouddmsResourcesProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final DatabaseProvider[] VALUES = values(); + + public static DatabaseProvider 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 DatabaseProvider(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.clouddms.v1.DatabaseProvider) +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseType.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseType.java new file mode 100644 index 00000000..351b251a --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseType.java @@ -0,0 +1,761 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * A message defining the database engine and provider.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.DatabaseType} + */ +public final class DatabaseType extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.DatabaseType) + DatabaseTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseType.newBuilder() to construct. + private DatabaseType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatabaseType() { + provider_ = 0; + engine_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatabaseType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DatabaseType( + 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 8: + { + int rawValue = input.readEnum(); + + provider_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + engine_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_DatabaseType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_DatabaseType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.DatabaseType.class, + com.google.cloud.clouddms.v1.DatabaseType.Builder.class); + } + + public static final int PROVIDER_FIELD_NUMBER = 1; + private int provider_; + /** + * + * + *
+   * The database provider.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 1; + * + * @return The enum numeric value on the wire for provider. + */ + @java.lang.Override + public int getProviderValue() { + return provider_; + } + /** + * + * + *
+   * The database provider.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 1; + * + * @return The provider. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseProvider getProvider() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.DatabaseProvider result = + com.google.cloud.clouddms.v1.DatabaseProvider.valueOf(provider_); + return result == null ? com.google.cloud.clouddms.v1.DatabaseProvider.UNRECOGNIZED : result; + } + + public static final int ENGINE_FIELD_NUMBER = 2; + private int engine_; + /** + * + * + *
+   * The database engine.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseEngine engine = 2; + * + * @return The enum numeric value on the wire for engine. + */ + @java.lang.Override + public int getEngineValue() { + return engine_; + } + /** + * + * + *
+   * The database engine.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseEngine engine = 2; + * + * @return The engine. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseEngine getEngine() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.DatabaseEngine result = + com.google.cloud.clouddms.v1.DatabaseEngine.valueOf(engine_); + return result == null ? com.google.cloud.clouddms.v1.DatabaseEngine.UNRECOGNIZED : result; + } + + 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 (provider_ + != com.google.cloud.clouddms.v1.DatabaseProvider.DATABASE_PROVIDER_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, provider_); + } + if (engine_ + != com.google.cloud.clouddms.v1.DatabaseEngine.DATABASE_ENGINE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, engine_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (provider_ + != com.google.cloud.clouddms.v1.DatabaseProvider.DATABASE_PROVIDER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, provider_); + } + if (engine_ + != com.google.cloud.clouddms.v1.DatabaseEngine.DATABASE_ENGINE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, engine_); + } + 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.clouddms.v1.DatabaseType)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.DatabaseType other = + (com.google.cloud.clouddms.v1.DatabaseType) obj; + + if (provider_ != other.provider_) return false; + if (engine_ != other.engine_) 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) + PROVIDER_FIELD_NUMBER; + hash = (53 * hash) + provider_; + hash = (37 * hash) + ENGINE_FIELD_NUMBER; + hash = (53 * hash) + engine_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.DatabaseType parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.DatabaseType 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.clouddms.v1.DatabaseType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.DatabaseType 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.clouddms.v1.DatabaseType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.DatabaseType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.DatabaseType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.DatabaseType 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.clouddms.v1.DatabaseType parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.DatabaseType 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.clouddms.v1.DatabaseType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.DatabaseType 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.clouddms.v1.DatabaseType 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 message defining the database engine and provider.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.DatabaseType} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.DatabaseType) + com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_DatabaseType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_DatabaseType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.DatabaseType.class, + com.google.cloud.clouddms.v1.DatabaseType.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.DatabaseType.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(); + provider_ = 0; + + engine_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_DatabaseType_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseType getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.DatabaseType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseType build() { + com.google.cloud.clouddms.v1.DatabaseType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseType buildPartial() { + com.google.cloud.clouddms.v1.DatabaseType result = + new com.google.cloud.clouddms.v1.DatabaseType(this); + result.provider_ = provider_; + result.engine_ = engine_; + 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.clouddms.v1.DatabaseType) { + return mergeFrom((com.google.cloud.clouddms.v1.DatabaseType) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.DatabaseType other) { + if (other == com.google.cloud.clouddms.v1.DatabaseType.getDefaultInstance()) return this; + if (other.provider_ != 0) { + setProviderValue(other.getProviderValue()); + } + if (other.engine_ != 0) { + setEngineValue(other.getEngineValue()); + } + 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.clouddms.v1.DatabaseType parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.DatabaseType) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int provider_ = 0; + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 1; + * + * @return The enum numeric value on the wire for provider. + */ + @java.lang.Override + public int getProviderValue() { + return provider_; + } + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 1; + * + * @param value The enum numeric value on the wire for provider to set. + * @return This builder for chaining. + */ + public Builder setProviderValue(int value) { + + provider_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 1; + * + * @return The provider. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseProvider getProvider() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.DatabaseProvider result = + com.google.cloud.clouddms.v1.DatabaseProvider.valueOf(provider_); + return result == null ? com.google.cloud.clouddms.v1.DatabaseProvider.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 1; + * + * @param value The provider to set. + * @return This builder for chaining. + */ + public Builder setProvider(com.google.cloud.clouddms.v1.DatabaseProvider value) { + if (value == null) { + throw new NullPointerException(); + } + + provider_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The database provider.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 1; + * + * @return This builder for chaining. + */ + public Builder clearProvider() { + + provider_ = 0; + onChanged(); + return this; + } + + private int engine_ = 0; + /** + * + * + *
+     * The database engine.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseEngine engine = 2; + * + * @return The enum numeric value on the wire for engine. + */ + @java.lang.Override + public int getEngineValue() { + return engine_; + } + /** + * + * + *
+     * The database engine.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseEngine engine = 2; + * + * @param value The enum numeric value on the wire for engine to set. + * @return This builder for chaining. + */ + public Builder setEngineValue(int value) { + + engine_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The database engine.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseEngine engine = 2; + * + * @return The engine. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseEngine getEngine() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.DatabaseEngine result = + com.google.cloud.clouddms.v1.DatabaseEngine.valueOf(engine_); + return result == null ? com.google.cloud.clouddms.v1.DatabaseEngine.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The database engine.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseEngine engine = 2; + * + * @param value The engine to set. + * @return This builder for chaining. + */ + public Builder setEngine(com.google.cloud.clouddms.v1.DatabaseEngine value) { + if (value == null) { + throw new NullPointerException(); + } + + engine_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The database engine.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseEngine engine = 2; + * + * @return This builder for chaining. + */ + public Builder clearEngine() { + + engine_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.clouddms.v1.DatabaseType) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.DatabaseType) + private static final com.google.cloud.clouddms.v1.DatabaseType DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.DatabaseType(); + } + + public static com.google.cloud.clouddms.v1.DatabaseType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DatabaseType(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.clouddms.v1.DatabaseType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseTypeOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseTypeOrBuilder.java new file mode 100644 index 00000000..be1b81a3 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DatabaseTypeOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface DatabaseTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.DatabaseType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The database provider.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 1; + * + * @return The enum numeric value on the wire for provider. + */ + int getProviderValue(); + /** + * + * + *
+   * The database provider.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseProvider provider = 1; + * + * @return The provider. + */ + com.google.cloud.clouddms.v1.DatabaseProvider getProvider(); + + /** + * + * + *
+   * The database engine.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseEngine engine = 2; + * + * @return The enum numeric value on the wire for engine. + */ + int getEngineValue(); + /** + * + * + *
+   * The database engine.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseEngine engine = 2; + * + * @return The engine. + */ + com.google.cloud.clouddms.v1.DatabaseEngine getEngine(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteConnectionProfileRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteConnectionProfileRequest.java new file mode 100644 index 00000000..7982f6a9 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteConnectionProfileRequest.java @@ -0,0 +1,953 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'DeleteConnectionProfile' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.DeleteConnectionProfileRequest} + */ +public final class DeleteConnectionProfileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.DeleteConnectionProfileRequest) + DeleteConnectionProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteConnectionProfileRequest.newBuilder() to construct. + private DeleteConnectionProfileRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteConnectionProfileRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteConnectionProfileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteConnectionProfileRequest( + 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(); + + requestId_ = s; + break; + } + case 24: + { + force_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest.class, + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the connection profile resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the connection profile resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_; + /** + * + * + *
+   * In case of force delete, the CloudSQL replica database is also deleted
+   * (only for CloudSQL connection profile).
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + 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.clouddms.v1.DeleteConnectionProfileRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest other = + (com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest 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.clouddms.v1.DeleteConnectionProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest 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.clouddms.v1.DeleteConnectionProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest 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.clouddms.v1.DeleteConnectionProfileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest 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.clouddms.v1.DeleteConnectionProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest 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.clouddms.v1.DeleteConnectionProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'DeleteConnectionProfile' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.DeleteConnectionProfileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.DeleteConnectionProfileRequest) + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest.class, + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest.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_ = ""; + + requestId_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteConnectionProfileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest build() { + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest buildPartial() { + com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest result = + new com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + result.force_ = force_; + 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.clouddms.v1.DeleteConnectionProfileRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest other) { + if (other == com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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.clouddms.v1.DeleteConnectionProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the connection profile resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the connection profile resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the connection profile resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the connection profile resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the connection profile resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * In case of force delete, the CloudSQL replica database is also deleted
+     * (only for CloudSQL connection profile).
+     * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * In case of force delete, the CloudSQL replica database is also deleted
+     * (only for CloudSQL connection profile).
+     * 
+ * + * bool force = 3; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * In case of force delete, the CloudSQL replica database is also deleted
+     * (only for CloudSQL connection profile).
+     * 
+ * + * bool force = 3; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.clouddms.v1.DeleteConnectionProfileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.DeleteConnectionProfileRequest) + private static final com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest(); + } + + public static com.google.cloud.clouddms.v1.DeleteConnectionProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteConnectionProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteConnectionProfileRequest(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.clouddms.v1.DeleteConnectionProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteConnectionProfileRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteConnectionProfileRequestOrBuilder.java new file mode 100644 index 00000000..730faf52 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteConnectionProfileRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface DeleteConnectionProfileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.DeleteConnectionProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the connection profile resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the connection profile resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * In case of force delete, the CloudSQL replica database is also deleted
+   * (only for CloudSQL connection profile).
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteMigrationJobRequest.java new file mode 100644 index 00000000..db26e30c --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteMigrationJobRequest.java @@ -0,0 +1,956 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'DeleteMigrationJob' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.DeleteMigrationJobRequest} + */ +public final class DeleteMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.DeleteMigrationJobRequest) + DeleteMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteMigrationJobRequest.newBuilder() to construct. + private DeleteMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteMigrationJobRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteMigrationJobRequest( + 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(); + + requestId_ = s; + break; + } + case 24: + { + force_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest.class, + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the migration job resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the migration job resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_; + /** + * + * + *
+   * The destination CloudSQL connection profile is always deleted with the
+   * migration job. In case of force delete, the destination CloudSQL replica
+   * database is also deleted.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + 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.clouddms.v1.DeleteMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest other = + (com.google.cloud.clouddms.v1.DeleteMigrationJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.DeleteMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.DeleteMigrationJobRequest 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.clouddms.v1.DeleteMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.DeleteMigrationJobRequest 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.clouddms.v1.DeleteMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.DeleteMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.DeleteMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.DeleteMigrationJobRequest 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.clouddms.v1.DeleteMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.DeleteMigrationJobRequest 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.clouddms.v1.DeleteMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.DeleteMigrationJobRequest 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.clouddms.v1.DeleteMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'DeleteMigrationJob' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.DeleteMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.DeleteMigrationJobRequest) + com.google.cloud.clouddms.v1.DeleteMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest.class, + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.DeleteMigrationJobRequest.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_ = ""; + + requestId_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_DeleteMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.DeleteMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.DeleteMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.DeleteMigrationJobRequest build() { + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.DeleteMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.DeleteMigrationJobRequest result = + new com.google.cloud.clouddms.v1.DeleteMigrationJobRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + result.force_ = force_; + 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.clouddms.v1.DeleteMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.DeleteMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.DeleteMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.DeleteMigrationJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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.clouddms.v1.DeleteMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.DeleteMigrationJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the migration job resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the migration job resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the migration job resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the migration job resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the migration job resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 2; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * The destination CloudSQL connection profile is always deleted with the
+     * migration job. In case of force delete, the destination CloudSQL replica
+     * database is also deleted.
+     * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * The destination CloudSQL connection profile is always deleted with the
+     * migration job. In case of force delete, the destination CloudSQL replica
+     * database is also deleted.
+     * 
+ * + * bool force = 3; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The destination CloudSQL connection profile is always deleted with the
+     * migration job. In case of force delete, the destination CloudSQL replica
+     * database is also deleted.
+     * 
+ * + * bool force = 3; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.clouddms.v1.DeleteMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.DeleteMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.DeleteMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.DeleteMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.DeleteMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteMigrationJobRequest(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.clouddms.v1.DeleteMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..97d25bc4 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/DeleteMigrationJobRequestOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface DeleteMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.DeleteMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the migration job resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the migration job resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * The destination CloudSQL connection profile is always deleted with the
+   * migration job. In case of force delete, the destination CloudSQL replica
+   * database is also deleted.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GenerateSshScriptRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GenerateSshScriptRequest.java new file mode 100644 index 00000000..c9705631 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GenerateSshScriptRequest.java @@ -0,0 +1,1593 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'GenerateSshScript' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.GenerateSshScriptRequest} + */ +public final class GenerateSshScriptRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.GenerateSshScriptRequest) + GenerateSshScriptRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateSshScriptRequest.newBuilder() to construct. + private GenerateSshScriptRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateSshScriptRequest() { + migrationJob_ = ""; + vm_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateSshScriptRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenerateSshScriptRequest( + 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(); + + migrationJob_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + vm_ = s; + break; + } + case 24: + { + vmPort_ = input.readInt32(); + break; + } + case 802: + { + com.google.cloud.clouddms.v1.VmCreationConfig.Builder subBuilder = null; + if (vmConfigCase_ == 100) { + subBuilder = + ((com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_).toBuilder(); + } + vmConfig_ = + input.readMessage( + com.google.cloud.clouddms.v1.VmCreationConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_); + vmConfig_ = subBuilder.buildPartial(); + } + vmConfigCase_ = 100; + break; + } + case 810: + { + com.google.cloud.clouddms.v1.VmSelectionConfig.Builder subBuilder = null; + if (vmConfigCase_ == 101) { + subBuilder = + ((com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_).toBuilder(); + } + vmConfig_ = + input.readMessage( + com.google.cloud.clouddms.v1.VmSelectionConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_); + vmConfig_ = subBuilder.buildPartial(); + } + vmConfigCase_ = 101; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.GenerateSshScriptRequest.class, + com.google.cloud.clouddms.v1.GenerateSshScriptRequest.Builder.class); + } + + private int vmConfigCase_ = 0; + private java.lang.Object vmConfig_; + + public enum VmConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VM_CREATION_CONFIG(100), + VM_SELECTION_CONFIG(101), + VMCONFIG_NOT_SET(0); + private final int value; + + private VmConfigCase(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 VmConfigCase valueOf(int value) { + return forNumber(value); + } + + public static VmConfigCase forNumber(int value) { + switch (value) { + case 100: + return VM_CREATION_CONFIG; + case 101: + return VM_SELECTION_CONFIG; + case 0: + return VMCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public VmConfigCase getVmConfigCase() { + return VmConfigCase.forNumber(vmConfigCase_); + } + + public static final int MIGRATION_JOB_FIELD_NUMBER = 1; + private volatile java.lang.Object migrationJob_; + /** + * + * + *
+   * Name of the migration job resource to generate the SSH script.
+   * 
+ * + * string migration_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The migrationJob. + */ + @java.lang.Override + public java.lang.String getMigrationJob() { + java.lang.Object ref = migrationJob_; + 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(); + migrationJob_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the migration job resource to generate the SSH script.
+   * 
+ * + * string migration_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for migrationJob. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMigrationJobBytes() { + java.lang.Object ref = migrationJob_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + migrationJob_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_FIELD_NUMBER = 2; + private volatile java.lang.Object vm_; + /** + * + * + *
+   * Required. Bastion VM Instance name to use or to create.
+   * 
+ * + * string vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vm. + */ + @java.lang.Override + public java.lang.String getVm() { + java.lang.Object ref = vm_; + 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(); + vm_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Bastion VM Instance name to use or to create.
+   * 
+ * + * string vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vm. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmBytes() { + java.lang.Object ref = vm_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_CREATION_CONFIG_FIELD_NUMBER = 100; + /** + * + * + *
+   * The VM creation configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + * + * @return Whether the vmCreationConfig field is set. + */ + @java.lang.Override + public boolean hasVmCreationConfig() { + return vmConfigCase_ == 100; + } + /** + * + * + *
+   * The VM creation configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + * + * @return The vmCreationConfig. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VmCreationConfig getVmCreationConfig() { + if (vmConfigCase_ == 100) { + return (com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_; + } + return com.google.cloud.clouddms.v1.VmCreationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * The VM creation configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VmCreationConfigOrBuilder getVmCreationConfigOrBuilder() { + if (vmConfigCase_ == 100) { + return (com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_; + } + return com.google.cloud.clouddms.v1.VmCreationConfig.getDefaultInstance(); + } + + public static final int VM_SELECTION_CONFIG_FIELD_NUMBER = 101; + /** + * + * + *
+   * The VM selection configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + * + * @return Whether the vmSelectionConfig field is set. + */ + @java.lang.Override + public boolean hasVmSelectionConfig() { + return vmConfigCase_ == 101; + } + /** + * + * + *
+   * The VM selection configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + * + * @return The vmSelectionConfig. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VmSelectionConfig getVmSelectionConfig() { + if (vmConfigCase_ == 101) { + return (com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_; + } + return com.google.cloud.clouddms.v1.VmSelectionConfig.getDefaultInstance(); + } + /** + * + * + *
+   * The VM selection configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VmSelectionConfigOrBuilder getVmSelectionConfigOrBuilder() { + if (vmConfigCase_ == 101) { + return (com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_; + } + return com.google.cloud.clouddms.v1.VmSelectionConfig.getDefaultInstance(); + } + + public static final int VM_PORT_FIELD_NUMBER = 3; + private int vmPort_; + /** + * + * + *
+   * The port that will be open on the bastion host
+   * 
+ * + * int32 vm_port = 3; + * + * @return The vmPort. + */ + @java.lang.Override + public int getVmPort() { + return vmPort_; + } + + 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 (!getMigrationJobBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, migrationJob_); + } + if (!getVmBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vm_); + } + if (vmPort_ != 0) { + output.writeInt32(3, vmPort_); + } + if (vmConfigCase_ == 100) { + output.writeMessage(100, (com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_); + } + if (vmConfigCase_ == 101) { + output.writeMessage(101, (com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMigrationJobBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, migrationJob_); + } + if (!getVmBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vm_); + } + if (vmPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, vmPort_); + } + if (vmConfigCase_ == 100) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 100, (com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_); + } + if (vmConfigCase_ == 101) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 101, (com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_); + } + 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.clouddms.v1.GenerateSshScriptRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.GenerateSshScriptRequest other = + (com.google.cloud.clouddms.v1.GenerateSshScriptRequest) obj; + + if (!getMigrationJob().equals(other.getMigrationJob())) return false; + if (!getVm().equals(other.getVm())) return false; + if (getVmPort() != other.getVmPort()) return false; + if (!getVmConfigCase().equals(other.getVmConfigCase())) return false; + switch (vmConfigCase_) { + case 100: + if (!getVmCreationConfig().equals(other.getVmCreationConfig())) return false; + break; + case 101: + if (!getVmSelectionConfig().equals(other.getVmSelectionConfig())) 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) + MIGRATION_JOB_FIELD_NUMBER; + hash = (53 * hash) + getMigrationJob().hashCode(); + hash = (37 * hash) + VM_FIELD_NUMBER; + hash = (53 * hash) + getVm().hashCode(); + hash = (37 * hash) + VM_PORT_FIELD_NUMBER; + hash = (53 * hash) + getVmPort(); + switch (vmConfigCase_) { + case 100: + hash = (37 * hash) + VM_CREATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVmCreationConfig().hashCode(); + break; + case 101: + hash = (37 * hash) + VM_SELECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVmSelectionConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.GenerateSshScriptRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.GenerateSshScriptRequest 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.clouddms.v1.GenerateSshScriptRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.GenerateSshScriptRequest 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.clouddms.v1.GenerateSshScriptRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.GenerateSshScriptRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.GenerateSshScriptRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.GenerateSshScriptRequest 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.clouddms.v1.GenerateSshScriptRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.GenerateSshScriptRequest 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.clouddms.v1.GenerateSshScriptRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.GenerateSshScriptRequest 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.clouddms.v1.GenerateSshScriptRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'GenerateSshScript' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.GenerateSshScriptRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.GenerateSshScriptRequest) + com.google.cloud.clouddms.v1.GenerateSshScriptRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.GenerateSshScriptRequest.class, + com.google.cloud.clouddms.v1.GenerateSshScriptRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.GenerateSshScriptRequest.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(); + migrationJob_ = ""; + + vm_ = ""; + + vmPort_ = 0; + + vmConfigCase_ = 0; + vmConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GenerateSshScriptRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.GenerateSshScriptRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.GenerateSshScriptRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.GenerateSshScriptRequest build() { + com.google.cloud.clouddms.v1.GenerateSshScriptRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.GenerateSshScriptRequest buildPartial() { + com.google.cloud.clouddms.v1.GenerateSshScriptRequest result = + new com.google.cloud.clouddms.v1.GenerateSshScriptRequest(this); + result.migrationJob_ = migrationJob_; + result.vm_ = vm_; + if (vmConfigCase_ == 100) { + if (vmCreationConfigBuilder_ == null) { + result.vmConfig_ = vmConfig_; + } else { + result.vmConfig_ = vmCreationConfigBuilder_.build(); + } + } + if (vmConfigCase_ == 101) { + if (vmSelectionConfigBuilder_ == null) { + result.vmConfig_ = vmConfig_; + } else { + result.vmConfig_ = vmSelectionConfigBuilder_.build(); + } + } + result.vmPort_ = vmPort_; + result.vmConfigCase_ = vmConfigCase_; + 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.clouddms.v1.GenerateSshScriptRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.GenerateSshScriptRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.GenerateSshScriptRequest other) { + if (other == com.google.cloud.clouddms.v1.GenerateSshScriptRequest.getDefaultInstance()) + return this; + if (!other.getMigrationJob().isEmpty()) { + migrationJob_ = other.migrationJob_; + onChanged(); + } + if (!other.getVm().isEmpty()) { + vm_ = other.vm_; + onChanged(); + } + if (other.getVmPort() != 0) { + setVmPort(other.getVmPort()); + } + switch (other.getVmConfigCase()) { + case VM_CREATION_CONFIG: + { + mergeVmCreationConfig(other.getVmCreationConfig()); + break; + } + case VM_SELECTION_CONFIG: + { + mergeVmSelectionConfig(other.getVmSelectionConfig()); + break; + } + case VMCONFIG_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.clouddms.v1.GenerateSshScriptRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.GenerateSshScriptRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int vmConfigCase_ = 0; + private java.lang.Object vmConfig_; + + public VmConfigCase getVmConfigCase() { + return VmConfigCase.forNumber(vmConfigCase_); + } + + public Builder clearVmConfig() { + vmConfigCase_ = 0; + vmConfig_ = null; + onChanged(); + return this; + } + + private java.lang.Object migrationJob_ = ""; + /** + * + * + *
+     * Name of the migration job resource to generate the SSH script.
+     * 
+ * + * string migration_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The migrationJob. + */ + public java.lang.String getMigrationJob() { + java.lang.Object ref = migrationJob_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + migrationJob_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the migration job resource to generate the SSH script.
+     * 
+ * + * string migration_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for migrationJob. + */ + public com.google.protobuf.ByteString getMigrationJobBytes() { + java.lang.Object ref = migrationJob_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + migrationJob_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the migration job resource to generate the SSH script.
+     * 
+ * + * string migration_job = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The migrationJob to set. + * @return This builder for chaining. + */ + public Builder setMigrationJob(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + migrationJob_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the migration job resource to generate the SSH script.
+     * 
+ * + * string migration_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearMigrationJob() { + + migrationJob_ = getDefaultInstance().getMigrationJob(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the migration job resource to generate the SSH script.
+     * 
+ * + * string migration_job = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for migrationJob to set. + * @return This builder for chaining. + */ + public Builder setMigrationJobBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + migrationJob_ = value; + onChanged(); + return this; + } + + private java.lang.Object vm_ = ""; + /** + * + * + *
+     * Required. Bastion VM Instance name to use or to create.
+     * 
+ * + * string vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vm. + */ + public java.lang.String getVm() { + java.lang.Object ref = vm_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vm_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Bastion VM Instance name to use or to create.
+     * 
+ * + * string vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vm. + */ + public com.google.protobuf.ByteString getVmBytes() { + java.lang.Object ref = vm_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Bastion VM Instance name to use or to create.
+     * 
+ * + * string vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vm to set. + * @return This builder for chaining. + */ + public Builder setVm(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vm_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Bastion VM Instance name to use or to create.
+     * 
+ * + * string vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVm() { + + vm_ = getDefaultInstance().getVm(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Bastion VM Instance name to use or to create.
+     * 
+ * + * string vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for vm to set. + * @return This builder for chaining. + */ + public Builder setVmBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vm_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.VmCreationConfig, + com.google.cloud.clouddms.v1.VmCreationConfig.Builder, + com.google.cloud.clouddms.v1.VmCreationConfigOrBuilder> + vmCreationConfigBuilder_; + /** + * + * + *
+     * The VM creation configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + * + * @return Whether the vmCreationConfig field is set. + */ + @java.lang.Override + public boolean hasVmCreationConfig() { + return vmConfigCase_ == 100; + } + /** + * + * + *
+     * The VM creation configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + * + * @return The vmCreationConfig. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VmCreationConfig getVmCreationConfig() { + if (vmCreationConfigBuilder_ == null) { + if (vmConfigCase_ == 100) { + return (com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_; + } + return com.google.cloud.clouddms.v1.VmCreationConfig.getDefaultInstance(); + } else { + if (vmConfigCase_ == 100) { + return vmCreationConfigBuilder_.getMessage(); + } + return com.google.cloud.clouddms.v1.VmCreationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * The VM creation configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + */ + public Builder setVmCreationConfig(com.google.cloud.clouddms.v1.VmCreationConfig value) { + if (vmCreationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vmConfig_ = value; + onChanged(); + } else { + vmCreationConfigBuilder_.setMessage(value); + } + vmConfigCase_ = 100; + return this; + } + /** + * + * + *
+     * The VM creation configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + */ + public Builder setVmCreationConfig( + com.google.cloud.clouddms.v1.VmCreationConfig.Builder builderForValue) { + if (vmCreationConfigBuilder_ == null) { + vmConfig_ = builderForValue.build(); + onChanged(); + } else { + vmCreationConfigBuilder_.setMessage(builderForValue.build()); + } + vmConfigCase_ = 100; + return this; + } + /** + * + * + *
+     * The VM creation configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + */ + public Builder mergeVmCreationConfig(com.google.cloud.clouddms.v1.VmCreationConfig value) { + if (vmCreationConfigBuilder_ == null) { + if (vmConfigCase_ == 100 + && vmConfig_ != com.google.cloud.clouddms.v1.VmCreationConfig.getDefaultInstance()) { + vmConfig_ = + com.google.cloud.clouddms.v1.VmCreationConfig.newBuilder( + (com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + vmConfig_ = value; + } + onChanged(); + } else { + if (vmConfigCase_ == 100) { + vmCreationConfigBuilder_.mergeFrom(value); + } + vmCreationConfigBuilder_.setMessage(value); + } + vmConfigCase_ = 100; + return this; + } + /** + * + * + *
+     * The VM creation configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + */ + public Builder clearVmCreationConfig() { + if (vmCreationConfigBuilder_ == null) { + if (vmConfigCase_ == 100) { + vmConfigCase_ = 0; + vmConfig_ = null; + onChanged(); + } + } else { + if (vmConfigCase_ == 100) { + vmConfigCase_ = 0; + vmConfig_ = null; + } + vmCreationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The VM creation configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + */ + public com.google.cloud.clouddms.v1.VmCreationConfig.Builder getVmCreationConfigBuilder() { + return getVmCreationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The VM creation configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VmCreationConfigOrBuilder getVmCreationConfigOrBuilder() { + if ((vmConfigCase_ == 100) && (vmCreationConfigBuilder_ != null)) { + return vmCreationConfigBuilder_.getMessageOrBuilder(); + } else { + if (vmConfigCase_ == 100) { + return (com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_; + } + return com.google.cloud.clouddms.v1.VmCreationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * The VM creation configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.VmCreationConfig, + com.google.cloud.clouddms.v1.VmCreationConfig.Builder, + com.google.cloud.clouddms.v1.VmCreationConfigOrBuilder> + getVmCreationConfigFieldBuilder() { + if (vmCreationConfigBuilder_ == null) { + if (!(vmConfigCase_ == 100)) { + vmConfig_ = com.google.cloud.clouddms.v1.VmCreationConfig.getDefaultInstance(); + } + vmCreationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.VmCreationConfig, + com.google.cloud.clouddms.v1.VmCreationConfig.Builder, + com.google.cloud.clouddms.v1.VmCreationConfigOrBuilder>( + (com.google.cloud.clouddms.v1.VmCreationConfig) vmConfig_, + getParentForChildren(), + isClean()); + vmConfig_ = null; + } + vmConfigCase_ = 100; + onChanged(); + ; + return vmCreationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.VmSelectionConfig, + com.google.cloud.clouddms.v1.VmSelectionConfig.Builder, + com.google.cloud.clouddms.v1.VmSelectionConfigOrBuilder> + vmSelectionConfigBuilder_; + /** + * + * + *
+     * The VM selection configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + * + * @return Whether the vmSelectionConfig field is set. + */ + @java.lang.Override + public boolean hasVmSelectionConfig() { + return vmConfigCase_ == 101; + } + /** + * + * + *
+     * The VM selection configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + * + * @return The vmSelectionConfig. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VmSelectionConfig getVmSelectionConfig() { + if (vmSelectionConfigBuilder_ == null) { + if (vmConfigCase_ == 101) { + return (com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_; + } + return com.google.cloud.clouddms.v1.VmSelectionConfig.getDefaultInstance(); + } else { + if (vmConfigCase_ == 101) { + return vmSelectionConfigBuilder_.getMessage(); + } + return com.google.cloud.clouddms.v1.VmSelectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * The VM selection configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + */ + public Builder setVmSelectionConfig(com.google.cloud.clouddms.v1.VmSelectionConfig value) { + if (vmSelectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vmConfig_ = value; + onChanged(); + } else { + vmSelectionConfigBuilder_.setMessage(value); + } + vmConfigCase_ = 101; + return this; + } + /** + * + * + *
+     * The VM selection configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + */ + public Builder setVmSelectionConfig( + com.google.cloud.clouddms.v1.VmSelectionConfig.Builder builderForValue) { + if (vmSelectionConfigBuilder_ == null) { + vmConfig_ = builderForValue.build(); + onChanged(); + } else { + vmSelectionConfigBuilder_.setMessage(builderForValue.build()); + } + vmConfigCase_ = 101; + return this; + } + /** + * + * + *
+     * The VM selection configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + */ + public Builder mergeVmSelectionConfig(com.google.cloud.clouddms.v1.VmSelectionConfig value) { + if (vmSelectionConfigBuilder_ == null) { + if (vmConfigCase_ == 101 + && vmConfig_ != com.google.cloud.clouddms.v1.VmSelectionConfig.getDefaultInstance()) { + vmConfig_ = + com.google.cloud.clouddms.v1.VmSelectionConfig.newBuilder( + (com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + vmConfig_ = value; + } + onChanged(); + } else { + if (vmConfigCase_ == 101) { + vmSelectionConfigBuilder_.mergeFrom(value); + } + vmSelectionConfigBuilder_.setMessage(value); + } + vmConfigCase_ = 101; + return this; + } + /** + * + * + *
+     * The VM selection configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + */ + public Builder clearVmSelectionConfig() { + if (vmSelectionConfigBuilder_ == null) { + if (vmConfigCase_ == 101) { + vmConfigCase_ = 0; + vmConfig_ = null; + onChanged(); + } + } else { + if (vmConfigCase_ == 101) { + vmConfigCase_ = 0; + vmConfig_ = null; + } + vmSelectionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The VM selection configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + */ + public com.google.cloud.clouddms.v1.VmSelectionConfig.Builder getVmSelectionConfigBuilder() { + return getVmSelectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The VM selection configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VmSelectionConfigOrBuilder getVmSelectionConfigOrBuilder() { + if ((vmConfigCase_ == 101) && (vmSelectionConfigBuilder_ != null)) { + return vmSelectionConfigBuilder_.getMessageOrBuilder(); + } else { + if (vmConfigCase_ == 101) { + return (com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_; + } + return com.google.cloud.clouddms.v1.VmSelectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * The VM selection configuration
+     * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.VmSelectionConfig, + com.google.cloud.clouddms.v1.VmSelectionConfig.Builder, + com.google.cloud.clouddms.v1.VmSelectionConfigOrBuilder> + getVmSelectionConfigFieldBuilder() { + if (vmSelectionConfigBuilder_ == null) { + if (!(vmConfigCase_ == 101)) { + vmConfig_ = com.google.cloud.clouddms.v1.VmSelectionConfig.getDefaultInstance(); + } + vmSelectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.VmSelectionConfig, + com.google.cloud.clouddms.v1.VmSelectionConfig.Builder, + com.google.cloud.clouddms.v1.VmSelectionConfigOrBuilder>( + (com.google.cloud.clouddms.v1.VmSelectionConfig) vmConfig_, + getParentForChildren(), + isClean()); + vmConfig_ = null; + } + vmConfigCase_ = 101; + onChanged(); + ; + return vmSelectionConfigBuilder_; + } + + private int vmPort_; + /** + * + * + *
+     * The port that will be open on the bastion host
+     * 
+ * + * int32 vm_port = 3; + * + * @return The vmPort. + */ + @java.lang.Override + public int getVmPort() { + return vmPort_; + } + /** + * + * + *
+     * The port that will be open on the bastion host
+     * 
+ * + * int32 vm_port = 3; + * + * @param value The vmPort to set. + * @return This builder for chaining. + */ + public Builder setVmPort(int value) { + + vmPort_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The port that will be open on the bastion host
+     * 
+ * + * int32 vm_port = 3; + * + * @return This builder for chaining. + */ + public Builder clearVmPort() { + + vmPort_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.clouddms.v1.GenerateSshScriptRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.GenerateSshScriptRequest) + private static final com.google.cloud.clouddms.v1.GenerateSshScriptRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.GenerateSshScriptRequest(); + } + + public static com.google.cloud.clouddms.v1.GenerateSshScriptRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateSshScriptRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateSshScriptRequest(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.clouddms.v1.GenerateSshScriptRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GenerateSshScriptRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GenerateSshScriptRequestOrBuilder.java new file mode 100644 index 00000000..c1a829a3 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GenerateSshScriptRequestOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface GenerateSshScriptRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.GenerateSshScriptRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the migration job resource to generate the SSH script.
+   * 
+ * + * string migration_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The migrationJob. + */ + java.lang.String getMigrationJob(); + /** + * + * + *
+   * Name of the migration job resource to generate the SSH script.
+   * 
+ * + * string migration_job = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for migrationJob. + */ + com.google.protobuf.ByteString getMigrationJobBytes(); + + /** + * + * + *
+   * Required. Bastion VM Instance name to use or to create.
+   * 
+ * + * string vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vm. + */ + java.lang.String getVm(); + /** + * + * + *
+   * Required. Bastion VM Instance name to use or to create.
+   * 
+ * + * string vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vm. + */ + com.google.protobuf.ByteString getVmBytes(); + + /** + * + * + *
+   * The VM creation configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + * + * @return Whether the vmCreationConfig field is set. + */ + boolean hasVmCreationConfig(); + /** + * + * + *
+   * The VM creation configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + * + * @return The vmCreationConfig. + */ + com.google.cloud.clouddms.v1.VmCreationConfig getVmCreationConfig(); + /** + * + * + *
+   * The VM creation configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmCreationConfig vm_creation_config = 100; + */ + com.google.cloud.clouddms.v1.VmCreationConfigOrBuilder getVmCreationConfigOrBuilder(); + + /** + * + * + *
+   * The VM selection configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + * + * @return Whether the vmSelectionConfig field is set. + */ + boolean hasVmSelectionConfig(); + /** + * + * + *
+   * The VM selection configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + * + * @return The vmSelectionConfig. + */ + com.google.cloud.clouddms.v1.VmSelectionConfig getVmSelectionConfig(); + /** + * + * + *
+   * The VM selection configuration
+   * 
+ * + * .google.cloud.clouddms.v1.VmSelectionConfig vm_selection_config = 101; + */ + com.google.cloud.clouddms.v1.VmSelectionConfigOrBuilder getVmSelectionConfigOrBuilder(); + + /** + * + * + *
+   * The port that will be open on the bastion host
+   * 
+ * + * int32 vm_port = 3; + * + * @return The vmPort. + */ + int getVmPort(); + + public com.google.cloud.clouddms.v1.GenerateSshScriptRequest.VmConfigCase getVmConfigCase(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetConnectionProfileRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetConnectionProfileRequest.java new file mode 100644 index 00000000..571e547f --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetConnectionProfileRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'GetConnectionProfile' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.GetConnectionProfileRequest} + */ +public final class GetConnectionProfileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.GetConnectionProfileRequest) + GetConnectionProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetConnectionProfileRequest.newBuilder() to construct. + private GetConnectionProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetConnectionProfileRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetConnectionProfileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetConnectionProfileRequest( + 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 (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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.GetConnectionProfileRequest.class, + com.google.cloud.clouddms.v1.GetConnectionProfileRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the connection profile resource to get.
+   * 
+ * + * + * 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. Name of the connection profile resource to get.
+   * 
+ * + * + * 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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.clouddms.v1.GetConnectionProfileRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.GetConnectionProfileRequest other = + (com.google.cloud.clouddms.v1.GetConnectionProfileRequest) 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.clouddms.v1.GetConnectionProfileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.GetConnectionProfileRequest 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.clouddms.v1.GetConnectionProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.GetConnectionProfileRequest 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.clouddms.v1.GetConnectionProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.GetConnectionProfileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.GetConnectionProfileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.GetConnectionProfileRequest 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.clouddms.v1.GetConnectionProfileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.GetConnectionProfileRequest 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.clouddms.v1.GetConnectionProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.GetConnectionProfileRequest 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.clouddms.v1.GetConnectionProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'GetConnectionProfile' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.GetConnectionProfileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.GetConnectionProfileRequest) + com.google.cloud.clouddms.v1.GetConnectionProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.GetConnectionProfileRequest.class, + com.google.cloud.clouddms.v1.GetConnectionProfileRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.GetConnectionProfileRequest.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetConnectionProfileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.GetConnectionProfileRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.GetConnectionProfileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.GetConnectionProfileRequest build() { + com.google.cloud.clouddms.v1.GetConnectionProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.GetConnectionProfileRequest buildPartial() { + com.google.cloud.clouddms.v1.GetConnectionProfileRequest result = + new com.google.cloud.clouddms.v1.GetConnectionProfileRequest(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.clouddms.v1.GetConnectionProfileRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.GetConnectionProfileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.GetConnectionProfileRequest other) { + if (other == com.google.cloud.clouddms.v1.GetConnectionProfileRequest.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.clouddms.v1.GetConnectionProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.GetConnectionProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the connection profile resource to get.
+     * 
+ * + * + * 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. Name of the connection profile resource to get.
+     * 
+ * + * + * 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. Name of the connection profile resource to get.
+     * 
+ * + * + * 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. Name of the connection profile resource to get.
+     * 
+ * + * + * 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. Name of the connection profile resource to get.
+     * 
+ * + * + * 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.clouddms.v1.GetConnectionProfileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.GetConnectionProfileRequest) + private static final com.google.cloud.clouddms.v1.GetConnectionProfileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.GetConnectionProfileRequest(); + } + + public static com.google.cloud.clouddms.v1.GetConnectionProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConnectionProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetConnectionProfileRequest(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.clouddms.v1.GetConnectionProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetConnectionProfileRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetConnectionProfileRequestOrBuilder.java new file mode 100644 index 00000000..f2e536ff --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetConnectionProfileRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface GetConnectionProfileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.GetConnectionProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the connection profile resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the connection profile resource to get.
+   * 
+ * + * + * 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/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetMigrationJobRequest.java new file mode 100644 index 00000000..31092fb4 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetMigrationJobRequest.java @@ -0,0 +1,650 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'GetMigrationJob' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.GetMigrationJobRequest} + */ +public final class GetMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.GetMigrationJobRequest) + GetMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetMigrationJobRequest.newBuilder() to construct. + private GetMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetMigrationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetMigrationJobRequest( + 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 (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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.GetMigrationJobRequest.class, + com.google.cloud.clouddms.v1.GetMigrationJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the migration job resource to get.
+   * 
+ * + * + * 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. Name of the migration job resource to get.
+   * 
+ * + * + * 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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.clouddms.v1.GetMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.GetMigrationJobRequest other = + (com.google.cloud.clouddms.v1.GetMigrationJobRequest) 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.clouddms.v1.GetMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.GetMigrationJobRequest 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.clouddms.v1.GetMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.GetMigrationJobRequest 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.clouddms.v1.GetMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.GetMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.GetMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.GetMigrationJobRequest 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.clouddms.v1.GetMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.GetMigrationJobRequest 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.clouddms.v1.GetMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.GetMigrationJobRequest 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.clouddms.v1.GetMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'GetMigrationJob' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.GetMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.GetMigrationJobRequest) + com.google.cloud.clouddms.v1.GetMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.GetMigrationJobRequest.class, + com.google.cloud.clouddms.v1.GetMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.GetMigrationJobRequest.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_GetMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.GetMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.GetMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.GetMigrationJobRequest build() { + com.google.cloud.clouddms.v1.GetMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.GetMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.GetMigrationJobRequest result = + new com.google.cloud.clouddms.v1.GetMigrationJobRequest(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.clouddms.v1.GetMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.GetMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.GetMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.GetMigrationJobRequest.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.clouddms.v1.GetMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.GetMigrationJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the migration job resource to get.
+     * 
+ * + * + * 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. Name of the migration job resource to get.
+     * 
+ * + * + * 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. Name of the migration job resource to get.
+     * 
+ * + * + * 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. Name of the migration job resource to get.
+     * 
+ * + * + * 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. Name of the migration job resource to get.
+     * 
+ * + * + * 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.clouddms.v1.GetMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.GetMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.GetMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.GetMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.GetMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetMigrationJobRequest(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.clouddms.v1.GetMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..aae2d7ea --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/GetMigrationJobRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface GetMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.GetMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the migration job resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the migration job resource to get.
+   * 
+ * + * + * 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/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesRequest.java new file mode 100644 index 00000000..9409900e --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesRequest.java @@ -0,0 +1,1367 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'ListConnectionProfiles' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ListConnectionProfilesRequest} + */ +public final class ListConnectionProfilesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.ListConnectionProfilesRequest) + ListConnectionProfilesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConnectionProfilesRequest.newBuilder() to construct. + private ListConnectionProfilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConnectionProfilesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConnectionProfilesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListConnectionProfilesRequest( + 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(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest.class, + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent, which owns this collection of connection profiles.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of connection profiles.
+   * 
+ * + * + * 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 connection profiles to return. The service may return
+   * fewer than this value. If unspecified, at most 50 connection profiles will
+   * be returned. The maximum value is 1000; values above 1000 will be coerced
+   * to 1000.
+   * 
+ * + * 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_; + /** + * + * + *
+   * A page token, received from a previous `ListConnectionProfiles` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListConnectionProfiles`
+   * must match the call that provided the page token.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListConnectionProfiles` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListConnectionProfiles`
+   * must match the call that provided the page token.
+   * 
+ * + * 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 FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * A filter expression that filters connection profiles listed in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. The value must
+   * be a string, a number, or a boolean. The comparison operator must be either
+   * =, !=, >, or <. For example, list connection profiles created this year by
+   * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
+   * also filter nested fields. For example, you could specify **mySql.username
+   * = %lt;my_username%gt;** to list all connection profiles configured to
+   * connect with a specific username.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * A filter expression that filters connection profiles listed in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. The value must
+   * be a string, a number, or a boolean. The comparison operator must be either
+   * =, !=, >, or <. For example, list connection profiles created this year by
+   * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
+   * also filter nested fields. For example, you could specify **mySql.username
+   * = %lt;my_username%gt;** to list all connection profiles configured to
+   * connect with a specific username.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * the order by fields for the result.
+   * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+   * the order by fields for the result.
+   * 
+ * + * string order_by = 5; + * + * @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; + } + } + + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + 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.clouddms.v1.ListConnectionProfilesRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest other = + (com.google.cloud.clouddms.v1.ListConnectionProfilesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesRequest 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.clouddms.v1.ListConnectionProfilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesRequest 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.clouddms.v1.ListConnectionProfilesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesRequest 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.clouddms.v1.ListConnectionProfilesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesRequest 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.clouddms.v1.ListConnectionProfilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesRequest 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.clouddms.v1.ListConnectionProfilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'ListConnectionProfiles' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ListConnectionProfilesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.ListConnectionProfilesRequest) + com.google.cloud.clouddms.v1.ListConnectionProfilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest.class, + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.ListConnectionProfilesRequest.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_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListConnectionProfilesRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.ListConnectionProfilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListConnectionProfilesRequest build() { + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListConnectionProfilesRequest buildPartial() { + com.google.cloud.clouddms.v1.ListConnectionProfilesRequest result = + new com.google.cloud.clouddms.v1.ListConnectionProfilesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + 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.clouddms.v1.ListConnectionProfilesRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.ListConnectionProfilesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.ListConnectionProfilesRequest other) { + if (other == com.google.cloud.clouddms.v1.ListConnectionProfilesRequest.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.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + 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.clouddms.v1.ListConnectionProfilesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.ListConnectionProfilesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of connection profiles.
+     * 
+ * + * + * 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 connection profiles to return. The service may return
+     * fewer than this value. If unspecified, at most 50 connection profiles will
+     * be returned. The maximum value is 1000; values above 1000 will be coerced
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of connection profiles to return. The service may return
+     * fewer than this value. If unspecified, at most 50 connection profiles will
+     * be returned. The maximum value is 1000; values above 1000 will be coerced
+     * to 1000.
+     * 
+ * + * 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 connection profiles to return. The service may return
+     * fewer than this value. If unspecified, at most 50 connection profiles will
+     * be returned. The maximum value is 1000; values above 1000 will be coerced
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListConnectionProfiles` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConnectionProfiles`
+     * must match the call that provided the page token.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListConnectionProfiles` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConnectionProfiles`
+     * must match the call that provided the page token.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListConnectionProfiles` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConnectionProfiles`
+     * must match the call that provided the page token.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A page token, received from a previous `ListConnectionProfiles` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConnectionProfiles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListConnectionProfiles` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListConnectionProfiles`
+     * must match the call that provided the page token.
+     * 
+ * + * 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 filter_ = ""; + /** + * + * + *
+     * A filter expression that filters connection profiles listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. The value must
+     * be a string, a number, or a boolean. The comparison operator must be either
+     * =, !=, >, or <. For example, list connection profiles created this year by
+     * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
+     * also filter nested fields. For example, you could specify **mySql.username
+     * = %lt;my_username%gt;** to list all connection profiles configured to
+     * connect with a specific username.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A filter expression that filters connection profiles listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. The value must
+     * be a string, a number, or a boolean. The comparison operator must be either
+     * =, !=, >, or <. For example, list connection profiles created this year by
+     * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
+     * also filter nested fields. For example, you could specify **mySql.username
+     * = %lt;my_username%gt;** to list all connection profiles configured to
+     * connect with a specific username.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A filter expression that filters connection profiles listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. The value must
+     * be a string, a number, or a boolean. The comparison operator must be either
+     * =, !=, >, or <. For example, list connection profiles created this year by
+     * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
+     * also filter nested fields. For example, you could specify **mySql.username
+     * = %lt;my_username%gt;** to list all connection profiles configured to
+     * connect with a specific username.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters connection profiles listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. The value must
+     * be a string, a number, or a boolean. The comparison operator must be either
+     * =, !=, >, or <. For example, list connection profiles created this year by
+     * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
+     * also filter nested fields. For example, you could specify **mySql.username
+     * = %lt;my_username%gt;** to list all connection profiles configured to
+     * connect with a specific username.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters connection profiles listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. The value must
+     * be a string, a number, or a boolean. The comparison operator must be either
+     * =, !=, >, or <. For example, list connection profiles created this year by
+     * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
+     * also filter nested fields. For example, you could specify **mySql.username
+     * = %lt;my_username%gt;** to list all connection profiles configured to
+     * connect with a specific username.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * the order by fields for the result.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * the order by fields for the result.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * the order by fields for the result.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + /** + * + * + *
+     * the order by fields for the result.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * the order by fields for the result.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + + @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.clouddms.v1.ListConnectionProfilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.ListConnectionProfilesRequest) + private static final com.google.cloud.clouddms.v1.ListConnectionProfilesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.ListConnectionProfilesRequest(); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConnectionProfilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListConnectionProfilesRequest(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.clouddms.v1.ListConnectionProfilesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesRequestOrBuilder.java new file mode 100644 index 00000000..92ea3aef --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface ListConnectionProfilesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.ListConnectionProfilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of connection profiles.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of connection profiles.
+   * 
+ * + * + * 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 connection profiles to return. The service may return
+   * fewer than this value. If unspecified, at most 50 connection profiles will
+   * be returned. The maximum value is 1000; values above 1000 will be coerced
+   * to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListConnectionProfiles` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListConnectionProfiles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListConnectionProfiles` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListConnectionProfiles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A filter expression that filters connection profiles listed in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. The value must
+   * be a string, a number, or a boolean. The comparison operator must be either
+   * =, !=, >, or <. For example, list connection profiles created this year by
+   * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
+   * also filter nested fields. For example, you could specify **mySql.username
+   * = %lt;my_username%gt;** to list all connection profiles configured to
+   * connect with a specific username.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * A filter expression that filters connection profiles listed in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. The value must
+   * be a string, a number, or a boolean. The comparison operator must be either
+   * =, !=, >, or <. For example, list connection profiles created this year by
+   * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
+   * also filter nested fields. For example, you could specify **mySql.username
+   * = %lt;my_username%gt;** to list all connection profiles configured to
+   * connect with a specific username.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * the order by fields for the result.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * the order by fields for the result.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesResponse.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesResponse.java new file mode 100644 index 00000000..c0acb73c --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesResponse.java @@ -0,0 +1,1429 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Response message for 'ListConnectionProfiles' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ListConnectionProfilesResponse} + */ +public final class ListConnectionProfilesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.ListConnectionProfilesResponse) + ListConnectionProfilesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConnectionProfilesResponse.newBuilder() to construct. + private ListConnectionProfilesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConnectionProfilesResponse() { + connectionProfiles_ = 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 ListConnectionProfilesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListConnectionProfilesResponse( + 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)) { + connectionProfiles_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + connectionProfiles_.add( + input.readMessage( + com.google.cloud.clouddms.v1.ConnectionProfile.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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + connectionProfiles_ = java.util.Collections.unmodifiableList(connectionProfiles_); + } + 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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse.class, + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse.Builder.class); + } + + public static final int CONNECTION_PROFILES_FIELD_NUMBER = 1; + private java.util.List connectionProfiles_; + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + @java.lang.Override + public java.util.List + getConnectionProfilesList() { + return connectionProfiles_; + } + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + @java.lang.Override + public java.util.List + getConnectionProfilesOrBuilderList() { + return connectionProfiles_; + } + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + @java.lang.Override + public int getConnectionProfilesCount() { + return connectionProfiles_.size(); + } + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfiles(int index) { + return connectionProfiles_.get(index); + } + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder getConnectionProfilesOrBuilder( + int index) { + return connectionProfiles_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < connectionProfiles_.size(); i++) { + output.writeMessage(1, connectionProfiles_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 < connectionProfiles_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, connectionProfiles_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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.clouddms.v1.ListConnectionProfilesResponse)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse other = + (com.google.cloud.clouddms.v1.ListConnectionProfilesResponse) obj; + + if (!getConnectionProfilesList().equals(other.getConnectionProfilesList())) 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 (getConnectionProfilesCount() > 0) { + hash = (37 * hash) + CONNECTION_PROFILES_FIELD_NUMBER; + hash = (53 * hash) + getConnectionProfilesList().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.clouddms.v1.ListConnectionProfilesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesResponse 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.clouddms.v1.ListConnectionProfilesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesResponse 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.clouddms.v1.ListConnectionProfilesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesResponse 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.clouddms.v1.ListConnectionProfilesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesResponse 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.clouddms.v1.ListConnectionProfilesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesResponse 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.clouddms.v1.ListConnectionProfilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for 'ListConnectionProfiles' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ListConnectionProfilesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.ListConnectionProfilesResponse) + com.google.cloud.clouddms.v1.ListConnectionProfilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse.class, + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.ListConnectionProfilesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConnectionProfilesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (connectionProfilesBuilder_ == null) { + connectionProfiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + connectionProfilesBuilder_.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListConnectionProfilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListConnectionProfilesResponse getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.ListConnectionProfilesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListConnectionProfilesResponse build() { + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListConnectionProfilesResponse buildPartial() { + com.google.cloud.clouddms.v1.ListConnectionProfilesResponse result = + new com.google.cloud.clouddms.v1.ListConnectionProfilesResponse(this); + int from_bitField0_ = bitField0_; + if (connectionProfilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + connectionProfiles_ = java.util.Collections.unmodifiableList(connectionProfiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.connectionProfiles_ = connectionProfiles_; + } else { + result.connectionProfiles_ = connectionProfilesBuilder_.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.clouddms.v1.ListConnectionProfilesResponse) { + return mergeFrom((com.google.cloud.clouddms.v1.ListConnectionProfilesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.ListConnectionProfilesResponse other) { + if (other == com.google.cloud.clouddms.v1.ListConnectionProfilesResponse.getDefaultInstance()) + return this; + if (connectionProfilesBuilder_ == null) { + if (!other.connectionProfiles_.isEmpty()) { + if (connectionProfiles_.isEmpty()) { + connectionProfiles_ = other.connectionProfiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConnectionProfilesIsMutable(); + connectionProfiles_.addAll(other.connectionProfiles_); + } + onChanged(); + } + } else { + if (!other.connectionProfiles_.isEmpty()) { + if (connectionProfilesBuilder_.isEmpty()) { + connectionProfilesBuilder_.dispose(); + connectionProfilesBuilder_ = null; + connectionProfiles_ = other.connectionProfiles_; + bitField0_ = (bitField0_ & ~0x00000001); + connectionProfilesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConnectionProfilesFieldBuilder() + : null; + } else { + connectionProfilesBuilder_.addAllMessages(other.connectionProfiles_); + } + } + } + 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.clouddms.v1.ListConnectionProfilesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.ListConnectionProfilesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List connectionProfiles_ = + java.util.Collections.emptyList(); + + private void ensureConnectionProfilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + connectionProfiles_ = + new java.util.ArrayList( + connectionProfiles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.clouddms.v1.ConnectionProfile, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder, + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder> + connectionProfilesBuilder_; + + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public java.util.List + getConnectionProfilesList() { + if (connectionProfilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(connectionProfiles_); + } else { + return connectionProfilesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public int getConnectionProfilesCount() { + if (connectionProfilesBuilder_ == null) { + return connectionProfiles_.size(); + } else { + return connectionProfilesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfiles(int index) { + if (connectionProfilesBuilder_ == null) { + return connectionProfiles_.get(index); + } else { + return connectionProfilesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public Builder setConnectionProfiles( + int index, com.google.cloud.clouddms.v1.ConnectionProfile value) { + if (connectionProfilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionProfilesIsMutable(); + connectionProfiles_.set(index, value); + onChanged(); + } else { + connectionProfilesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public Builder setConnectionProfiles( + int index, com.google.cloud.clouddms.v1.ConnectionProfile.Builder builderForValue) { + if (connectionProfilesBuilder_ == null) { + ensureConnectionProfilesIsMutable(); + connectionProfiles_.set(index, builderForValue.build()); + onChanged(); + } else { + connectionProfilesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public Builder addConnectionProfiles(com.google.cloud.clouddms.v1.ConnectionProfile value) { + if (connectionProfilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionProfilesIsMutable(); + connectionProfiles_.add(value); + onChanged(); + } else { + connectionProfilesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public Builder addConnectionProfiles( + int index, com.google.cloud.clouddms.v1.ConnectionProfile value) { + if (connectionProfilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionProfilesIsMutable(); + connectionProfiles_.add(index, value); + onChanged(); + } else { + connectionProfilesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public Builder addConnectionProfiles( + com.google.cloud.clouddms.v1.ConnectionProfile.Builder builderForValue) { + if (connectionProfilesBuilder_ == null) { + ensureConnectionProfilesIsMutable(); + connectionProfiles_.add(builderForValue.build()); + onChanged(); + } else { + connectionProfilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public Builder addConnectionProfiles( + int index, com.google.cloud.clouddms.v1.ConnectionProfile.Builder builderForValue) { + if (connectionProfilesBuilder_ == null) { + ensureConnectionProfilesIsMutable(); + connectionProfiles_.add(index, builderForValue.build()); + onChanged(); + } else { + connectionProfilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public Builder addAllConnectionProfiles( + java.lang.Iterable values) { + if (connectionProfilesBuilder_ == null) { + ensureConnectionProfilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, connectionProfiles_); + onChanged(); + } else { + connectionProfilesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public Builder clearConnectionProfiles() { + if (connectionProfilesBuilder_ == null) { + connectionProfiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + connectionProfilesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public Builder removeConnectionProfiles(int index) { + if (connectionProfilesBuilder_ == null) { + ensureConnectionProfilesIsMutable(); + connectionProfiles_.remove(index); + onChanged(); + } else { + connectionProfilesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public com.google.cloud.clouddms.v1.ConnectionProfile.Builder getConnectionProfilesBuilder( + int index) { + return getConnectionProfilesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder getConnectionProfilesOrBuilder( + int index) { + if (connectionProfilesBuilder_ == null) { + return connectionProfiles_.get(index); + } else { + return connectionProfilesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public java.util.List + getConnectionProfilesOrBuilderList() { + if (connectionProfilesBuilder_ != null) { + return connectionProfilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(connectionProfiles_); + } + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public com.google.cloud.clouddms.v1.ConnectionProfile.Builder addConnectionProfilesBuilder() { + return getConnectionProfilesFieldBuilder() + .addBuilder(com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance()); + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public com.google.cloud.clouddms.v1.ConnectionProfile.Builder addConnectionProfilesBuilder( + int index) { + return getConnectionProfilesFieldBuilder() + .addBuilder(index, com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance()); + } + /** + * + * + *
+     * The response list of connection profiles.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + public java.util.List + getConnectionProfilesBuilderList() { + return getConnectionProfilesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.clouddms.v1.ConnectionProfile, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder, + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder> + getConnectionProfilesFieldBuilder() { + if (connectionProfilesBuilder_ == null) { + connectionProfilesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.clouddms.v1.ConnectionProfile, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder, + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder>( + connectionProfiles_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + connectionProfiles_ = null; + } + return connectionProfilesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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.clouddms.v1.ListConnectionProfilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.ListConnectionProfilesResponse) + private static final com.google.cloud.clouddms.v1.ListConnectionProfilesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.ListConnectionProfilesResponse(); + } + + public static com.google.cloud.clouddms.v1.ListConnectionProfilesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConnectionProfilesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListConnectionProfilesResponse(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.clouddms.v1.ListConnectionProfilesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesResponseOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesResponseOrBuilder.java new file mode 100644 index 00000000..9497172a --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListConnectionProfilesResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface ListConnectionProfilesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.ListConnectionProfilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + java.util.List getConnectionProfilesList(); + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfiles(int index); + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + int getConnectionProfilesCount(); + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + java.util.List + getConnectionProfilesOrBuilderList(); + /** + * + * + *
+   * The response list of connection profiles.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.ConnectionProfile connection_profiles = 1; + */ + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder getConnectionProfilesOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsRequest.java new file mode 100644 index 00000000..a9b51092 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsRequest.java @@ -0,0 +1,1381 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Retrieve a list of all migration jobs in a given project and location.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ListMigrationJobsRequest} + */ +public final class ListMigrationJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.ListMigrationJobsRequest) + ListMigrationJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListMigrationJobsRequest.newBuilder() to construct. + private ListMigrationJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMigrationJobsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListMigrationJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListMigrationJobsRequest( + 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(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ListMigrationJobsRequest.class, + com.google.cloud.clouddms.v1.ListMigrationJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent, which owns this collection of migrationJobs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of migrationJobs.
+   * 
+ * + * + * 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 migration jobs to return. The service may return
+   * fewer than this value. If unspecified, at most 50 migration jobs will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * 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 nextPageToken value received in the previous call to
+   * migrationJobs.list, used in the subsequent request to retrieve the next
+   * page of results. On first call this should be left blank. When paginating,
+   * all other parameters provided to migrationJobs.list must match the call
+   * that provided the page token.
+   * 
+ * + * 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 nextPageToken value received in the previous call to
+   * migrationJobs.list, used in the subsequent request to retrieve the next
+   * page of results. On first call this should be left blank. When paginating,
+   * all other parameters provided to migrationJobs.list must match the call
+   * that provided the page token.
+   * 
+ * + * 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 FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * A filter expression that filters migration jobs listed in the response.
+   * The expression must specify the field name, a comparison operator, and the
+   * value that you want to use for filtering. The value must be a string,
+   * a number, or a boolean. The comparison operator must be
+   * either =, !=, >, or <. For example, list migration jobs created this year
+   * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
+   * You can also filter nested fields. For example, you could specify
+   * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
+   * jobs connecting through the specific SSH tunnel bastion.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * A filter expression that filters migration jobs listed in the response.
+   * The expression must specify the field name, a comparison operator, and the
+   * value that you want to use for filtering. The value must be a string,
+   * a number, or a boolean. The comparison operator must be
+   * either =, !=, >, or <. For example, list migration jobs created this year
+   * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
+   * You can also filter nested fields. For example, you could specify
+   * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
+   * jobs connecting through the specific SSH tunnel bastion.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Sort the results based on the migration job name.
+   * Valid values are: "name", "name asc", and "name desc".
+   * 
+ * + * string order_by = 5; + * + * @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 the results based on the migration job name.
+   * Valid values are: "name", "name asc", and "name desc".
+   * 
+ * + * string order_by = 5; + * + * @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; + } + } + + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + 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.clouddms.v1.ListMigrationJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.ListMigrationJobsRequest other = + (com.google.cloud.clouddms.v1.ListMigrationJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) 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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsRequest 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.clouddms.v1.ListMigrationJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsRequest 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.clouddms.v1.ListMigrationJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsRequest 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.clouddms.v1.ListMigrationJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsRequest 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.clouddms.v1.ListMigrationJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsRequest 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.clouddms.v1.ListMigrationJobsRequest 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; + } + /** + * + * + *
+   * Retrieve a list of all migration jobs in a given project and location.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ListMigrationJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.ListMigrationJobsRequest) + com.google.cloud.clouddms.v1.ListMigrationJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ListMigrationJobsRequest.class, + com.google.cloud.clouddms.v1.ListMigrationJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.ListMigrationJobsRequest.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_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListMigrationJobsRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.ListMigrationJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListMigrationJobsRequest build() { + com.google.cloud.clouddms.v1.ListMigrationJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListMigrationJobsRequest buildPartial() { + com.google.cloud.clouddms.v1.ListMigrationJobsRequest result = + new com.google.cloud.clouddms.v1.ListMigrationJobsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + 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.clouddms.v1.ListMigrationJobsRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.ListMigrationJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.ListMigrationJobsRequest other) { + if (other == com.google.cloud.clouddms.v1.ListMigrationJobsRequest.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.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + 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.clouddms.v1.ListMigrationJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.ListMigrationJobsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of migrationJobs.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of migrationJobs.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of migrationJobs.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of migrationJobs.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of migrationJobs.
+     * 
+ * + * + * 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 migration jobs to return. The service may return
+     * fewer than this value. If unspecified, at most 50 migration jobs will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of migration jobs to return. The service may return
+     * fewer than this value. If unspecified, at most 50 migration jobs will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * 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 migration jobs to return. The service may return
+     * fewer than this value. If unspecified, at most 50 migration jobs will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The nextPageToken value received in the previous call to
+     * migrationJobs.list, used in the subsequent request to retrieve the next
+     * page of results. On first call this should be left blank. When paginating,
+     * all other parameters provided to migrationJobs.list must match the call
+     * that provided the page token.
+     * 
+ * + * 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 nextPageToken value received in the previous call to
+     * migrationJobs.list, used in the subsequent request to retrieve the next
+     * page of results. On first call this should be left blank. When paginating,
+     * all other parameters provided to migrationJobs.list must match the call
+     * that provided the page token.
+     * 
+ * + * 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 nextPageToken value received in the previous call to
+     * migrationJobs.list, used in the subsequent request to retrieve the next
+     * page of results. On first call this should be left blank. When paginating,
+     * all other parameters provided to migrationJobs.list must match the call
+     * that provided the page token.
+     * 
+ * + * 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 nextPageToken value received in the previous call to
+     * migrationJobs.list, used in the subsequent request to retrieve the next
+     * page of results. On first call this should be left blank. When paginating,
+     * all other parameters provided to migrationJobs.list must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The nextPageToken value received in the previous call to
+     * migrationJobs.list, used in the subsequent request to retrieve the next
+     * page of results. On first call this should be left blank. When paginating,
+     * all other parameters provided to migrationJobs.list must match the call
+     * that provided the page token.
+     * 
+ * + * 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 filter_ = ""; + /** + * + * + *
+     * A filter expression that filters migration jobs listed in the response.
+     * The expression must specify the field name, a comparison operator, and the
+     * value that you want to use for filtering. The value must be a string,
+     * a number, or a boolean. The comparison operator must be
+     * either =, !=, >, or <. For example, list migration jobs created this year
+     * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
+     * You can also filter nested fields. For example, you could specify
+     * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
+     * jobs connecting through the specific SSH tunnel bastion.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A filter expression that filters migration jobs listed in the response.
+     * The expression must specify the field name, a comparison operator, and the
+     * value that you want to use for filtering. The value must be a string,
+     * a number, or a boolean. The comparison operator must be
+     * either =, !=, >, or <. For example, list migration jobs created this year
+     * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
+     * You can also filter nested fields. For example, you could specify
+     * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
+     * jobs connecting through the specific SSH tunnel bastion.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A filter expression that filters migration jobs listed in the response.
+     * The expression must specify the field name, a comparison operator, and the
+     * value that you want to use for filtering. The value must be a string,
+     * a number, or a boolean. The comparison operator must be
+     * either =, !=, >, or <. For example, list migration jobs created this year
+     * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
+     * You can also filter nested fields. For example, you could specify
+     * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
+     * jobs connecting through the specific SSH tunnel bastion.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters migration jobs listed in the response.
+     * The expression must specify the field name, a comparison operator, and the
+     * value that you want to use for filtering. The value must be a string,
+     * a number, or a boolean. The comparison operator must be
+     * either =, !=, >, or <. For example, list migration jobs created this year
+     * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
+     * You can also filter nested fields. For example, you could specify
+     * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
+     * jobs connecting through the specific SSH tunnel bastion.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters migration jobs listed in the response.
+     * The expression must specify the field name, a comparison operator, and the
+     * value that you want to use for filtering. The value must be a string,
+     * a number, or a boolean. The comparison operator must be
+     * either =, !=, >, or <. For example, list migration jobs created this year
+     * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
+     * You can also filter nested fields. For example, you could specify
+     * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
+     * jobs connecting through the specific SSH tunnel bastion.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort the results based on the migration job name.
+     * Valid values are: "name", "name asc", and "name desc".
+     * 
+ * + * string order_by = 5; + * + * @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 the results based on the migration job name.
+     * Valid values are: "name", "name asc", and "name desc".
+     * 
+ * + * string order_by = 5; + * + * @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 the results based on the migration job name.
+     * Valid values are: "name", "name asc", and "name desc".
+     * 
+ * + * string order_by = 5; + * + * @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 the results based on the migration job name.
+     * Valid values are: "name", "name asc", and "name desc".
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort the results based on the migration job name.
+     * Valid values are: "name", "name asc", and "name desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + + @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.clouddms.v1.ListMigrationJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.ListMigrationJobsRequest) + private static final com.google.cloud.clouddms.v1.ListMigrationJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.ListMigrationJobsRequest(); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMigrationJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListMigrationJobsRequest(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.clouddms.v1.ListMigrationJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsRequestOrBuilder.java new file mode 100644 index 00000000..95bc7bfb --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsRequestOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface ListMigrationJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.ListMigrationJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of migrationJobs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of migrationJobs.
+   * 
+ * + * + * 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 migration jobs to return. The service may return
+   * fewer than this value. If unspecified, at most 50 migration jobs will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The nextPageToken value received in the previous call to
+   * migrationJobs.list, used in the subsequent request to retrieve the next
+   * page of results. On first call this should be left blank. When paginating,
+   * all other parameters provided to migrationJobs.list must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The nextPageToken value received in the previous call to
+   * migrationJobs.list, used in the subsequent request to retrieve the next
+   * page of results. On first call this should be left blank. When paginating,
+   * all other parameters provided to migrationJobs.list must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A filter expression that filters migration jobs listed in the response.
+   * The expression must specify the field name, a comparison operator, and the
+   * value that you want to use for filtering. The value must be a string,
+   * a number, or a boolean. The comparison operator must be
+   * either =, !=, >, or <. For example, list migration jobs created this year
+   * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
+   * You can also filter nested fields. For example, you could specify
+   * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
+   * jobs connecting through the specific SSH tunnel bastion.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * A filter expression that filters migration jobs listed in the response.
+   * The expression must specify the field name, a comparison operator, and the
+   * value that you want to use for filtering. The value must be a string,
+   * a number, or a boolean. The comparison operator must be
+   * either =, !=, >, or <. For example, list migration jobs created this year
+   * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
+   * You can also filter nested fields. For example, you could specify
+   * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
+   * jobs connecting through the specific SSH tunnel bastion.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results based on the migration job name.
+   * Valid values are: "name", "name asc", and "name desc".
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort the results based on the migration job name.
+   * Valid values are: "name", "name asc", and "name desc".
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsResponse.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsResponse.java new file mode 100644 index 00000000..223e06cb --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsResponse.java @@ -0,0 +1,1418 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Response message for 'ListMigrationJobs' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ListMigrationJobsResponse} + */ +public final class ListMigrationJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.ListMigrationJobsResponse) + ListMigrationJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListMigrationJobsResponse.newBuilder() to construct. + private ListMigrationJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListMigrationJobsResponse() { + migrationJobs_ = 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 ListMigrationJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListMigrationJobsResponse( + 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)) { + migrationJobs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + migrationJobs_.add( + input.readMessage( + com.google.cloud.clouddms.v1.MigrationJob.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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + migrationJobs_ = java.util.Collections.unmodifiableList(migrationJobs_); + } + 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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ListMigrationJobsResponse.class, + com.google.cloud.clouddms.v1.ListMigrationJobsResponse.Builder.class); + } + + public static final int MIGRATION_JOBS_FIELD_NUMBER = 1; + private java.util.List migrationJobs_; + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + @java.lang.Override + public java.util.List getMigrationJobsList() { + return migrationJobs_; + } + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + @java.lang.Override + public java.util.List + getMigrationJobsOrBuilderList() { + return migrationJobs_; + } + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + @java.lang.Override + public int getMigrationJobsCount() { + return migrationJobs_.size(); + } + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob getMigrationJobs(int index) { + return migrationJobs_.get(index); + } + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJobOrBuilder getMigrationJobsOrBuilder(int index) { + return migrationJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < migrationJobs_.size(); i++) { + output.writeMessage(1, migrationJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 < migrationJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, migrationJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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.clouddms.v1.ListMigrationJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.ListMigrationJobsResponse other = + (com.google.cloud.clouddms.v1.ListMigrationJobsResponse) obj; + + if (!getMigrationJobsList().equals(other.getMigrationJobsList())) 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 (getMigrationJobsCount() > 0) { + hash = (37 * hash) + MIGRATION_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getMigrationJobsList().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.clouddms.v1.ListMigrationJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsResponse 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.clouddms.v1.ListMigrationJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsResponse 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.clouddms.v1.ListMigrationJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsResponse 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.clouddms.v1.ListMigrationJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsResponse 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.clouddms.v1.ListMigrationJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsResponse 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.clouddms.v1.ListMigrationJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for 'ListMigrationJobs' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ListMigrationJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.ListMigrationJobsResponse) + com.google.cloud.clouddms.v1.ListMigrationJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ListMigrationJobsResponse.class, + com.google.cloud.clouddms.v1.ListMigrationJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.ListMigrationJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMigrationJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (migrationJobsBuilder_ == null) { + migrationJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + migrationJobsBuilder_.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ListMigrationJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListMigrationJobsResponse getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.ListMigrationJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListMigrationJobsResponse build() { + com.google.cloud.clouddms.v1.ListMigrationJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ListMigrationJobsResponse buildPartial() { + com.google.cloud.clouddms.v1.ListMigrationJobsResponse result = + new com.google.cloud.clouddms.v1.ListMigrationJobsResponse(this); + int from_bitField0_ = bitField0_; + if (migrationJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + migrationJobs_ = java.util.Collections.unmodifiableList(migrationJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.migrationJobs_ = migrationJobs_; + } else { + result.migrationJobs_ = migrationJobsBuilder_.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.clouddms.v1.ListMigrationJobsResponse) { + return mergeFrom((com.google.cloud.clouddms.v1.ListMigrationJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.ListMigrationJobsResponse other) { + if (other == com.google.cloud.clouddms.v1.ListMigrationJobsResponse.getDefaultInstance()) + return this; + if (migrationJobsBuilder_ == null) { + if (!other.migrationJobs_.isEmpty()) { + if (migrationJobs_.isEmpty()) { + migrationJobs_ = other.migrationJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMigrationJobsIsMutable(); + migrationJobs_.addAll(other.migrationJobs_); + } + onChanged(); + } + } else { + if (!other.migrationJobs_.isEmpty()) { + if (migrationJobsBuilder_.isEmpty()) { + migrationJobsBuilder_.dispose(); + migrationJobsBuilder_ = null; + migrationJobs_ = other.migrationJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + migrationJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMigrationJobsFieldBuilder() + : null; + } else { + migrationJobsBuilder_.addAllMessages(other.migrationJobs_); + } + } + } + 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.clouddms.v1.ListMigrationJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.ListMigrationJobsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List migrationJobs_ = + java.util.Collections.emptyList(); + + private void ensureMigrationJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + migrationJobs_ = + new java.util.ArrayList(migrationJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.clouddms.v1.MigrationJob, + com.google.cloud.clouddms.v1.MigrationJob.Builder, + com.google.cloud.clouddms.v1.MigrationJobOrBuilder> + migrationJobsBuilder_; + + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public java.util.List getMigrationJobsList() { + if (migrationJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(migrationJobs_); + } else { + return migrationJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public int getMigrationJobsCount() { + if (migrationJobsBuilder_ == null) { + return migrationJobs_.size(); + } else { + return migrationJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public com.google.cloud.clouddms.v1.MigrationJob getMigrationJobs(int index) { + if (migrationJobsBuilder_ == null) { + return migrationJobs_.get(index); + } else { + return migrationJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public Builder setMigrationJobs(int index, com.google.cloud.clouddms.v1.MigrationJob value) { + if (migrationJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrationJobsIsMutable(); + migrationJobs_.set(index, value); + onChanged(); + } else { + migrationJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public Builder setMigrationJobs( + int index, com.google.cloud.clouddms.v1.MigrationJob.Builder builderForValue) { + if (migrationJobsBuilder_ == null) { + ensureMigrationJobsIsMutable(); + migrationJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + migrationJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public Builder addMigrationJobs(com.google.cloud.clouddms.v1.MigrationJob value) { + if (migrationJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrationJobsIsMutable(); + migrationJobs_.add(value); + onChanged(); + } else { + migrationJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public Builder addMigrationJobs(int index, com.google.cloud.clouddms.v1.MigrationJob value) { + if (migrationJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMigrationJobsIsMutable(); + migrationJobs_.add(index, value); + onChanged(); + } else { + migrationJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public Builder addMigrationJobs( + com.google.cloud.clouddms.v1.MigrationJob.Builder builderForValue) { + if (migrationJobsBuilder_ == null) { + ensureMigrationJobsIsMutable(); + migrationJobs_.add(builderForValue.build()); + onChanged(); + } else { + migrationJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public Builder addMigrationJobs( + int index, com.google.cloud.clouddms.v1.MigrationJob.Builder builderForValue) { + if (migrationJobsBuilder_ == null) { + ensureMigrationJobsIsMutable(); + migrationJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + migrationJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public Builder addAllMigrationJobs( + java.lang.Iterable values) { + if (migrationJobsBuilder_ == null) { + ensureMigrationJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, migrationJobs_); + onChanged(); + } else { + migrationJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public Builder clearMigrationJobs() { + if (migrationJobsBuilder_ == null) { + migrationJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + migrationJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public Builder removeMigrationJobs(int index) { + if (migrationJobsBuilder_ == null) { + ensureMigrationJobsIsMutable(); + migrationJobs_.remove(index); + onChanged(); + } else { + migrationJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public com.google.cloud.clouddms.v1.MigrationJob.Builder getMigrationJobsBuilder(int index) { + return getMigrationJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public com.google.cloud.clouddms.v1.MigrationJobOrBuilder getMigrationJobsOrBuilder(int index) { + if (migrationJobsBuilder_ == null) { + return migrationJobs_.get(index); + } else { + return migrationJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public java.util.List + getMigrationJobsOrBuilderList() { + if (migrationJobsBuilder_ != null) { + return migrationJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(migrationJobs_); + } + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public com.google.cloud.clouddms.v1.MigrationJob.Builder addMigrationJobsBuilder() { + return getMigrationJobsFieldBuilder() + .addBuilder(com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance()); + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public com.google.cloud.clouddms.v1.MigrationJob.Builder addMigrationJobsBuilder(int index) { + return getMigrationJobsFieldBuilder() + .addBuilder(index, com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance()); + } + /** + * + * + *
+     * The list of migration jobs objects.
+     * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + public java.util.List + getMigrationJobsBuilderList() { + return getMigrationJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.clouddms.v1.MigrationJob, + com.google.cloud.clouddms.v1.MigrationJob.Builder, + com.google.cloud.clouddms.v1.MigrationJobOrBuilder> + getMigrationJobsFieldBuilder() { + if (migrationJobsBuilder_ == null) { + migrationJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.clouddms.v1.MigrationJob, + com.google.cloud.clouddms.v1.MigrationJob.Builder, + com.google.cloud.clouddms.v1.MigrationJobOrBuilder>( + migrationJobs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + migrationJobs_ = null; + } + return migrationJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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.clouddms.v1.ListMigrationJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.ListMigrationJobsResponse) + private static final com.google.cloud.clouddms.v1.ListMigrationJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.ListMigrationJobsResponse(); + } + + public static com.google.cloud.clouddms.v1.ListMigrationJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMigrationJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListMigrationJobsResponse(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.clouddms.v1.ListMigrationJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsResponseOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsResponseOrBuilder.java new file mode 100644 index 00000000..d9cf91e3 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ListMigrationJobsResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface ListMigrationJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.ListMigrationJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + java.util.List getMigrationJobsList(); + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + com.google.cloud.clouddms.v1.MigrationJob getMigrationJobs(int index); + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + int getMigrationJobsCount(); + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + java.util.List + getMigrationJobsOrBuilderList(); + /** + * + * + *
+   * The list of migration jobs objects.
+   * 
+ * + * repeated .google.cloud.clouddms.v1.MigrationJob migration_jobs = 1; + */ + com.google.cloud.clouddms.v1.MigrationJobOrBuilder getMigrationJobsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/LocationName.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/LocationName.java new file mode 100644 index 00000000..9c77d21e --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.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) { + project = locationName.project; + location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJob.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJob.java new file mode 100644 index 00000000..94736a47 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJob.java @@ -0,0 +1,6078 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Represents a Database Migration Service migration job object.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.MigrationJob} + */ +public final class MigrationJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.MigrationJob) + MigrationJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrationJob.newBuilder() to construct. + private MigrationJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrationJob() { + name_ = ""; + displayName_ = ""; + state_ = 0; + phase_ = 0; + type_ = 0; + dumpPath_ = ""; + source_ = ""; + destination_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrationJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigrationJob( + 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: + { + 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 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + 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 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 56: + { + int rawValue = input.readEnum(); + + phase_ = rawValue; + break; + } + case 64: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + dumpPath_ = s; + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + source_ = s; + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + destination_ = s; + break; + } + case 98: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (duration_ != null) { + subBuilder = duration_.toBuilder(); + } + duration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(duration_); + duration_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 114: + { + com.google.cloud.clouddms.v1.DatabaseType.Builder subBuilder = null; + if (sourceDatabase_ != null) { + subBuilder = sourceDatabase_.toBuilder(); + } + sourceDatabase_ = + input.readMessage( + com.google.cloud.clouddms.v1.DatabaseType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceDatabase_); + sourceDatabase_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + com.google.cloud.clouddms.v1.DatabaseType.Builder subBuilder = null; + if (destinationDatabase_ != null) { + subBuilder = destinationDatabase_.toBuilder(); + } + destinationDatabase_ = + input.readMessage( + com.google.cloud.clouddms.v1.DatabaseType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(destinationDatabase_); + destinationDatabase_ = subBuilder.buildPartial(); + } + + break; + } + case 130: + { + 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 810: + { + com.google.cloud.clouddms.v1.ReverseSshConnectivity.Builder subBuilder = null; + if (connectivityCase_ == 101) { + subBuilder = + ((com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_) + .toBuilder(); + } + connectivity_ = + input.readMessage( + com.google.cloud.clouddms.v1.ReverseSshConnectivity.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_); + connectivity_ = subBuilder.buildPartial(); + } + connectivityCase_ = 101; + break; + } + case 818: + { + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.Builder subBuilder = null; + if (connectivityCase_ == 102) { + subBuilder = + ((com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_) + .toBuilder(); + } + connectivity_ = + input.readMessage( + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_); + connectivity_ = subBuilder.buildPartial(); + } + connectivityCase_ = 102; + break; + } + case 826: + { + com.google.cloud.clouddms.v1.StaticIpConnectivity.Builder subBuilder = null; + if (connectivityCase_ == 103) { + subBuilder = + ((com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_).toBuilder(); + } + connectivity_ = + input.readMessage( + com.google.cloud.clouddms.v1.StaticIpConnectivity.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_); + connectivity_ = subBuilder.buildPartial(); + } + connectivityCase_ = 103; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + 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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.MigrationJob.class, + com.google.cloud.clouddms.v1.MigrationJob.Builder.class); + } + + /** + * + * + *
+   * The current migration job states.
+   * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.MigrationJob.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The state of the migration job is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The migration job is down for maintenance.
+     * 
+ * + * MAINTENANCE = 1; + */ + MAINTENANCE(1), + /** + * + * + *
+     * The migration job is in draft mode and no resources are created.
+     * 
+ * + * DRAFT = 2; + */ + DRAFT(2), + /** + * + * + *
+     * The migration job is being created.
+     * 
+ * + * CREATING = 3; + */ + CREATING(3), + /** + * + * + *
+     * The migration job is created, not started and is fully editable.
+     * 
+ * + * NOT_STARTED = 4; + */ + NOT_STARTED(4), + /** + * + * + *
+     * The migration job is running.
+     * 
+ * + * RUNNING = 5; + */ + RUNNING(5), + /** + * + * + *
+     * The migration job failed.
+     * 
+ * + * FAILED = 6; + */ + FAILED(6), + /** + * + * + *
+     * The migration job has been completed.
+     * 
+ * + * COMPLETED = 7; + */ + COMPLETED(7), + /** + * + * + *
+     * The migration job is being deleted.
+     * 
+ * + * DELETING = 8; + */ + DELETING(8), + /** + * + * + *
+     * The migration job is being stopped.
+     * 
+ * + * STOPPING = 9; + */ + STOPPING(9), + /** + * + * + *
+     * The migration job is currently stopped.
+     * 
+ * + * STOPPED = 10; + */ + STOPPED(10), + /** + * + * + *
+     * The migration job has been deleted.
+     * 
+ * + * DELETED = 11; + */ + DELETED(11), + /** + * + * + *
+     * The migration job is being updated.
+     * 
+ * + * UPDATING = 12; + */ + UPDATING(12), + /** + * + * + *
+     * The migration job is starting.
+     * 
+ * + * STARTING = 13; + */ + STARTING(13), + /** + * + * + *
+     * The migration job is restarting.
+     * 
+ * + * RESTARTING = 14; + */ + RESTARTING(14), + /** + * + * + *
+     * The migration job is resuming.
+     * 
+ * + * RESUMING = 15; + */ + RESUMING(15), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The state of the migration job is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The migration job is down for maintenance.
+     * 
+ * + * MAINTENANCE = 1; + */ + public static final int MAINTENANCE_VALUE = 1; + /** + * + * + *
+     * The migration job is in draft mode and no resources are created.
+     * 
+ * + * DRAFT = 2; + */ + public static final int DRAFT_VALUE = 2; + /** + * + * + *
+     * The migration job is being created.
+     * 
+ * + * CREATING = 3; + */ + public static final int CREATING_VALUE = 3; + /** + * + * + *
+     * The migration job is created, not started and is fully editable.
+     * 
+ * + * NOT_STARTED = 4; + */ + public static final int NOT_STARTED_VALUE = 4; + /** + * + * + *
+     * The migration job is running.
+     * 
+ * + * RUNNING = 5; + */ + public static final int RUNNING_VALUE = 5; + /** + * + * + *
+     * The migration job failed.
+     * 
+ * + * FAILED = 6; + */ + public static final int FAILED_VALUE = 6; + /** + * + * + *
+     * The migration job has been completed.
+     * 
+ * + * COMPLETED = 7; + */ + public static final int COMPLETED_VALUE = 7; + /** + * + * + *
+     * The migration job is being deleted.
+     * 
+ * + * DELETING = 8; + */ + public static final int DELETING_VALUE = 8; + /** + * + * + *
+     * The migration job is being stopped.
+     * 
+ * + * STOPPING = 9; + */ + public static final int STOPPING_VALUE = 9; + /** + * + * + *
+     * The migration job is currently stopped.
+     * 
+ * + * STOPPED = 10; + */ + public static final int STOPPED_VALUE = 10; + /** + * + * + *
+     * The migration job has been deleted.
+     * 
+ * + * DELETED = 11; + */ + public static final int DELETED_VALUE = 11; + /** + * + * + *
+     * The migration job is being updated.
+     * 
+ * + * UPDATING = 12; + */ + public static final int UPDATING_VALUE = 12; + /** + * + * + *
+     * The migration job is starting.
+     * 
+ * + * STARTING = 13; + */ + public static final int STARTING_VALUE = 13; + /** + * + * + *
+     * The migration job is restarting.
+     * 
+ * + * RESTARTING = 14; + */ + public static final int RESTARTING_VALUE = 14; + /** + * + * + *
+     * The migration job is resuming.
+     * 
+ * + * RESUMING = 15; + */ + public static final int RESUMING_VALUE = 15; + + 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 MAINTENANCE; + case 2: + return DRAFT; + case 3: + return CREATING; + case 4: + return NOT_STARTED; + case 5: + return RUNNING; + case 6: + return FAILED; + case 7: + return COMPLETED; + case 8: + return DELETING; + case 9: + return STOPPING; + case 10: + return STOPPED; + case 11: + return DELETED; + case 12: + return UPDATING; + case 13: + return STARTING; + case 14: + return RESTARTING; + case 15: + return RESUMING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.clouddms.v1.MigrationJob.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.clouddms.v1.MigrationJob.State) + } + + /** + * + * + *
+   * The current migration job phase.
+   * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.MigrationJob.Phase} + */ + public enum Phase implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The phase of the migration job is unknown.
+     * 
+ * + * PHASE_UNSPECIFIED = 0; + */ + PHASE_UNSPECIFIED(0), + /** + * + * + *
+     * The migration job is in the full dump phase.
+     * 
+ * + * FULL_DUMP = 1; + */ + FULL_DUMP(1), + /** + * + * + *
+     * The migration job is CDC phase.
+     * 
+ * + * CDC = 2; + */ + CDC(2), + /** + * + * + *
+     * The migration job is running the promote phase.
+     * 
+ * + * PROMOTE_IN_PROGRESS = 3; + */ + PROMOTE_IN_PROGRESS(3), + /** + * + * + *
+     * Only RDS flow - waiting for source writes to stop
+     * 
+ * + * WAITING_FOR_SOURCE_WRITES_TO_STOP = 4; + */ + WAITING_FOR_SOURCE_WRITES_TO_STOP(4), + /** + * + * + *
+     * Only RDS flow - the sources writes stopped, waiting for dump to begin
+     * 
+ * + * PREPARING_THE_DUMP = 5; + */ + PREPARING_THE_DUMP(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The phase of the migration job is unknown.
+     * 
+ * + * PHASE_UNSPECIFIED = 0; + */ + public static final int PHASE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The migration job is in the full dump phase.
+     * 
+ * + * FULL_DUMP = 1; + */ + public static final int FULL_DUMP_VALUE = 1; + /** + * + * + *
+     * The migration job is CDC phase.
+     * 
+ * + * CDC = 2; + */ + public static final int CDC_VALUE = 2; + /** + * + * + *
+     * The migration job is running the promote phase.
+     * 
+ * + * PROMOTE_IN_PROGRESS = 3; + */ + public static final int PROMOTE_IN_PROGRESS_VALUE = 3; + /** + * + * + *
+     * Only RDS flow - waiting for source writes to stop
+     * 
+ * + * WAITING_FOR_SOURCE_WRITES_TO_STOP = 4; + */ + public static final int WAITING_FOR_SOURCE_WRITES_TO_STOP_VALUE = 4; + /** + * + * + *
+     * Only RDS flow - the sources writes stopped, waiting for dump to begin
+     * 
+ * + * PREPARING_THE_DUMP = 5; + */ + public static final int PREPARING_THE_DUMP_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 Phase 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 Phase forNumber(int value) { + switch (value) { + case 0: + return PHASE_UNSPECIFIED; + case 1: + return FULL_DUMP; + case 2: + return CDC; + case 3: + return PROMOTE_IN_PROGRESS; + case 4: + return WAITING_FOR_SOURCE_WRITES_TO_STOP; + case 5: + return PREPARING_THE_DUMP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Phase findValueByNumber(int number) { + return Phase.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.clouddms.v1.MigrationJob.getDescriptor().getEnumTypes().get(1); + } + + private static final Phase[] VALUES = values(); + + public static Phase 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 Phase(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.clouddms.v1.MigrationJob.Phase) + } + + /** + * + * + *
+   * The type of migration job (one-time or continuous).
+   * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.MigrationJob.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The type of the migration job is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The migration job is a one time migration.
+     * 
+ * + * ONE_TIME = 1; + */ + ONE_TIME(1), + /** + * + * + *
+     * The migration job is a continuous migration.
+     * 
+ * + * CONTINUOUS = 2; + */ + CONTINUOUS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The type of the migration job is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The migration job is a one time migration.
+     * 
+ * + * ONE_TIME = 1; + */ + public static final int ONE_TIME_VALUE = 1; + /** + * + * + *
+     * The migration job is a continuous migration.
+     * 
+ * + * CONTINUOUS = 2; + */ + public static final int CONTINUOUS_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 Type 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 Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return ONE_TIME; + case 2: + return CONTINUOUS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.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.clouddms.v1.MigrationJob.getDescriptor().getEnumTypes().get(2); + } + + private static final Type[] VALUES = values(); + + public static Type 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 Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.clouddms.v1.MigrationJob.Type) + } + + private int connectivityCase_ = 0; + private java.lang.Object connectivity_; + + public enum ConnectivityCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REVERSE_SSH_CONNECTIVITY(101), + VPC_PEERING_CONNECTIVITY(102), + STATIC_IP_CONNECTIVITY(103), + CONNECTIVITY_NOT_SET(0); + private final int value; + + private ConnectivityCase(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 ConnectivityCase valueOf(int value) { + return forNumber(value); + } + + public static ConnectivityCase forNumber(int value) { + switch (value) { + case 101: + return REVERSE_SSH_CONNECTIVITY; + case 102: + return VPC_PEERING_CONNECTIVITY; + case 103: + return STATIC_IP_CONNECTIVITY; + case 0: + return CONNECTIVITY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConnectivityCase getConnectivityCase() { + return ConnectivityCase.forNumber(connectivityCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name (URI) of this migration job resource, in the form of:
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * 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 (URI) of this migration job resource, in the form of:
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * 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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the migration job resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the migration job resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJob_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The resource labels for migration job to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The resource labels for migration job to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The resource labels for migration job to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The resource labels for migration job to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The migration job display name.
+   * 
+ * + * string display_name = 5; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The migration job display name.
+   * 
+ * + * string display_name = 5; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_; + /** + * + * + *
+   * The current migration job state.
+   * 
+ * + * .google.cloud.clouddms.v1.MigrationJob.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The current migration job state.
+   * 
+ * + * .google.cloud.clouddms.v1.MigrationJob.State state = 6; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.MigrationJob.State result = + com.google.cloud.clouddms.v1.MigrationJob.State.valueOf(state_); + return result == null ? com.google.cloud.clouddms.v1.MigrationJob.State.UNRECOGNIZED : result; + } + + public static final int PHASE_FIELD_NUMBER = 7; + private int phase_; + /** + * + * + *
+   * Output only. The current migration job phase.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Phase phase = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for phase. + */ + @java.lang.Override + public int getPhaseValue() { + return phase_; + } + /** + * + * + *
+   * Output only. The current migration job phase.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Phase phase = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The phase. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob.Phase getPhase() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.MigrationJob.Phase result = + com.google.cloud.clouddms.v1.MigrationJob.Phase.valueOf(phase_); + return result == null ? com.google.cloud.clouddms.v1.MigrationJob.Phase.UNRECOGNIZED : result; + } + + public static final int TYPE_FIELD_NUMBER = 8; + private int type_; + /** + * + * + *
+   * Required. The migration job type.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. The migration job type.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.MigrationJob.Type result = + com.google.cloud.clouddms.v1.MigrationJob.Type.valueOf(type_); + return result == null ? com.google.cloud.clouddms.v1.MigrationJob.Type.UNRECOGNIZED : result; + } + + public static final int DUMP_PATH_FIELD_NUMBER = 9; + private volatile java.lang.Object dumpPath_; + /** + * + * + *
+   * The path to the dump file in Google Cloud Storage,
+   * in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
+   * 
+ * + * string dump_path = 9; + * + * @return The dumpPath. + */ + @java.lang.Override + public java.lang.String getDumpPath() { + java.lang.Object ref = dumpPath_; + 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(); + dumpPath_ = s; + return s; + } + } + /** + * + * + *
+   * The path to the dump file in Google Cloud Storage,
+   * in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
+   * 
+ * + * string dump_path = 9; + * + * @return The bytes for dumpPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDumpPathBytes() { + java.lang.Object ref = dumpPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dumpPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 10; + private volatile java.lang.Object source_; + /** + * + * + *
+   * Required. The resource name (URI) of the source connection profile.
+   * 
+ * + * string source = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object 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(); + source_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name (URI) of the source connection profile.
+   * 
+ * + * string source = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_FIELD_NUMBER = 11; + private volatile java.lang.Object destination_; + /** + * + * + *
+   * Required. The resource name (URI) of the destination connection profile.
+   * 
+ * + * string destination = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The destination. + */ + @java.lang.Override + public java.lang.String getDestination() { + java.lang.Object ref = destination_; + 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(); + destination_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name (URI) of the destination connection profile.
+   * 
+ * + * string destination = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for destination. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVERSE_SSH_CONNECTIVITY_FIELD_NUMBER = 101; + /** + * + * + *
+   * The details needed to communicate to the source over Reverse SSH
+   * tunnel connectivity.
+   * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + * + * @return Whether the reverseSshConnectivity field is set. + */ + @java.lang.Override + public boolean hasReverseSshConnectivity() { + return connectivityCase_ == 101; + } + /** + * + * + *
+   * The details needed to communicate to the source over Reverse SSH
+   * tunnel connectivity.
+   * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + * + * @return The reverseSshConnectivity. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ReverseSshConnectivity getReverseSshConnectivity() { + if (connectivityCase_ == 101) { + return (com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.ReverseSshConnectivity.getDefaultInstance(); + } + /** + * + * + *
+   * The details needed to communicate to the source over Reverse SSH
+   * tunnel connectivity.
+   * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ReverseSshConnectivityOrBuilder + getReverseSshConnectivityOrBuilder() { + if (connectivityCase_ == 101) { + return (com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.ReverseSshConnectivity.getDefaultInstance(); + } + + public static final int VPC_PEERING_CONNECTIVITY_FIELD_NUMBER = 102; + /** + * + * + *
+   * The details of the VPC network that the source database is located in.
+   * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + * + * @return Whether the vpcPeeringConnectivity field is set. + */ + @java.lang.Override + public boolean hasVpcPeeringConnectivity() { + return connectivityCase_ == 102; + } + /** + * + * + *
+   * The details of the VPC network that the source database is located in.
+   * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + * + * @return The vpcPeeringConnectivity. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VpcPeeringConnectivity getVpcPeeringConnectivity() { + if (connectivityCase_ == 102) { + return (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.VpcPeeringConnectivity.getDefaultInstance(); + } + /** + * + * + *
+   * The details of the VPC network that the source database is located in.
+   * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VpcPeeringConnectivityOrBuilder + getVpcPeeringConnectivityOrBuilder() { + if (connectivityCase_ == 102) { + return (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.VpcPeeringConnectivity.getDefaultInstance(); + } + + public static final int STATIC_IP_CONNECTIVITY_FIELD_NUMBER = 103; + /** + * + * + *
+   * static ip connectivity data (default, no additional details needed).
+   * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + * + * @return Whether the staticIpConnectivity field is set. + */ + @java.lang.Override + public boolean hasStaticIpConnectivity() { + return connectivityCase_ == 103; + } + /** + * + * + *
+   * static ip connectivity data (default, no additional details needed).
+   * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + * + * @return The staticIpConnectivity. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.StaticIpConnectivity getStaticIpConnectivity() { + if (connectivityCase_ == 103) { + return (com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.StaticIpConnectivity.getDefaultInstance(); + } + /** + * + * + *
+   * static ip connectivity data (default, no additional details needed).
+   * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.StaticIpConnectivityOrBuilder + getStaticIpConnectivityOrBuilder() { + if (connectivityCase_ == 103) { + return (com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.StaticIpConnectivity.getDefaultInstance(); + } + + public static final int DURATION_FIELD_NUMBER = 12; + private com.google.protobuf.Duration duration_; + /** + * + * + *
+   * Output only. The duration of the migration job (in seconds). A duration in seconds
+   * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+   * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the duration field is set. + */ + @java.lang.Override + public boolean hasDuration() { + return duration_ != null; + } + /** + * + * + *
+   * Output only. The duration of the migration job (in seconds). A duration in seconds
+   * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+   * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The duration. + */ + @java.lang.Override + public com.google.protobuf.Duration getDuration() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + /** + * + * + *
+   * Output only. The duration of the migration job (in seconds). A duration in seconds
+   * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+   * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + return getDuration(); + } + + public static final int ERROR_FIELD_NUMBER = 13; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int SOURCE_DATABASE_FIELD_NUMBER = 14; + private com.google.cloud.clouddms.v1.DatabaseType sourceDatabase_; + /** + * + * + *
+   * The database engine type and provider of the source.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + * + * @return Whether the sourceDatabase field is set. + */ + @java.lang.Override + public boolean hasSourceDatabase() { + return sourceDatabase_ != null; + } + /** + * + * + *
+   * The database engine type and provider of the source.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + * + * @return The sourceDatabase. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseType getSourceDatabase() { + return sourceDatabase_ == null + ? com.google.cloud.clouddms.v1.DatabaseType.getDefaultInstance() + : sourceDatabase_; + } + /** + * + * + *
+   * The database engine type and provider of the source.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder getSourceDatabaseOrBuilder() { + return getSourceDatabase(); + } + + public static final int DESTINATION_DATABASE_FIELD_NUMBER = 15; + private com.google.cloud.clouddms.v1.DatabaseType destinationDatabase_; + /** + * + * + *
+   * The database engine type and provider of the destination.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + * + * @return Whether the destinationDatabase field is set. + */ + @java.lang.Override + public boolean hasDestinationDatabase() { + return destinationDatabase_ != null; + } + /** + * + * + *
+   * The database engine type and provider of the destination.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + * + * @return The destinationDatabase. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseType getDestinationDatabase() { + return destinationDatabase_ == null + ? com.google.cloud.clouddms.v1.DatabaseType.getDefaultInstance() + : destinationDatabase_; + } + /** + * + * + *
+   * The database engine type and provider of the destination.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder getDestinationDatabaseOrBuilder() { + return getDestinationDatabase(); + } + + public static final int END_TIME_FIELD_NUMBER = 16; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. If the migration job is completed, the time when it was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. If the migration job is completed, the time when it was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.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. If the migration job is completed, the time when it was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); + } + if (state_ != com.google.cloud.clouddms.v1.MigrationJob.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, state_); + } + if (phase_ != com.google.cloud.clouddms.v1.MigrationJob.Phase.PHASE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, phase_); + } + if (type_ != com.google.cloud.clouddms.v1.MigrationJob.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(8, type_); + } + if (!getDumpPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, dumpPath_); + } + if (!getSourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, source_); + } + if (!getDestinationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, destination_); + } + if (duration_ != null) { + output.writeMessage(12, getDuration()); + } + if (error_ != null) { + output.writeMessage(13, getError()); + } + if (sourceDatabase_ != null) { + output.writeMessage(14, getSourceDatabase()); + } + if (destinationDatabase_ != null) { + output.writeMessage(15, getDestinationDatabase()); + } + if (endTime_ != null) { + output.writeMessage(16, getEndTime()); + } + if (connectivityCase_ == 101) { + output.writeMessage(101, (com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_); + } + if (connectivityCase_ == 102) { + output.writeMessage(102, (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_); + } + if (connectivityCase_ == 103) { + output.writeMessage(103, (com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + 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(4, labels__); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); + } + if (state_ != com.google.cloud.clouddms.v1.MigrationJob.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (phase_ != com.google.cloud.clouddms.v1.MigrationJob.Phase.PHASE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, phase_); + } + if (type_ != com.google.cloud.clouddms.v1.MigrationJob.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, type_); + } + if (!getDumpPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, dumpPath_); + } + if (!getSourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, source_); + } + if (!getDestinationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, destination_); + } + if (duration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDuration()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getError()); + } + if (sourceDatabase_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getSourceDatabase()); + } + if (destinationDatabase_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(15, getDestinationDatabase()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getEndTime()); + } + if (connectivityCase_ == 101) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 101, (com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_); + } + if (connectivityCase_ == 102) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 102, (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_); + } + if (connectivityCase_ == 103) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 103, (com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_); + } + 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.clouddms.v1.MigrationJob)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.MigrationJob other = + (com.google.cloud.clouddms.v1.MigrationJob) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (state_ != other.state_) return false; + if (phase_ != other.phase_) return false; + if (type_ != other.type_) return false; + if (!getDumpPath().equals(other.getDumpPath())) return false; + if (!getSource().equals(other.getSource())) return false; + if (!getDestination().equals(other.getDestination())) return false; + if (hasDuration() != other.hasDuration()) return false; + if (hasDuration()) { + if (!getDuration().equals(other.getDuration())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (hasSourceDatabase() != other.hasSourceDatabase()) return false; + if (hasSourceDatabase()) { + if (!getSourceDatabase().equals(other.getSourceDatabase())) return false; + } + if (hasDestinationDatabase() != other.hasDestinationDatabase()) return false; + if (hasDestinationDatabase()) { + if (!getDestinationDatabase().equals(other.getDestinationDatabase())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getConnectivityCase().equals(other.getConnectivityCase())) return false; + switch (connectivityCase_) { + case 101: + if (!getReverseSshConnectivity().equals(other.getReverseSshConnectivity())) return false; + break; + case 102: + if (!getVpcPeeringConnectivity().equals(other.getVpcPeeringConnectivity())) return false; + break; + case 103: + if (!getStaticIpConnectivity().equals(other.getStaticIpConnectivity())) 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(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + PHASE_FIELD_NUMBER; + hash = (53 * hash) + phase_; + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DUMP_PATH_FIELD_NUMBER; + hash = (53 * hash) + getDumpPath().hashCode(); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().hashCode(); + if (hasDuration()) { + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasSourceDatabase()) { + hash = (37 * hash) + SOURCE_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getSourceDatabase().hashCode(); + } + if (hasDestinationDatabase()) { + hash = (37 * hash) + DESTINATION_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDestinationDatabase().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + switch (connectivityCase_) { + case 101: + hash = (37 * hash) + REVERSE_SSH_CONNECTIVITY_FIELD_NUMBER; + hash = (53 * hash) + getReverseSshConnectivity().hashCode(); + break; + case 102: + hash = (37 * hash) + VPC_PEERING_CONNECTIVITY_FIELD_NUMBER; + hash = (53 * hash) + getVpcPeeringConnectivity().hashCode(); + break; + case 103: + hash = (37 * hash) + STATIC_IP_CONNECTIVITY_FIELD_NUMBER; + hash = (53 * hash) + getStaticIpConnectivity().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.MigrationJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.MigrationJob 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.clouddms.v1.MigrationJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.MigrationJob 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.clouddms.v1.MigrationJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.MigrationJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.MigrationJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.MigrationJob 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.clouddms.v1.MigrationJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.MigrationJob 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.clouddms.v1.MigrationJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.MigrationJob 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.clouddms.v1.MigrationJob 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 a Database Migration Service migration job object.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.MigrationJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.MigrationJob) + com.google.cloud.clouddms.v1.MigrationJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + 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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.MigrationJob.class, + com.google.cloud.clouddms.v1.MigrationJob.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.MigrationJob.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_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + displayName_ = ""; + + state_ = 0; + + phase_ = 0; + + type_ = 0; + + dumpPath_ = ""; + + source_ = ""; + + destination_ = ""; + + if (durationBuilder_ == null) { + duration_ = null; + } else { + duration_ = null; + durationBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (sourceDatabaseBuilder_ == null) { + sourceDatabase_ = null; + } else { + sourceDatabase_ = null; + sourceDatabaseBuilder_ = null; + } + if (destinationDatabaseBuilder_ == null) { + destinationDatabase_ = null; + } else { + destinationDatabase_ = null; + destinationDatabaseBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + connectivityCase_ = 0; + connectivity_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob build() { + com.google.cloud.clouddms.v1.MigrationJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob buildPartial() { + com.google.cloud.clouddms.v1.MigrationJob result = + new com.google.cloud.clouddms.v1.MigrationJob(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.displayName_ = displayName_; + result.state_ = state_; + result.phase_ = phase_; + result.type_ = type_; + result.dumpPath_ = dumpPath_; + result.source_ = source_; + result.destination_ = destination_; + if (connectivityCase_ == 101) { + if (reverseSshConnectivityBuilder_ == null) { + result.connectivity_ = connectivity_; + } else { + result.connectivity_ = reverseSshConnectivityBuilder_.build(); + } + } + if (connectivityCase_ == 102) { + if (vpcPeeringConnectivityBuilder_ == null) { + result.connectivity_ = connectivity_; + } else { + result.connectivity_ = vpcPeeringConnectivityBuilder_.build(); + } + } + if (connectivityCase_ == 103) { + if (staticIpConnectivityBuilder_ == null) { + result.connectivity_ = connectivity_; + } else { + result.connectivity_ = staticIpConnectivityBuilder_.build(); + } + } + if (durationBuilder_ == null) { + result.duration_ = duration_; + } else { + result.duration_ = durationBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (sourceDatabaseBuilder_ == null) { + result.sourceDatabase_ = sourceDatabase_; + } else { + result.sourceDatabase_ = sourceDatabaseBuilder_.build(); + } + if (destinationDatabaseBuilder_ == null) { + result.destinationDatabase_ = destinationDatabase_; + } else { + result.destinationDatabase_ = destinationDatabaseBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.connectivityCase_ = connectivityCase_; + 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.clouddms.v1.MigrationJob) { + return mergeFrom((com.google.cloud.clouddms.v1.MigrationJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.MigrationJob other) { + if (other == com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.phase_ != 0) { + setPhaseValue(other.getPhaseValue()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDumpPath().isEmpty()) { + dumpPath_ = other.dumpPath_; + onChanged(); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + onChanged(); + } + if (!other.getDestination().isEmpty()) { + destination_ = other.destination_; + onChanged(); + } + if (other.hasDuration()) { + mergeDuration(other.getDuration()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasSourceDatabase()) { + mergeSourceDatabase(other.getSourceDatabase()); + } + if (other.hasDestinationDatabase()) { + mergeDestinationDatabase(other.getDestinationDatabase()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + switch (other.getConnectivityCase()) { + case REVERSE_SSH_CONNECTIVITY: + { + mergeReverseSshConnectivity(other.getReverseSshConnectivity()); + break; + } + case VPC_PEERING_CONNECTIVITY: + { + mergeVpcPeeringConnectivity(other.getVpcPeeringConnectivity()); + break; + } + case STATIC_IP_CONNECTIVITY: + { + mergeStaticIpConnectivity(other.getStaticIpConnectivity()); + break; + } + case CONNECTIVITY_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.clouddms.v1.MigrationJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.MigrationJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int connectivityCase_ = 0; + private java.lang.Object connectivity_; + + public ConnectivityCase getConnectivityCase() { + return ConnectivityCase.forNumber(connectivityCase_); + } + + public Builder clearConnectivity() { + connectivityCase_ = 0; + connectivity_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name (URI) of this migration job resource, in the form of:
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * 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 (URI) of this migration job resource, in the form of:
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * 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 (URI) of this migration job resource, in the form of:
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * 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 (URI) of this migration job resource, in the form of:
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name (URI) of this migration job resource, in the form of:
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * 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 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 timestamp when the migration job resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the migration job resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the migration job resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the migration job resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the migration job resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the migration job resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the migration job resource was created.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp create_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> + 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 updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the migration job resource was last updated.
+     * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+     * Example: "2014-10-02T15:01:23.045123456Z".
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The resource labels for migration job to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The resource labels for migration job to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The resource labels for migration job to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The resource labels for migration job to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + 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; + } + /** + * + * + *
+     * The resource labels for migration job to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The resource labels for migration job to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The resource labels for migration job to use to annotate any related
+     * underlying resources such as Compute Engine VMs. An object containing a
+     * list of "key": "value" pairs.
+     * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The migration job display name.
+     * 
+ * + * string display_name = 5; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The migration job display name.
+     * 
+ * + * string display_name = 5; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The migration job display name.
+     * 
+ * + * string display_name = 5; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The migration job display name.
+     * 
+ * + * string display_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The migration job display name.
+     * 
+ * + * string display_name = 5; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The current migration job state.
+     * 
+ * + * .google.cloud.clouddms.v1.MigrationJob.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current migration job state.
+     * 
+ * + * .google.cloud.clouddms.v1.MigrationJob.State state = 6; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current migration job state.
+     * 
+ * + * .google.cloud.clouddms.v1.MigrationJob.State state = 6; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.MigrationJob.State result = + com.google.cloud.clouddms.v1.MigrationJob.State.valueOf(state_); + return result == null ? com.google.cloud.clouddms.v1.MigrationJob.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The current migration job state.
+     * 
+ * + * .google.cloud.clouddms.v1.MigrationJob.State state = 6; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.clouddms.v1.MigrationJob.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current migration job state.
+     * 
+ * + * .google.cloud.clouddms.v1.MigrationJob.State state = 6; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private int phase_ = 0; + /** + * + * + *
+     * Output only. The current migration job phase.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Phase phase = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for phase. + */ + @java.lang.Override + public int getPhaseValue() { + return phase_; + } + /** + * + * + *
+     * Output only. The current migration job phase.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Phase phase = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for phase to set. + * @return This builder for chaining. + */ + public Builder setPhaseValue(int value) { + + phase_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current migration job phase.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Phase phase = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The phase. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob.Phase getPhase() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.MigrationJob.Phase result = + com.google.cloud.clouddms.v1.MigrationJob.Phase.valueOf(phase_); + return result == null ? com.google.cloud.clouddms.v1.MigrationJob.Phase.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The current migration job phase.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Phase phase = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The phase to set. + * @return This builder for chaining. + */ + public Builder setPhase(com.google.cloud.clouddms.v1.MigrationJob.Phase value) { + if (value == null) { + throw new NullPointerException(); + } + + phase_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current migration job phase.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Phase phase = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPhase() { + + phase_ = 0; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. The migration job type.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. The migration job type.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The migration job type.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.MigrationJob.Type result = + com.google.cloud.clouddms.v1.MigrationJob.Type.valueOf(type_); + return result == null ? com.google.cloud.clouddms.v1.MigrationJob.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. The migration job type.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.clouddms.v1.MigrationJob.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The migration job type.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object dumpPath_ = ""; + /** + * + * + *
+     * The path to the dump file in Google Cloud Storage,
+     * in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
+     * 
+ * + * string dump_path = 9; + * + * @return The dumpPath. + */ + public java.lang.String getDumpPath() { + java.lang.Object ref = dumpPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dumpPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The path to the dump file in Google Cloud Storage,
+     * in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
+     * 
+ * + * string dump_path = 9; + * + * @return The bytes for dumpPath. + */ + public com.google.protobuf.ByteString getDumpPathBytes() { + java.lang.Object ref = dumpPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dumpPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The path to the dump file in Google Cloud Storage,
+     * in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
+     * 
+ * + * string dump_path = 9; + * + * @param value The dumpPath to set. + * @return This builder for chaining. + */ + public Builder setDumpPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dumpPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The path to the dump file in Google Cloud Storage,
+     * in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
+     * 
+ * + * string dump_path = 9; + * + * @return This builder for chaining. + */ + public Builder clearDumpPath() { + + dumpPath_ = getDefaultInstance().getDumpPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * The path to the dump file in Google Cloud Storage,
+     * in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
+     * 
+ * + * string dump_path = 9; + * + * @param value The bytes for dumpPath to set. + * @return This builder for chaining. + */ + public Builder setDumpPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dumpPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object source_ = ""; + /** + * + * + *
+     * Required. The resource name (URI) of the source connection profile.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name (URI) of the source connection profile.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name (URI) of the source connection profile.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name (URI) of the source connection profile.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name (URI) of the source connection profile.
+     * 
+ * + * string source = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + source_ = value; + onChanged(); + return this; + } + + private java.lang.Object destination_ = ""; + /** + * + * + *
+     * Required. The resource name (URI) of the destination connection profile.
+     * 
+ * + * string destination = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The destination. + */ + public java.lang.String getDestination() { + java.lang.Object ref = destination_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destination_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name (URI) of the destination connection profile.
+     * 
+ * + * string destination = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for destination. + */ + public com.google.protobuf.ByteString getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name (URI) of the destination connection profile.
+     * 
+ * + * string destination = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The destination to set. + * @return This builder for chaining. + */ + public Builder setDestination(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name (URI) of the destination connection profile.
+     * 
+ * + * string destination = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDestination() { + + destination_ = getDefaultInstance().getDestination(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name (URI) of the destination connection profile.
+     * 
+ * + * string destination = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for destination to set. + * @return This builder for chaining. + */ + public Builder setDestinationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destination_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.ReverseSshConnectivity, + com.google.cloud.clouddms.v1.ReverseSshConnectivity.Builder, + com.google.cloud.clouddms.v1.ReverseSshConnectivityOrBuilder> + reverseSshConnectivityBuilder_; + /** + * + * + *
+     * The details needed to communicate to the source over Reverse SSH
+     * tunnel connectivity.
+     * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + * + * @return Whether the reverseSshConnectivity field is set. + */ + @java.lang.Override + public boolean hasReverseSshConnectivity() { + return connectivityCase_ == 101; + } + /** + * + * + *
+     * The details needed to communicate to the source over Reverse SSH
+     * tunnel connectivity.
+     * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + * + * @return The reverseSshConnectivity. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ReverseSshConnectivity getReverseSshConnectivity() { + if (reverseSshConnectivityBuilder_ == null) { + if (connectivityCase_ == 101) { + return (com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.ReverseSshConnectivity.getDefaultInstance(); + } else { + if (connectivityCase_ == 101) { + return reverseSshConnectivityBuilder_.getMessage(); + } + return com.google.cloud.clouddms.v1.ReverseSshConnectivity.getDefaultInstance(); + } + } + /** + * + * + *
+     * The details needed to communicate to the source over Reverse SSH
+     * tunnel connectivity.
+     * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + */ + public Builder setReverseSshConnectivity( + com.google.cloud.clouddms.v1.ReverseSshConnectivity value) { + if (reverseSshConnectivityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectivity_ = value; + onChanged(); + } else { + reverseSshConnectivityBuilder_.setMessage(value); + } + connectivityCase_ = 101; + return this; + } + /** + * + * + *
+     * The details needed to communicate to the source over Reverse SSH
+     * tunnel connectivity.
+     * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + */ + public Builder setReverseSshConnectivity( + com.google.cloud.clouddms.v1.ReverseSshConnectivity.Builder builderForValue) { + if (reverseSshConnectivityBuilder_ == null) { + connectivity_ = builderForValue.build(); + onChanged(); + } else { + reverseSshConnectivityBuilder_.setMessage(builderForValue.build()); + } + connectivityCase_ = 101; + return this; + } + /** + * + * + *
+     * The details needed to communicate to the source over Reverse SSH
+     * tunnel connectivity.
+     * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + */ + public Builder mergeReverseSshConnectivity( + com.google.cloud.clouddms.v1.ReverseSshConnectivity value) { + if (reverseSshConnectivityBuilder_ == null) { + if (connectivityCase_ == 101 + && connectivity_ + != com.google.cloud.clouddms.v1.ReverseSshConnectivity.getDefaultInstance()) { + connectivity_ = + com.google.cloud.clouddms.v1.ReverseSshConnectivity.newBuilder( + (com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_) + .mergeFrom(value) + .buildPartial(); + } else { + connectivity_ = value; + } + onChanged(); + } else { + if (connectivityCase_ == 101) { + reverseSshConnectivityBuilder_.mergeFrom(value); + } + reverseSshConnectivityBuilder_.setMessage(value); + } + connectivityCase_ = 101; + return this; + } + /** + * + * + *
+     * The details needed to communicate to the source over Reverse SSH
+     * tunnel connectivity.
+     * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + */ + public Builder clearReverseSshConnectivity() { + if (reverseSshConnectivityBuilder_ == null) { + if (connectivityCase_ == 101) { + connectivityCase_ = 0; + connectivity_ = null; + onChanged(); + } + } else { + if (connectivityCase_ == 101) { + connectivityCase_ = 0; + connectivity_ = null; + } + reverseSshConnectivityBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The details needed to communicate to the source over Reverse SSH
+     * tunnel connectivity.
+     * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + */ + public com.google.cloud.clouddms.v1.ReverseSshConnectivity.Builder + getReverseSshConnectivityBuilder() { + return getReverseSshConnectivityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The details needed to communicate to the source over Reverse SSH
+     * tunnel connectivity.
+     * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ReverseSshConnectivityOrBuilder + getReverseSshConnectivityOrBuilder() { + if ((connectivityCase_ == 101) && (reverseSshConnectivityBuilder_ != null)) { + return reverseSshConnectivityBuilder_.getMessageOrBuilder(); + } else { + if (connectivityCase_ == 101) { + return (com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.ReverseSshConnectivity.getDefaultInstance(); + } + } + /** + * + * + *
+     * The details needed to communicate to the source over Reverse SSH
+     * tunnel connectivity.
+     * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.ReverseSshConnectivity, + com.google.cloud.clouddms.v1.ReverseSshConnectivity.Builder, + com.google.cloud.clouddms.v1.ReverseSshConnectivityOrBuilder> + getReverseSshConnectivityFieldBuilder() { + if (reverseSshConnectivityBuilder_ == null) { + if (!(connectivityCase_ == 101)) { + connectivity_ = com.google.cloud.clouddms.v1.ReverseSshConnectivity.getDefaultInstance(); + } + reverseSshConnectivityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.ReverseSshConnectivity, + com.google.cloud.clouddms.v1.ReverseSshConnectivity.Builder, + com.google.cloud.clouddms.v1.ReverseSshConnectivityOrBuilder>( + (com.google.cloud.clouddms.v1.ReverseSshConnectivity) connectivity_, + getParentForChildren(), + isClean()); + connectivity_ = null; + } + connectivityCase_ = 101; + onChanged(); + ; + return reverseSshConnectivityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.VpcPeeringConnectivity, + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.Builder, + com.google.cloud.clouddms.v1.VpcPeeringConnectivityOrBuilder> + vpcPeeringConnectivityBuilder_; + /** + * + * + *
+     * The details of the VPC network that the source database is located in.
+     * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + * + * @return Whether the vpcPeeringConnectivity field is set. + */ + @java.lang.Override + public boolean hasVpcPeeringConnectivity() { + return connectivityCase_ == 102; + } + /** + * + * + *
+     * The details of the VPC network that the source database is located in.
+     * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + * + * @return The vpcPeeringConnectivity. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VpcPeeringConnectivity getVpcPeeringConnectivity() { + if (vpcPeeringConnectivityBuilder_ == null) { + if (connectivityCase_ == 102) { + return (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.VpcPeeringConnectivity.getDefaultInstance(); + } else { + if (connectivityCase_ == 102) { + return vpcPeeringConnectivityBuilder_.getMessage(); + } + return com.google.cloud.clouddms.v1.VpcPeeringConnectivity.getDefaultInstance(); + } + } + /** + * + * + *
+     * The details of the VPC network that the source database is located in.
+     * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + */ + public Builder setVpcPeeringConnectivity( + com.google.cloud.clouddms.v1.VpcPeeringConnectivity value) { + if (vpcPeeringConnectivityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectivity_ = value; + onChanged(); + } else { + vpcPeeringConnectivityBuilder_.setMessage(value); + } + connectivityCase_ = 102; + return this; + } + /** + * + * + *
+     * The details of the VPC network that the source database is located in.
+     * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + */ + public Builder setVpcPeeringConnectivity( + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.Builder builderForValue) { + if (vpcPeeringConnectivityBuilder_ == null) { + connectivity_ = builderForValue.build(); + onChanged(); + } else { + vpcPeeringConnectivityBuilder_.setMessage(builderForValue.build()); + } + connectivityCase_ = 102; + return this; + } + /** + * + * + *
+     * The details of the VPC network that the source database is located in.
+     * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + */ + public Builder mergeVpcPeeringConnectivity( + com.google.cloud.clouddms.v1.VpcPeeringConnectivity value) { + if (vpcPeeringConnectivityBuilder_ == null) { + if (connectivityCase_ == 102 + && connectivity_ + != com.google.cloud.clouddms.v1.VpcPeeringConnectivity.getDefaultInstance()) { + connectivity_ = + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.newBuilder( + (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_) + .mergeFrom(value) + .buildPartial(); + } else { + connectivity_ = value; + } + onChanged(); + } else { + if (connectivityCase_ == 102) { + vpcPeeringConnectivityBuilder_.mergeFrom(value); + } + vpcPeeringConnectivityBuilder_.setMessage(value); + } + connectivityCase_ = 102; + return this; + } + /** + * + * + *
+     * The details of the VPC network that the source database is located in.
+     * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + */ + public Builder clearVpcPeeringConnectivity() { + if (vpcPeeringConnectivityBuilder_ == null) { + if (connectivityCase_ == 102) { + connectivityCase_ = 0; + connectivity_ = null; + onChanged(); + } + } else { + if (connectivityCase_ == 102) { + connectivityCase_ = 0; + connectivity_ = null; + } + vpcPeeringConnectivityBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The details of the VPC network that the source database is located in.
+     * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + */ + public com.google.cloud.clouddms.v1.VpcPeeringConnectivity.Builder + getVpcPeeringConnectivityBuilder() { + return getVpcPeeringConnectivityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The details of the VPC network that the source database is located in.
+     * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.VpcPeeringConnectivityOrBuilder + getVpcPeeringConnectivityOrBuilder() { + if ((connectivityCase_ == 102) && (vpcPeeringConnectivityBuilder_ != null)) { + return vpcPeeringConnectivityBuilder_.getMessageOrBuilder(); + } else { + if (connectivityCase_ == 102) { + return (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.VpcPeeringConnectivity.getDefaultInstance(); + } + } + /** + * + * + *
+     * The details of the VPC network that the source database is located in.
+     * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.VpcPeeringConnectivity, + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.Builder, + com.google.cloud.clouddms.v1.VpcPeeringConnectivityOrBuilder> + getVpcPeeringConnectivityFieldBuilder() { + if (vpcPeeringConnectivityBuilder_ == null) { + if (!(connectivityCase_ == 102)) { + connectivity_ = com.google.cloud.clouddms.v1.VpcPeeringConnectivity.getDefaultInstance(); + } + vpcPeeringConnectivityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.VpcPeeringConnectivity, + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.Builder, + com.google.cloud.clouddms.v1.VpcPeeringConnectivityOrBuilder>( + (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) connectivity_, + getParentForChildren(), + isClean()); + connectivity_ = null; + } + connectivityCase_ = 102; + onChanged(); + ; + return vpcPeeringConnectivityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.StaticIpConnectivity, + com.google.cloud.clouddms.v1.StaticIpConnectivity.Builder, + com.google.cloud.clouddms.v1.StaticIpConnectivityOrBuilder> + staticIpConnectivityBuilder_; + /** + * + * + *
+     * static ip connectivity data (default, no additional details needed).
+     * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + * + * @return Whether the staticIpConnectivity field is set. + */ + @java.lang.Override + public boolean hasStaticIpConnectivity() { + return connectivityCase_ == 103; + } + /** + * + * + *
+     * static ip connectivity data (default, no additional details needed).
+     * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + * + * @return The staticIpConnectivity. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.StaticIpConnectivity getStaticIpConnectivity() { + if (staticIpConnectivityBuilder_ == null) { + if (connectivityCase_ == 103) { + return (com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.StaticIpConnectivity.getDefaultInstance(); + } else { + if (connectivityCase_ == 103) { + return staticIpConnectivityBuilder_.getMessage(); + } + return com.google.cloud.clouddms.v1.StaticIpConnectivity.getDefaultInstance(); + } + } + /** + * + * + *
+     * static ip connectivity data (default, no additional details needed).
+     * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + */ + public Builder setStaticIpConnectivity( + com.google.cloud.clouddms.v1.StaticIpConnectivity value) { + if (staticIpConnectivityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectivity_ = value; + onChanged(); + } else { + staticIpConnectivityBuilder_.setMessage(value); + } + connectivityCase_ = 103; + return this; + } + /** + * + * + *
+     * static ip connectivity data (default, no additional details needed).
+     * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + */ + public Builder setStaticIpConnectivity( + com.google.cloud.clouddms.v1.StaticIpConnectivity.Builder builderForValue) { + if (staticIpConnectivityBuilder_ == null) { + connectivity_ = builderForValue.build(); + onChanged(); + } else { + staticIpConnectivityBuilder_.setMessage(builderForValue.build()); + } + connectivityCase_ = 103; + return this; + } + /** + * + * + *
+     * static ip connectivity data (default, no additional details needed).
+     * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + */ + public Builder mergeStaticIpConnectivity( + com.google.cloud.clouddms.v1.StaticIpConnectivity value) { + if (staticIpConnectivityBuilder_ == null) { + if (connectivityCase_ == 103 + && connectivity_ + != com.google.cloud.clouddms.v1.StaticIpConnectivity.getDefaultInstance()) { + connectivity_ = + com.google.cloud.clouddms.v1.StaticIpConnectivity.newBuilder( + (com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_) + .mergeFrom(value) + .buildPartial(); + } else { + connectivity_ = value; + } + onChanged(); + } else { + if (connectivityCase_ == 103) { + staticIpConnectivityBuilder_.mergeFrom(value); + } + staticIpConnectivityBuilder_.setMessage(value); + } + connectivityCase_ = 103; + return this; + } + /** + * + * + *
+     * static ip connectivity data (default, no additional details needed).
+     * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + */ + public Builder clearStaticIpConnectivity() { + if (staticIpConnectivityBuilder_ == null) { + if (connectivityCase_ == 103) { + connectivityCase_ = 0; + connectivity_ = null; + onChanged(); + } + } else { + if (connectivityCase_ == 103) { + connectivityCase_ = 0; + connectivity_ = null; + } + staticIpConnectivityBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * static ip connectivity data (default, no additional details needed).
+     * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + */ + public com.google.cloud.clouddms.v1.StaticIpConnectivity.Builder + getStaticIpConnectivityBuilder() { + return getStaticIpConnectivityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * static ip connectivity data (default, no additional details needed).
+     * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.StaticIpConnectivityOrBuilder + getStaticIpConnectivityOrBuilder() { + if ((connectivityCase_ == 103) && (staticIpConnectivityBuilder_ != null)) { + return staticIpConnectivityBuilder_.getMessageOrBuilder(); + } else { + if (connectivityCase_ == 103) { + return (com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_; + } + return com.google.cloud.clouddms.v1.StaticIpConnectivity.getDefaultInstance(); + } + } + /** + * + * + *
+     * static ip connectivity data (default, no additional details needed).
+     * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.StaticIpConnectivity, + com.google.cloud.clouddms.v1.StaticIpConnectivity.Builder, + com.google.cloud.clouddms.v1.StaticIpConnectivityOrBuilder> + getStaticIpConnectivityFieldBuilder() { + if (staticIpConnectivityBuilder_ == null) { + if (!(connectivityCase_ == 103)) { + connectivity_ = com.google.cloud.clouddms.v1.StaticIpConnectivity.getDefaultInstance(); + } + staticIpConnectivityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.StaticIpConnectivity, + com.google.cloud.clouddms.v1.StaticIpConnectivity.Builder, + com.google.cloud.clouddms.v1.StaticIpConnectivityOrBuilder>( + (com.google.cloud.clouddms.v1.StaticIpConnectivity) connectivity_, + getParentForChildren(), + isClean()); + connectivity_ = null; + } + connectivityCase_ = 103; + onChanged(); + ; + return staticIpConnectivityBuilder_; + } + + private com.google.protobuf.Duration duration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + durationBuilder_; + /** + * + * + *
+     * Output only. The duration of the migration job (in seconds). A duration in seconds
+     * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+     * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return durationBuilder_ != null || duration_ != null; + } + /** + * + * + *
+     * Output only. The duration of the migration job (in seconds). A duration in seconds
+     * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+     * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + if (durationBuilder_ == null) { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } else { + return durationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The duration of the migration job (in seconds). A duration in seconds
+     * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+     * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + duration_ = value; + onChanged(); + } else { + durationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The duration of the migration job (in seconds). A duration in seconds
+     * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+     * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (durationBuilder_ == null) { + duration_ = builderForValue.build(); + onChanged(); + } else { + durationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The duration of the migration job (in seconds). A duration in seconds
+     * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+     * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (duration_ != null) { + duration_ = + com.google.protobuf.Duration.newBuilder(duration_).mergeFrom(value).buildPartial(); + } else { + duration_ = value; + } + onChanged(); + } else { + durationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The duration of the migration job (in seconds). A duration in seconds
+     * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+     * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDuration() { + if (durationBuilder_ == null) { + duration_ = null; + onChanged(); + } else { + duration_ = null; + durationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The duration of the migration job (in seconds). A duration in seconds
+     * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+     * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Duration.Builder getDurationBuilder() { + + onChanged(); + return getDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The duration of the migration job (in seconds). A duration in seconds
+     * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+     * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + if (durationBuilder_ != null) { + return durationBuilder_.getMessageOrBuilder(); + } else { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + } + /** + * + * + *
+     * Output only. The duration of the migration job (in seconds). A duration in seconds
+     * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+     * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDurationFieldBuilder() { + if (durationBuilder_ == null) { + durationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDuration(), getParentForChildren(), isClean()); + duration_ = null; + } + return durationBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. The error details in case of state FAILED.
+     * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.cloud.clouddms.v1.DatabaseType sourceDatabase_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.DatabaseType, + com.google.cloud.clouddms.v1.DatabaseType.Builder, + com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder> + sourceDatabaseBuilder_; + /** + * + * + *
+     * The database engine type and provider of the source.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + * + * @return Whether the sourceDatabase field is set. + */ + public boolean hasSourceDatabase() { + return sourceDatabaseBuilder_ != null || sourceDatabase_ != null; + } + /** + * + * + *
+     * The database engine type and provider of the source.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + * + * @return The sourceDatabase. + */ + public com.google.cloud.clouddms.v1.DatabaseType getSourceDatabase() { + if (sourceDatabaseBuilder_ == null) { + return sourceDatabase_ == null + ? com.google.cloud.clouddms.v1.DatabaseType.getDefaultInstance() + : sourceDatabase_; + } else { + return sourceDatabaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The database engine type and provider of the source.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + */ + public Builder setSourceDatabase(com.google.cloud.clouddms.v1.DatabaseType value) { + if (sourceDatabaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceDatabase_ = value; + onChanged(); + } else { + sourceDatabaseBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The database engine type and provider of the source.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + */ + public Builder setSourceDatabase( + com.google.cloud.clouddms.v1.DatabaseType.Builder builderForValue) { + if (sourceDatabaseBuilder_ == null) { + sourceDatabase_ = builderForValue.build(); + onChanged(); + } else { + sourceDatabaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The database engine type and provider of the source.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + */ + public Builder mergeSourceDatabase(com.google.cloud.clouddms.v1.DatabaseType value) { + if (sourceDatabaseBuilder_ == null) { + if (sourceDatabase_ != null) { + sourceDatabase_ = + com.google.cloud.clouddms.v1.DatabaseType.newBuilder(sourceDatabase_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceDatabase_ = value; + } + onChanged(); + } else { + sourceDatabaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The database engine type and provider of the source.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + */ + public Builder clearSourceDatabase() { + if (sourceDatabaseBuilder_ == null) { + sourceDatabase_ = null; + onChanged(); + } else { + sourceDatabase_ = null; + sourceDatabaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The database engine type and provider of the source.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + */ + public com.google.cloud.clouddms.v1.DatabaseType.Builder getSourceDatabaseBuilder() { + + onChanged(); + return getSourceDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The database engine type and provider of the source.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + */ + public com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder getSourceDatabaseOrBuilder() { + if (sourceDatabaseBuilder_ != null) { + return sourceDatabaseBuilder_.getMessageOrBuilder(); + } else { + return sourceDatabase_ == null + ? com.google.cloud.clouddms.v1.DatabaseType.getDefaultInstance() + : sourceDatabase_; + } + } + /** + * + * + *
+     * The database engine type and provider of the source.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.DatabaseType, + com.google.cloud.clouddms.v1.DatabaseType.Builder, + com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder> + getSourceDatabaseFieldBuilder() { + if (sourceDatabaseBuilder_ == null) { + sourceDatabaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.DatabaseType, + com.google.cloud.clouddms.v1.DatabaseType.Builder, + com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder>( + getSourceDatabase(), getParentForChildren(), isClean()); + sourceDatabase_ = null; + } + return sourceDatabaseBuilder_; + } + + private com.google.cloud.clouddms.v1.DatabaseType destinationDatabase_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.DatabaseType, + com.google.cloud.clouddms.v1.DatabaseType.Builder, + com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder> + destinationDatabaseBuilder_; + /** + * + * + *
+     * The database engine type and provider of the destination.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + * + * @return Whether the destinationDatabase field is set. + */ + public boolean hasDestinationDatabase() { + return destinationDatabaseBuilder_ != null || destinationDatabase_ != null; + } + /** + * + * + *
+     * The database engine type and provider of the destination.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + * + * @return The destinationDatabase. + */ + public com.google.cloud.clouddms.v1.DatabaseType getDestinationDatabase() { + if (destinationDatabaseBuilder_ == null) { + return destinationDatabase_ == null + ? com.google.cloud.clouddms.v1.DatabaseType.getDefaultInstance() + : destinationDatabase_; + } else { + return destinationDatabaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The database engine type and provider of the destination.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + */ + public Builder setDestinationDatabase(com.google.cloud.clouddms.v1.DatabaseType value) { + if (destinationDatabaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destinationDatabase_ = value; + onChanged(); + } else { + destinationDatabaseBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The database engine type and provider of the destination.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + */ + public Builder setDestinationDatabase( + com.google.cloud.clouddms.v1.DatabaseType.Builder builderForValue) { + if (destinationDatabaseBuilder_ == null) { + destinationDatabase_ = builderForValue.build(); + onChanged(); + } else { + destinationDatabaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The database engine type and provider of the destination.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + */ + public Builder mergeDestinationDatabase(com.google.cloud.clouddms.v1.DatabaseType value) { + if (destinationDatabaseBuilder_ == null) { + if (destinationDatabase_ != null) { + destinationDatabase_ = + com.google.cloud.clouddms.v1.DatabaseType.newBuilder(destinationDatabase_) + .mergeFrom(value) + .buildPartial(); + } else { + destinationDatabase_ = value; + } + onChanged(); + } else { + destinationDatabaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The database engine type and provider of the destination.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + */ + public Builder clearDestinationDatabase() { + if (destinationDatabaseBuilder_ == null) { + destinationDatabase_ = null; + onChanged(); + } else { + destinationDatabase_ = null; + destinationDatabaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The database engine type and provider of the destination.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + */ + public com.google.cloud.clouddms.v1.DatabaseType.Builder getDestinationDatabaseBuilder() { + + onChanged(); + return getDestinationDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The database engine type and provider of the destination.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + */ + public com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder getDestinationDatabaseOrBuilder() { + if (destinationDatabaseBuilder_ != null) { + return destinationDatabaseBuilder_.getMessageOrBuilder(); + } else { + return destinationDatabase_ == null + ? com.google.cloud.clouddms.v1.DatabaseType.getDefaultInstance() + : destinationDatabase_; + } + } + /** + * + * + *
+     * The database engine type and provider of the destination.
+     * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.DatabaseType, + com.google.cloud.clouddms.v1.DatabaseType.Builder, + com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder> + getDestinationDatabaseFieldBuilder() { + if (destinationDatabaseBuilder_ == null) { + destinationDatabaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.DatabaseType, + com.google.cloud.clouddms.v1.DatabaseType.Builder, + com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder>( + getDestinationDatabase(), getParentForChildren(), isClean()); + destinationDatabase_ = null; + } + return destinationDatabaseBuilder_; + } + + 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. If the migration job is completed, the time when it was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. If the migration job is completed, the time when it was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.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. If the migration job is completed, the time when it was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.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. If the migration job is completed, the time when it was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.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. If the migration job is completed, the time when it was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.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. If the migration job is completed, the time when it was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. If the migration job is completed, the time when it was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. If the migration job is completed, the time when it was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.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. If the migration job is completed, the time when it was completed.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.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_; + } + + @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.clouddms.v1.MigrationJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.MigrationJob) + private static final com.google.cloud.clouddms.v1.MigrationJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.MigrationJob(); + } + + public static com.google.cloud.clouddms.v1.MigrationJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrationJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigrationJob(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.clouddms.v1.MigrationJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobName.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobName.java new file mode 100644 index 00000000..c235a08a --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobName.java @@ -0,0 +1,227 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.clouddms.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 MigrationJobName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_MIGRATION_JOB = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/migrationJobs/{migration_job}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String migrationJob; + + @Deprecated + protected MigrationJobName() { + project = null; + location = null; + migrationJob = null; + } + + private MigrationJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + migrationJob = Preconditions.checkNotNull(builder.getMigrationJob()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMigrationJob() { + return migrationJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MigrationJobName of(String project, String location, String migrationJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setMigrationJob(migrationJob) + .build(); + } + + public static String format(String project, String location, String migrationJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setMigrationJob(migrationJob) + .build() + .toString(); + } + + public static MigrationJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_MIGRATION_JOB.validatedMatch( + formattedString, "MigrationJobName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("migration_job")); + } + + 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 (MigrationJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_MIGRATION_JOB.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 (migrationJob != null) { + fieldMapBuilder.put("migration_job", migrationJob); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_MIGRATION_JOB.instantiate( + "project", project, "location", location, "migration_job", migrationJob); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + MigrationJobName that = ((MigrationJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.migrationJob, that.migrationJob); + } + 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(migrationJob); + return h; + } + + /** Builder for projects/{project}/locations/{location}/migrationJobs/{migration_job}. */ + public static class Builder { + private String project; + private String location; + private String migrationJob; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMigrationJob() { + return migrationJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setMigrationJob(String migrationJob) { + this.migrationJob = migrationJob; + return this; + } + + private Builder(MigrationJobName migrationJobName) { + project = migrationJobName.project; + location = migrationJobName.location; + migrationJob = migrationJobName.migrationJob; + } + + public MigrationJobName build() { + return new MigrationJobName(this); + } + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobOrBuilder.java new file mode 100644 index 00000000..a376a31d --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobOrBuilder.java @@ -0,0 +1,688 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface MigrationJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.MigrationJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name (URI) of this migration job resource, in the form of:
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name (URI) of this migration job resource, in the form of:
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was created.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when the migration job resource was last updated.
+   * A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
+   * Example: "2014-10-02T15:01:23.045123456Z".
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The resource labels for migration job to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * The resource labels for migration job to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The resource labels for migration job to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The resource labels for migration job to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The resource labels for migration job to use to annotate any related
+   * underlying resources such as Compute Engine VMs. An object containing a
+   * list of "key": "value" pairs.
+   * Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The migration job display name.
+   * 
+ * + * string display_name = 5; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The migration job display name.
+   * 
+ * + * string display_name = 5; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The current migration job state.
+   * 
+ * + * .google.cloud.clouddms.v1.MigrationJob.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The current migration job state.
+   * 
+ * + * .google.cloud.clouddms.v1.MigrationJob.State state = 6; + * + * @return The state. + */ + com.google.cloud.clouddms.v1.MigrationJob.State getState(); + + /** + * + * + *
+   * Output only. The current migration job phase.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Phase phase = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for phase. + */ + int getPhaseValue(); + /** + * + * + *
+   * Output only. The current migration job phase.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Phase phase = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The phase. + */ + com.google.cloud.clouddms.v1.MigrationJob.Phase getPhase(); + + /** + * + * + *
+   * Required. The migration job type.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. The migration job type.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.clouddms.v1.MigrationJob.Type getType(); + + /** + * + * + *
+   * The path to the dump file in Google Cloud Storage,
+   * in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
+   * 
+ * + * string dump_path = 9; + * + * @return The dumpPath. + */ + java.lang.String getDumpPath(); + /** + * + * + *
+   * The path to the dump file in Google Cloud Storage,
+   * in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
+   * 
+ * + * string dump_path = 9; + * + * @return The bytes for dumpPath. + */ + com.google.protobuf.ByteString getDumpPathBytes(); + + /** + * + * + *
+   * Required. The resource name (URI) of the source connection profile.
+   * 
+ * + * string source = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+   * Required. The resource name (URI) of the source connection profile.
+   * 
+ * + * string source = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+   * Required. The resource name (URI) of the destination connection profile.
+   * 
+ * + * string destination = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The destination. + */ + java.lang.String getDestination(); + /** + * + * + *
+   * Required. The resource name (URI) of the destination connection profile.
+   * 
+ * + * string destination = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for destination. + */ + com.google.protobuf.ByteString getDestinationBytes(); + + /** + * + * + *
+   * The details needed to communicate to the source over Reverse SSH
+   * tunnel connectivity.
+   * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + * + * @return Whether the reverseSshConnectivity field is set. + */ + boolean hasReverseSshConnectivity(); + /** + * + * + *
+   * The details needed to communicate to the source over Reverse SSH
+   * tunnel connectivity.
+   * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + * + * @return The reverseSshConnectivity. + */ + com.google.cloud.clouddms.v1.ReverseSshConnectivity getReverseSshConnectivity(); + /** + * + * + *
+   * The details needed to communicate to the source over Reverse SSH
+   * tunnel connectivity.
+   * 
+ * + * .google.cloud.clouddms.v1.ReverseSshConnectivity reverse_ssh_connectivity = 101; + */ + com.google.cloud.clouddms.v1.ReverseSshConnectivityOrBuilder getReverseSshConnectivityOrBuilder(); + + /** + * + * + *
+   * The details of the VPC network that the source database is located in.
+   * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + * + * @return Whether the vpcPeeringConnectivity field is set. + */ + boolean hasVpcPeeringConnectivity(); + /** + * + * + *
+   * The details of the VPC network that the source database is located in.
+   * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + * + * @return The vpcPeeringConnectivity. + */ + com.google.cloud.clouddms.v1.VpcPeeringConnectivity getVpcPeeringConnectivity(); + /** + * + * + *
+   * The details of the VPC network that the source database is located in.
+   * 
+ * + * .google.cloud.clouddms.v1.VpcPeeringConnectivity vpc_peering_connectivity = 102; + */ + com.google.cloud.clouddms.v1.VpcPeeringConnectivityOrBuilder getVpcPeeringConnectivityOrBuilder(); + + /** + * + * + *
+   * static ip connectivity data (default, no additional details needed).
+   * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + * + * @return Whether the staticIpConnectivity field is set. + */ + boolean hasStaticIpConnectivity(); + /** + * + * + *
+   * static ip connectivity data (default, no additional details needed).
+   * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + * + * @return The staticIpConnectivity. + */ + com.google.cloud.clouddms.v1.StaticIpConnectivity getStaticIpConnectivity(); + /** + * + * + *
+   * static ip connectivity data (default, no additional details needed).
+   * 
+ * + * .google.cloud.clouddms.v1.StaticIpConnectivity static_ip_connectivity = 103; + */ + com.google.cloud.clouddms.v1.StaticIpConnectivityOrBuilder getStaticIpConnectivityOrBuilder(); + + /** + * + * + *
+   * Output only. The duration of the migration job (in seconds). A duration in seconds
+   * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+   * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the duration field is set. + */ + boolean hasDuration(); + /** + * + * + *
+   * Output only. The duration of the migration job (in seconds). A duration in seconds
+   * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+   * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The duration. + */ + com.google.protobuf.Duration getDuration(); + /** + * + * + *
+   * Output only. The duration of the migration job (in seconds). A duration in seconds
+   * with up to nine fractional digits, terminated by 's'. Example: "3.5s".
+   * 
+ * + * .google.protobuf.Duration duration = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.DurationOrBuilder getDurationOrBuilder(); + + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. The error details in case of state FAILED.
+   * 
+ * + * .google.rpc.Status error = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * The database engine type and provider of the source.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + * + * @return Whether the sourceDatabase field is set. + */ + boolean hasSourceDatabase(); + /** + * + * + *
+   * The database engine type and provider of the source.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + * + * @return The sourceDatabase. + */ + com.google.cloud.clouddms.v1.DatabaseType getSourceDatabase(); + /** + * + * + *
+   * The database engine type and provider of the source.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType source_database = 14; + */ + com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder getSourceDatabaseOrBuilder(); + + /** + * + * + *
+   * The database engine type and provider of the destination.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + * + * @return Whether the destinationDatabase field is set. + */ + boolean hasDestinationDatabase(); + /** + * + * + *
+   * The database engine type and provider of the destination.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + * + * @return The destinationDatabase. + */ + com.google.cloud.clouddms.v1.DatabaseType getDestinationDatabase(); + /** + * + * + *
+   * The database engine type and provider of the destination.
+   * 
+ * + * .google.cloud.clouddms.v1.DatabaseType destination_database = 15; + */ + com.google.cloud.clouddms.v1.DatabaseTypeOrBuilder getDestinationDatabaseOrBuilder(); + + /** + * + * + *
+   * Output only. If the migration job is completed, the time when it was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. If the migration job is completed, the time when it was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. If the migration job is completed, the time when it was completed.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + public com.google.cloud.clouddms.v1.MigrationJob.ConnectivityCase getConnectivityCase(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobVerificationError.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobVerificationError.java new file mode 100644 index 00000000..c6366a75 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobVerificationError.java @@ -0,0 +1,1530 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Error message of a verification Migration job.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.MigrationJobVerificationError} + */ +public final class MigrationJobVerificationError extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.MigrationJobVerificationError) + MigrationJobVerificationErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use MigrationJobVerificationError.newBuilder() to construct. + private MigrationJobVerificationError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MigrationJobVerificationError() { + errorCode_ = 0; + errorMessage_ = ""; + errorDetailMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MigrationJobVerificationError(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MigrationJobVerificationError( + 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 8: + { + int rawValue = input.readEnum(); + + errorCode_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + errorMessage_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + errorDetailMessage_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.MigrationJobVerificationError.class, + com.google.cloud.clouddms.v1.MigrationJobVerificationError.Builder.class); + } + + /** + * + * + *
+   * A general error code describing the type of error that occurred.
+   * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode} + */ + public enum ErrorCode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * An unknown error occurred
+     * 
+ * + * ERROR_CODE_UNSPECIFIED = 0; + */ + ERROR_CODE_UNSPECIFIED(0), + /** + * + * + *
+     * We failed to connect to one of the connection profile.
+     * 
+ * + * CONNECTION_FAILURE = 1; + */ + CONNECTION_FAILURE(1), + /** + * + * + *
+     * We failed to authenticate to one of the connection profile.
+     * 
+ * + * AUTHENTICATION_FAILURE = 2; + */ + AUTHENTICATION_FAILURE(2), + /** + * + * + *
+     * One of the involved connection profiles has an invalid configuration.
+     * 
+ * + * INVALID_CONNECTION_PROFILE_CONFIG = 3; + */ + INVALID_CONNECTION_PROFILE_CONFIG(3), + /** + * + * + *
+     * The versions of the source and the destination are incompatible.
+     * 
+ * + * VERSION_INCOMPATIBILITY = 4; + */ + VERSION_INCOMPATIBILITY(4), + /** + * + * + *
+     * The types of the source and the destination are incompatible.
+     * 
+ * + * CONNECTION_PROFILE_TYPES_INCOMPATIBILITY = 5; + */ + CONNECTION_PROFILE_TYPES_INCOMPATIBILITY(5), + /** + * + * + *
+     * No pglogical extension installed on databases, applicable for postgres.
+     * 
+ * + * NO_PGLOGICAL_INSTALLED = 7; + */ + NO_PGLOGICAL_INSTALLED(7), + /** + * + * + *
+     * pglogical node already exists on databases, applicable for postgres.
+     * 
+ * + * PGLOGICAL_NODE_ALREADY_EXISTS = 8; + */ + PGLOGICAL_NODE_ALREADY_EXISTS(8), + /** + * + * + *
+     * The value of parameter wal_level is not set to logical.
+     * 
+ * + * INVALID_WAL_LEVEL = 9; + */ + INVALID_WAL_LEVEL(9), + /** + * + * + *
+     * The value of parameter shared_preload_libraries does not include
+     * pglogical.
+     * 
+ * + * INVALID_SHARED_PRELOAD_LIBRARY = 10; + */ + INVALID_SHARED_PRELOAD_LIBRARY(10), + /** + * + * + *
+     * The value of parameter max_replication_slots is not sufficient.
+     * 
+ * + * INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; + */ + INSUFFICIENT_MAX_REPLICATION_SLOTS(11), + /** + * + * + *
+     * The value of parameter max_wal_senders is not sufficient.
+     * 
+ * + * INSUFFICIENT_MAX_WAL_SENDERS = 12; + */ + INSUFFICIENT_MAX_WAL_SENDERS(12), + /** + * + * + *
+     * The value of parameter max_worker_processes is not sufficient.
+     * 
+ * + * INSUFFICIENT_MAX_WORKER_PROCESSES = 13; + */ + INSUFFICIENT_MAX_WORKER_PROCESSES(13), + /** + * + * + *
+     * Extensions installed are either not supported or having unsupported
+     * versions.
+     * 
+ * + * UNSUPPORTED_EXTENSIONS = 14; + */ + UNSUPPORTED_EXTENSIONS(14), + /** + * + * + *
+     * Unsupported migration type.
+     * 
+ * + * UNSUPPORTED_MIGRATION_TYPE = 15; + */ + UNSUPPORTED_MIGRATION_TYPE(15), + /** + * + * + *
+     * Invalid RDS logical replication.
+     * 
+ * + * INVALID_RDS_LOGICAL_REPLICATION = 16; + */ + INVALID_RDS_LOGICAL_REPLICATION(16), + /** + * + * + *
+     * The gtid_mode is not supported, applicable for MySQL.
+     * 
+ * + * UNSUPPORTED_GTID_MODE = 17; + */ + UNSUPPORTED_GTID_MODE(17), + /** + * + * + *
+     * The table definition is not support due to missing primary key or replica
+     * identity.
+     * 
+ * + * UNSUPPORTED_TABLE_DEFINITION = 18; + */ + UNSUPPORTED_TABLE_DEFINITION(18), + /** + * + * + *
+     * The definer is not supported.
+     * 
+ * + * UNSUPPORTED_DEFINER = 19; + */ + UNSUPPORTED_DEFINER(19), + /** + * + * + *
+     * Migration is already running at the time of restart request.
+     * 
+ * + * CANT_RESTART_RUNNING_MIGRATION = 21; + */ + CANT_RESTART_RUNNING_MIGRATION(21), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * An unknown error occurred
+     * 
+ * + * ERROR_CODE_UNSPECIFIED = 0; + */ + public static final int ERROR_CODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * We failed to connect to one of the connection profile.
+     * 
+ * + * CONNECTION_FAILURE = 1; + */ + public static final int CONNECTION_FAILURE_VALUE = 1; + /** + * + * + *
+     * We failed to authenticate to one of the connection profile.
+     * 
+ * + * AUTHENTICATION_FAILURE = 2; + */ + public static final int AUTHENTICATION_FAILURE_VALUE = 2; + /** + * + * + *
+     * One of the involved connection profiles has an invalid configuration.
+     * 
+ * + * INVALID_CONNECTION_PROFILE_CONFIG = 3; + */ + public static final int INVALID_CONNECTION_PROFILE_CONFIG_VALUE = 3; + /** + * + * + *
+     * The versions of the source and the destination are incompatible.
+     * 
+ * + * VERSION_INCOMPATIBILITY = 4; + */ + public static final int VERSION_INCOMPATIBILITY_VALUE = 4; + /** + * + * + *
+     * The types of the source and the destination are incompatible.
+     * 
+ * + * CONNECTION_PROFILE_TYPES_INCOMPATIBILITY = 5; + */ + public static final int CONNECTION_PROFILE_TYPES_INCOMPATIBILITY_VALUE = 5; + /** + * + * + *
+     * No pglogical extension installed on databases, applicable for postgres.
+     * 
+ * + * NO_PGLOGICAL_INSTALLED = 7; + */ + public static final int NO_PGLOGICAL_INSTALLED_VALUE = 7; + /** + * + * + *
+     * pglogical node already exists on databases, applicable for postgres.
+     * 
+ * + * PGLOGICAL_NODE_ALREADY_EXISTS = 8; + */ + public static final int PGLOGICAL_NODE_ALREADY_EXISTS_VALUE = 8; + /** + * + * + *
+     * The value of parameter wal_level is not set to logical.
+     * 
+ * + * INVALID_WAL_LEVEL = 9; + */ + public static final int INVALID_WAL_LEVEL_VALUE = 9; + /** + * + * + *
+     * The value of parameter shared_preload_libraries does not include
+     * pglogical.
+     * 
+ * + * INVALID_SHARED_PRELOAD_LIBRARY = 10; + */ + public static final int INVALID_SHARED_PRELOAD_LIBRARY_VALUE = 10; + /** + * + * + *
+     * The value of parameter max_replication_slots is not sufficient.
+     * 
+ * + * INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; + */ + public static final int INSUFFICIENT_MAX_REPLICATION_SLOTS_VALUE = 11; + /** + * + * + *
+     * The value of parameter max_wal_senders is not sufficient.
+     * 
+ * + * INSUFFICIENT_MAX_WAL_SENDERS = 12; + */ + public static final int INSUFFICIENT_MAX_WAL_SENDERS_VALUE = 12; + /** + * + * + *
+     * The value of parameter max_worker_processes is not sufficient.
+     * 
+ * + * INSUFFICIENT_MAX_WORKER_PROCESSES = 13; + */ + public static final int INSUFFICIENT_MAX_WORKER_PROCESSES_VALUE = 13; + /** + * + * + *
+     * Extensions installed are either not supported or having unsupported
+     * versions.
+     * 
+ * + * UNSUPPORTED_EXTENSIONS = 14; + */ + public static final int UNSUPPORTED_EXTENSIONS_VALUE = 14; + /** + * + * + *
+     * Unsupported migration type.
+     * 
+ * + * UNSUPPORTED_MIGRATION_TYPE = 15; + */ + public static final int UNSUPPORTED_MIGRATION_TYPE_VALUE = 15; + /** + * + * + *
+     * Invalid RDS logical replication.
+     * 
+ * + * INVALID_RDS_LOGICAL_REPLICATION = 16; + */ + public static final int INVALID_RDS_LOGICAL_REPLICATION_VALUE = 16; + /** + * + * + *
+     * The gtid_mode is not supported, applicable for MySQL.
+     * 
+ * + * UNSUPPORTED_GTID_MODE = 17; + */ + public static final int UNSUPPORTED_GTID_MODE_VALUE = 17; + /** + * + * + *
+     * The table definition is not support due to missing primary key or replica
+     * identity.
+     * 
+ * + * UNSUPPORTED_TABLE_DEFINITION = 18; + */ + public static final int UNSUPPORTED_TABLE_DEFINITION_VALUE = 18; + /** + * + * + *
+     * The definer is not supported.
+     * 
+ * + * UNSUPPORTED_DEFINER = 19; + */ + public static final int UNSUPPORTED_DEFINER_VALUE = 19; + /** + * + * + *
+     * Migration is already running at the time of restart request.
+     * 
+ * + * CANT_RESTART_RUNNING_MIGRATION = 21; + */ + public static final int CANT_RESTART_RUNNING_MIGRATION_VALUE = 21; + + 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 ErrorCode 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 ErrorCode forNumber(int value) { + switch (value) { + case 0: + return ERROR_CODE_UNSPECIFIED; + case 1: + return CONNECTION_FAILURE; + case 2: + return AUTHENTICATION_FAILURE; + case 3: + return INVALID_CONNECTION_PROFILE_CONFIG; + case 4: + return VERSION_INCOMPATIBILITY; + case 5: + return CONNECTION_PROFILE_TYPES_INCOMPATIBILITY; + case 7: + return NO_PGLOGICAL_INSTALLED; + case 8: + return PGLOGICAL_NODE_ALREADY_EXISTS; + case 9: + return INVALID_WAL_LEVEL; + case 10: + return INVALID_SHARED_PRELOAD_LIBRARY; + case 11: + return INSUFFICIENT_MAX_REPLICATION_SLOTS; + case 12: + return INSUFFICIENT_MAX_WAL_SENDERS; + case 13: + return INSUFFICIENT_MAX_WORKER_PROCESSES; + case 14: + return UNSUPPORTED_EXTENSIONS; + case 15: + return UNSUPPORTED_MIGRATION_TYPE; + case 16: + return INVALID_RDS_LOGICAL_REPLICATION; + case 17: + return UNSUPPORTED_GTID_MODE; + case 18: + return UNSUPPORTED_TABLE_DEFINITION; + case 19: + return UNSUPPORTED_DEFINER; + case 21: + return CANT_RESTART_RUNNING_MIGRATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ErrorCode findValueByNumber(int number) { + return ErrorCode.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.clouddms.v1.MigrationJobVerificationError.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ErrorCode[] VALUES = values(); + + public static ErrorCode 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 ErrorCode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode) + } + + public static final int ERROR_CODE_FIELD_NUMBER = 1; + private int errorCode_; + /** + * + * + *
+   * Output only. An instance of ErrorCode specifying the error that occurred.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode error_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+   * Output only. An instance of ErrorCode specifying the error that occurred.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode error_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode getErrorCode() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode result = + com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode.valueOf(errorCode_); + return result == null + ? com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode.UNRECOGNIZED + : result; + } + + public static final int ERROR_MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object errorMessage_; + /** + * + * + *
+   * Output only. A formatted message with further details about the error and a CTA.
+   * 
+ * + * string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorMessage. + */ + @java.lang.Override + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + 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(); + errorMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. A formatted message with further details about the error and a CTA.
+   * 
+ * + * string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_DETAIL_MESSAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object errorDetailMessage_; + /** + * + * + *
+   * Output only. A specific detailed error message, if supplied by the engine.
+   * 
+ * + * string error_detail_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorDetailMessage. + */ + @java.lang.Override + public java.lang.String getErrorDetailMessage() { + java.lang.Object ref = errorDetailMessage_; + 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(); + errorDetailMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. A specific detailed error message, if supplied by the engine.
+   * 
+ * + * string error_detail_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorDetailMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorDetailMessageBytes() { + java.lang.Object ref = errorDetailMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorDetailMessage_ = 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 (errorCode_ + != com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode + .ERROR_CODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, errorCode_); + } + if (!getErrorMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_); + } + if (!getErrorDetailMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, errorDetailMessage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (errorCode_ + != com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode + .ERROR_CODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, errorCode_); + } + if (!getErrorMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_); + } + if (!getErrorDetailMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, errorDetailMessage_); + } + 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.clouddms.v1.MigrationJobVerificationError)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.MigrationJobVerificationError other = + (com.google.cloud.clouddms.v1.MigrationJobVerificationError) obj; + + if (errorCode_ != other.errorCode_) return false; + if (!getErrorMessage().equals(other.getErrorMessage())) return false; + if (!getErrorDetailMessage().equals(other.getErrorDetailMessage())) 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) + ERROR_CODE_FIELD_NUMBER; + hash = (53 * hash) + errorCode_; + hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getErrorMessage().hashCode(); + hash = (37 * hash) + ERROR_DETAIL_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getErrorDetailMessage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.MigrationJobVerificationError parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.MigrationJobVerificationError 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.clouddms.v1.MigrationJobVerificationError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.MigrationJobVerificationError 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.clouddms.v1.MigrationJobVerificationError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.MigrationJobVerificationError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.MigrationJobVerificationError parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.MigrationJobVerificationError 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.clouddms.v1.MigrationJobVerificationError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.MigrationJobVerificationError 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.clouddms.v1.MigrationJobVerificationError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.MigrationJobVerificationError 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.clouddms.v1.MigrationJobVerificationError 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; + } + /** + * + * + *
+   * Error message of a verification Migration job.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.MigrationJobVerificationError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.MigrationJobVerificationError) + com.google.cloud.clouddms.v1.MigrationJobVerificationErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.MigrationJobVerificationError.class, + com.google.cloud.clouddms.v1.MigrationJobVerificationError.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.MigrationJobVerificationError.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(); + errorCode_ = 0; + + errorMessage_ = ""; + + errorDetailMessage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MigrationJobVerificationError_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJobVerificationError getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.MigrationJobVerificationError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJobVerificationError build() { + com.google.cloud.clouddms.v1.MigrationJobVerificationError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJobVerificationError buildPartial() { + com.google.cloud.clouddms.v1.MigrationJobVerificationError result = + new com.google.cloud.clouddms.v1.MigrationJobVerificationError(this); + result.errorCode_ = errorCode_; + result.errorMessage_ = errorMessage_; + result.errorDetailMessage_ = errorDetailMessage_; + 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.clouddms.v1.MigrationJobVerificationError) { + return mergeFrom((com.google.cloud.clouddms.v1.MigrationJobVerificationError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.MigrationJobVerificationError other) { + if (other == com.google.cloud.clouddms.v1.MigrationJobVerificationError.getDefaultInstance()) + return this; + if (other.errorCode_ != 0) { + setErrorCodeValue(other.getErrorCodeValue()); + } + if (!other.getErrorMessage().isEmpty()) { + errorMessage_ = other.errorMessage_; + onChanged(); + } + if (!other.getErrorDetailMessage().isEmpty()) { + errorDetailMessage_ = other.errorDetailMessage_; + 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.clouddms.v1.MigrationJobVerificationError parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.MigrationJobVerificationError) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int errorCode_ = 0; + /** + * + * + *
+     * Output only. An instance of ErrorCode specifying the error that occurred.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode error_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+     * Output only. An instance of ErrorCode specifying the error that occurred.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode error_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCodeValue(int value) { + + errorCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An instance of ErrorCode specifying the error that occurred.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode error_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode getErrorCode() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode result = + com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode.valueOf(errorCode_); + return result == null + ? com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. An instance of ErrorCode specifying the error that occurred.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode error_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCode( + com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode value) { + if (value == null) { + throw new NullPointerException(); + } + + errorCode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An instance of ErrorCode specifying the error that occurred.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode error_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearErrorCode() { + + errorCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object errorMessage_ = ""; + /** + * + * + *
+     * Output only. A formatted message with further details about the error and a CTA.
+     * 
+ * + * string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorMessage. + */ + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. A formatted message with further details about the error and a CTA.
+     * 
+ * + * string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorMessage. + */ + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. A formatted message with further details about the error and a CTA.
+     * 
+ * + * string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + errorMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A formatted message with further details about the error and a CTA.
+     * 
+ * + * string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearErrorMessage() { + + errorMessage_ = getDefaultInstance().getErrorMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A formatted message with further details about the error and a CTA.
+     * 
+ * + * string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + errorMessage_ = value; + onChanged(); + return this; + } + + private java.lang.Object errorDetailMessage_ = ""; + /** + * + * + *
+     * Output only. A specific detailed error message, if supplied by the engine.
+     * 
+ * + * string error_detail_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorDetailMessage. + */ + public java.lang.String getErrorDetailMessage() { + java.lang.Object ref = errorDetailMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorDetailMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. A specific detailed error message, if supplied by the engine.
+     * 
+ * + * string error_detail_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorDetailMessage. + */ + public com.google.protobuf.ByteString getErrorDetailMessageBytes() { + java.lang.Object ref = errorDetailMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorDetailMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. A specific detailed error message, if supplied by the engine.
+     * 
+ * + * string error_detail_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The errorDetailMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorDetailMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + errorDetailMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A specific detailed error message, if supplied by the engine.
+     * 
+ * + * string error_detail_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearErrorDetailMessage() { + + errorDetailMessage_ = getDefaultInstance().getErrorDetailMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A specific detailed error message, if supplied by the engine.
+     * 
+ * + * string error_detail_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for errorDetailMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorDetailMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + errorDetailMessage_ = 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.clouddms.v1.MigrationJobVerificationError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.MigrationJobVerificationError) + private static final com.google.cloud.clouddms.v1.MigrationJobVerificationError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.MigrationJobVerificationError(); + } + + public static com.google.cloud.clouddms.v1.MigrationJobVerificationError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MigrationJobVerificationError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MigrationJobVerificationError(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.clouddms.v1.MigrationJobVerificationError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobVerificationErrorOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobVerificationErrorOrBuilder.java new file mode 100644 index 00000000..d82156b7 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MigrationJobVerificationErrorOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface MigrationJobVerificationErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.MigrationJobVerificationError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. An instance of ErrorCode specifying the error that occurred.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode error_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for errorCode. + */ + int getErrorCodeValue(); + /** + * + * + *
+   * Output only. An instance of ErrorCode specifying the error that occurred.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode error_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The errorCode. + */ + com.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode getErrorCode(); + + /** + * + * + *
+   * Output only. A formatted message with further details about the error and a CTA.
+   * 
+ * + * string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorMessage. + */ + java.lang.String getErrorMessage(); + /** + * + * + *
+   * Output only. A formatted message with further details about the error and a CTA.
+   * 
+ * + * string error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorMessage. + */ + com.google.protobuf.ByteString getErrorMessageBytes(); + + /** + * + * + *
+   * Output only. A specific detailed error message, if supplied by the engine.
+   * 
+ * + * string error_detail_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorDetailMessage. + */ + java.lang.String getErrorDetailMessage(); + /** + * + * + *
+   * Output only. A specific detailed error message, if supplied by the engine.
+   * 
+ * + * string error_detail_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorDetailMessage. + */ + com.google.protobuf.ByteString getErrorDetailMessageBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MySqlConnectionProfile.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MySqlConnectionProfile.java new file mode 100644 index 00000000..1ba3c9ed --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MySqlConnectionProfile.java @@ -0,0 +1,1666 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Specifies connection parameters required specifically for MySQL databases.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.MySqlConnectionProfile} + */ +public final class MySqlConnectionProfile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.MySqlConnectionProfile) + MySqlConnectionProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use MySqlConnectionProfile.newBuilder() to construct. + private MySqlConnectionProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MySqlConnectionProfile() { + host_ = ""; + username_ = ""; + password_ = ""; + cloudSqlId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MySqlConnectionProfile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MySqlConnectionProfile( + 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(); + + host_ = s; + break; + } + case 16: + { + port_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + username_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + password_ = s; + break; + } + case 40: + { + passwordSet_ = input.readBool(); + break; + } + case 50: + { + com.google.cloud.clouddms.v1.SslConfig.Builder subBuilder = null; + if (ssl_ != null) { + subBuilder = ssl_.toBuilder(); + } + ssl_ = + input.readMessage( + com.google.cloud.clouddms.v1.SslConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(ssl_); + ssl_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + cloudSqlId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.MySqlConnectionProfile.class, + com.google.cloud.clouddms.v1.MySqlConnectionProfile.Builder.class); + } + + public static final int HOST_FIELD_NUMBER = 1; + private volatile java.lang.Object host_; + /** + * + * + *
+   * Required. The IP or hostname of the source MySQL database.
+   * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + 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(); + host_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The IP or hostname of the source MySQL database.
+   * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_; + /** + * + * + *
+   * Required. The network port of the source MySQL database.
+   * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + private volatile java.lang.Object username_; + /** + * + * + *
+   * Required. The username that Database Migration Service will use to connect to the
+   * database. The value is encrypted when stored in Database Migration Service.
+   * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + 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(); + username_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The username that Database Migration Service will use to connect to the
+   * database. The value is encrypted when stored in Database Migration Service.
+   * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_FIELD_NUMBER = 4; + private volatile java.lang.Object password_; + /** + * + * + *
+   * Required. Input only. The password for the user that Database Migration Service will be using to
+   * connect to the database. This field is not returned on request, and the
+   * value is encrypted when stored in Database Migration Service.
+   * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + 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(); + password_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Input only. The password for the user that Database Migration Service will be using to
+   * connect to the database. This field is not returned on request, and the
+   * value is encrypted when stored in Database Migration Service.
+   * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_SET_FIELD_NUMBER = 5; + private boolean passwordSet_; + /** + * + * + *
+   * Output only. Indicates If this connection profile password is stored.
+   * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The passwordSet. + */ + @java.lang.Override + public boolean getPasswordSet() { + return passwordSet_; + } + + public static final int SSL_FIELD_NUMBER = 6; + private com.google.cloud.clouddms.v1.SslConfig ssl_; + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return Whether the ssl field is set. + */ + @java.lang.Override + public boolean hasSsl() { + return ssl_ != null; + } + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return The ssl. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SslConfig getSsl() { + return ssl_ == null ? com.google.cloud.clouddms.v1.SslConfig.getDefaultInstance() : ssl_; + } + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SslConfigOrBuilder getSslOrBuilder() { + return getSsl(); + } + + public static final int CLOUD_SQL_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object cloudSqlId_; + /** + * + * + *
+   * If the source is a Cloud SQL database, use this field to
+   * provide the Cloud SQL instance ID of the source.
+   * 
+ * + * string cloud_sql_id = 7; + * + * @return The cloudSqlId. + */ + @java.lang.Override + public java.lang.String getCloudSqlId() { + java.lang.Object ref = cloudSqlId_; + 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(); + cloudSqlId_ = s; + return s; + } + } + /** + * + * + *
+   * If the source is a Cloud SQL database, use this field to
+   * provide the Cloud SQL instance ID of the source.
+   * 
+ * + * string cloud_sql_id = 7; + * + * @return The bytes for cloudSqlId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudSqlIdBytes() { + java.lang.Object ref = cloudSqlId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlId_ = 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 (!getHostBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, host_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + if (!getUsernameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, username_); + } + if (!getPasswordBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, password_); + } + if (passwordSet_ != false) { + output.writeBool(5, passwordSet_); + } + if (ssl_ != null) { + output.writeMessage(6, getSsl()); + } + if (!getCloudSqlIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, cloudSqlId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getHostBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, host_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, port_); + } + if (!getUsernameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, username_); + } + if (!getPasswordBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, password_); + } + if (passwordSet_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, passwordSet_); + } + if (ssl_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSsl()); + } + if (!getCloudSqlIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, cloudSqlId_); + } + 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.clouddms.v1.MySqlConnectionProfile)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.MySqlConnectionProfile other = + (com.google.cloud.clouddms.v1.MySqlConnectionProfile) obj; + + if (!getHost().equals(other.getHost())) return false; + if (getPort() != other.getPort()) return false; + if (!getUsername().equals(other.getUsername())) return false; + if (!getPassword().equals(other.getPassword())) return false; + if (getPasswordSet() != other.getPasswordSet()) return false; + if (hasSsl() != other.hasSsl()) return false; + if (hasSsl()) { + if (!getSsl().equals(other.getSsl())) return false; + } + if (!getCloudSqlId().equals(other.getCloudSqlId())) 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) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + hash = (37 * hash) + PASSWORD_SET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPasswordSet()); + if (hasSsl()) { + hash = (37 * hash) + SSL_FIELD_NUMBER; + hash = (53 * hash) + getSsl().hashCode(); + } + hash = (37 * hash) + CLOUD_SQL_ID_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.MySqlConnectionProfile parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.MySqlConnectionProfile 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.clouddms.v1.MySqlConnectionProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.MySqlConnectionProfile 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.clouddms.v1.MySqlConnectionProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.MySqlConnectionProfile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.MySqlConnectionProfile parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.MySqlConnectionProfile 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.clouddms.v1.MySqlConnectionProfile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.MySqlConnectionProfile 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.clouddms.v1.MySqlConnectionProfile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.MySqlConnectionProfile 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.clouddms.v1.MySqlConnectionProfile 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; + } + /** + * + * + *
+   * Specifies connection parameters required specifically for MySQL databases.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.MySqlConnectionProfile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.MySqlConnectionProfile) + com.google.cloud.clouddms.v1.MySqlConnectionProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.MySqlConnectionProfile.class, + com.google.cloud.clouddms.v1.MySqlConnectionProfile.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.MySqlConnectionProfile.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(); + host_ = ""; + + port_ = 0; + + username_ = ""; + + password_ = ""; + + passwordSet_ = false; + + if (sslBuilder_ == null) { + ssl_ = null; + } else { + ssl_ = null; + sslBuilder_ = null; + } + cloudSqlId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_MySqlConnectionProfile_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.MySqlConnectionProfile getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.MySqlConnectionProfile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.MySqlConnectionProfile build() { + com.google.cloud.clouddms.v1.MySqlConnectionProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.MySqlConnectionProfile buildPartial() { + com.google.cloud.clouddms.v1.MySqlConnectionProfile result = + new com.google.cloud.clouddms.v1.MySqlConnectionProfile(this); + result.host_ = host_; + result.port_ = port_; + result.username_ = username_; + result.password_ = password_; + result.passwordSet_ = passwordSet_; + if (sslBuilder_ == null) { + result.ssl_ = ssl_; + } else { + result.ssl_ = sslBuilder_.build(); + } + result.cloudSqlId_ = cloudSqlId_; + 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.clouddms.v1.MySqlConnectionProfile) { + return mergeFrom((com.google.cloud.clouddms.v1.MySqlConnectionProfile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.MySqlConnectionProfile other) { + if (other == com.google.cloud.clouddms.v1.MySqlConnectionProfile.getDefaultInstance()) + return this; + if (!other.getHost().isEmpty()) { + host_ = other.host_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + onChanged(); + } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + onChanged(); + } + if (other.getPasswordSet() != false) { + setPasswordSet(other.getPasswordSet()); + } + if (other.hasSsl()) { + mergeSsl(other.getSsl()); + } + if (!other.getCloudSqlId().isEmpty()) { + cloudSqlId_ = other.cloudSqlId_; + 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.clouddms.v1.MySqlConnectionProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.MySqlConnectionProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object host_ = ""; + /** + * + * + *
+     * Required. The IP or hostname of the source MySQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The IP or hostname of the source MySQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for host. + */ + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The IP or hostname of the source MySQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + host_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP or hostname of the source MySQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearHost() { + + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP or hostname of the source MySQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + host_ = value; + onChanged(); + return this; + } + + private int port_; + /** + * + * + *
+     * Required. The network port of the source MySQL database.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * + * + *
+     * Required. The network port of the source MySQL database.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The network port of the source MySQL database.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = 0; + onChanged(); + return this; + } + + private java.lang.Object username_ = ""; + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + username_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUsername() { + + username_ = getDefaultInstance().getUsername(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + username_ = value; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for password. + */ + public com.google.protobuf.ByteString getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + password_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPassword() { + + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + password_ = value; + onChanged(); + return this; + } + + private boolean passwordSet_; + /** + * + * + *
+     * Output only. Indicates If this connection profile password is stored.
+     * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The passwordSet. + */ + @java.lang.Override + public boolean getPasswordSet() { + return passwordSet_; + } + /** + * + * + *
+     * Output only. Indicates If this connection profile password is stored.
+     * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The passwordSet to set. + * @return This builder for chaining. + */ + public Builder setPasswordSet(boolean value) { + + passwordSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates If this connection profile password is stored.
+     * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPasswordSet() { + + passwordSet_ = false; + onChanged(); + return this; + } + + private com.google.cloud.clouddms.v1.SslConfig ssl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.SslConfig, + com.google.cloud.clouddms.v1.SslConfig.Builder, + com.google.cloud.clouddms.v1.SslConfigOrBuilder> + sslBuilder_; + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return Whether the ssl field is set. + */ + public boolean hasSsl() { + return sslBuilder_ != null || ssl_ != null; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return The ssl. + */ + public com.google.cloud.clouddms.v1.SslConfig getSsl() { + if (sslBuilder_ == null) { + return ssl_ == null ? com.google.cloud.clouddms.v1.SslConfig.getDefaultInstance() : ssl_; + } else { + return sslBuilder_.getMessage(); + } + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public Builder setSsl(com.google.cloud.clouddms.v1.SslConfig value) { + if (sslBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ssl_ = value; + onChanged(); + } else { + sslBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public Builder setSsl(com.google.cloud.clouddms.v1.SslConfig.Builder builderForValue) { + if (sslBuilder_ == null) { + ssl_ = builderForValue.build(); + onChanged(); + } else { + sslBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public Builder mergeSsl(com.google.cloud.clouddms.v1.SslConfig value) { + if (sslBuilder_ == null) { + if (ssl_ != null) { + ssl_ = + com.google.cloud.clouddms.v1.SslConfig.newBuilder(ssl_) + .mergeFrom(value) + .buildPartial(); + } else { + ssl_ = value; + } + onChanged(); + } else { + sslBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public Builder clearSsl() { + if (sslBuilder_ == null) { + ssl_ = null; + onChanged(); + } else { + ssl_ = null; + sslBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public com.google.cloud.clouddms.v1.SslConfig.Builder getSslBuilder() { + + onChanged(); + return getSslFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public com.google.cloud.clouddms.v1.SslConfigOrBuilder getSslOrBuilder() { + if (sslBuilder_ != null) { + return sslBuilder_.getMessageOrBuilder(); + } else { + return ssl_ == null ? com.google.cloud.clouddms.v1.SslConfig.getDefaultInstance() : ssl_; + } + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.SslConfig, + com.google.cloud.clouddms.v1.SslConfig.Builder, + com.google.cloud.clouddms.v1.SslConfigOrBuilder> + getSslFieldBuilder() { + if (sslBuilder_ == null) { + sslBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.SslConfig, + com.google.cloud.clouddms.v1.SslConfig.Builder, + com.google.cloud.clouddms.v1.SslConfigOrBuilder>( + getSsl(), getParentForChildren(), isClean()); + ssl_ = null; + } + return sslBuilder_; + } + + private java.lang.Object cloudSqlId_ = ""; + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @return The cloudSqlId. + */ + public java.lang.String getCloudSqlId() { + java.lang.Object ref = cloudSqlId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @return The bytes for cloudSqlId. + */ + public com.google.protobuf.ByteString getCloudSqlIdBytes() { + java.lang.Object ref = cloudSqlId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @param value The cloudSqlId to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudSqlId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @return This builder for chaining. + */ + public Builder clearCloudSqlId() { + + cloudSqlId_ = getDefaultInstance().getCloudSqlId(); + onChanged(); + return this; + } + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @param value The bytes for cloudSqlId to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudSqlId_ = 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.clouddms.v1.MySqlConnectionProfile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.MySqlConnectionProfile) + private static final com.google.cloud.clouddms.v1.MySqlConnectionProfile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.MySqlConnectionProfile(); + } + + public static com.google.cloud.clouddms.v1.MySqlConnectionProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MySqlConnectionProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MySqlConnectionProfile(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.clouddms.v1.MySqlConnectionProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MySqlConnectionProfileOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MySqlConnectionProfileOrBuilder.java new file mode 100644 index 00000000..98886b9e --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/MySqlConnectionProfileOrBuilder.java @@ -0,0 +1,198 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface MySqlConnectionProfileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.MySqlConnectionProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The IP or hostname of the source MySQL database.
+   * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The host. + */ + java.lang.String getHost(); + /** + * + * + *
+   * Required. The IP or hostname of the source MySQL database.
+   * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for host. + */ + com.google.protobuf.ByteString getHostBytes(); + + /** + * + * + *
+   * Required. The network port of the source MySQL database.
+   * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The port. + */ + int getPort(); + + /** + * + * + *
+   * Required. The username that Database Migration Service will use to connect to the
+   * database. The value is encrypted when stored in Database Migration Service.
+   * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + java.lang.String getUsername(); + /** + * + * + *
+   * Required. The username that Database Migration Service will use to connect to the
+   * database. The value is encrypted when stored in Database Migration Service.
+   * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + com.google.protobuf.ByteString getUsernameBytes(); + + /** + * + * + *
+   * Required. Input only. The password for the user that Database Migration Service will be using to
+   * connect to the database. This field is not returned on request, and the
+   * value is encrypted when stored in Database Migration Service.
+   * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The password. + */ + java.lang.String getPassword(); + /** + * + * + *
+   * Required. Input only. The password for the user that Database Migration Service will be using to
+   * connect to the database. This field is not returned on request, and the
+   * value is encrypted when stored in Database Migration Service.
+   * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for password. + */ + com.google.protobuf.ByteString getPasswordBytes(); + + /** + * + * + *
+   * Output only. Indicates If this connection profile password is stored.
+   * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The passwordSet. + */ + boolean getPasswordSet(); + + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return Whether the ssl field is set. + */ + boolean hasSsl(); + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return The ssl. + */ + com.google.cloud.clouddms.v1.SslConfig getSsl(); + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + com.google.cloud.clouddms.v1.SslConfigOrBuilder getSslOrBuilder(); + + /** + * + * + *
+   * If the source is a Cloud SQL database, use this field to
+   * provide the Cloud SQL instance ID of the source.
+   * 
+ * + * string cloud_sql_id = 7; + * + * @return The cloudSqlId. + */ + java.lang.String getCloudSqlId(); + /** + * + * + *
+   * If the source is a Cloud SQL database, use this field to
+   * provide the Cloud SQL instance ID of the source.
+   * 
+ * + * string cloud_sql_id = 7; + * + * @return The bytes for cloudSqlId. + */ + com.google.protobuf.ByteString getCloudSqlIdBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/OperationMetadata.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/OperationMetadata.java new file mode 100644 index 00000000..ed2f0cf1 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/OperationMetadata.java @@ -0,0 +1,1846 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.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_ = ""; + statusMessage_ = ""; + 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(); + + statusMessage_ = s; + break; + } + case 48: + { + requestedCancellation_ = 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 (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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.OperationMetadata.class, + com.google.cloud.clouddms.v1.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_MESSAGE_FIELD_NUMBER = 5; + private volatile java.lang.Object statusMessage_; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.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. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.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 REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_; + /** + * + * + *
+   * 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][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + 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 (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!getVerbBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!getStatusMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + 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 (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!getVerbBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!getStatusMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + 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.clouddms.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.OperationMetadata other = + (com.google.cloud.clouddms.v1.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 (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) 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_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + 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.clouddms.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.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.clouddms.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.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.clouddms.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.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.clouddms.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.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.clouddms.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.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.clouddms.v1.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.clouddms.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.OperationMetadata) + com.google.cloud.clouddms.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.OperationMetadata.class, + com.google.cloud.clouddms.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.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_ = ""; + + statusMessage_ = ""; + + requestedCancellation_ = false; + + apiVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.OperationMetadata build() { + com.google.cloud.clouddms.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.OperationMetadata buildPartial() { + com.google.cloud.clouddms.v1.OperationMetadata result = + new com.google.cloud.clouddms.v1.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.statusMessage_ = statusMessage_; + result.requestedCancellation_ = requestedCancellation_; + 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.clouddms.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.clouddms.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.OperationMetadata other) { + if (other == com.google.cloud.clouddms.v1.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.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + 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.clouddms.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.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 statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.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. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.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. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.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. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + + statusMessage_ = getDefaultInstance().getStatusMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.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 boolean requestedCancellation_; + /** + * + * + *
+     * 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][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * 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][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = 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][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + + requestedCancellation_ = 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.clouddms.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.OperationMetadata) + private static final com.google.cloud.clouddms.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.OperationMetadata(); + } + + public static com.google.cloud.clouddms.v1.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.clouddms.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..5e175b93 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,217 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.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_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * 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][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * 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/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PostgreSqlConnectionProfile.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PostgreSqlConnectionProfile.java new file mode 100644 index 00000000..b5f98fc3 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PostgreSqlConnectionProfile.java @@ -0,0 +1,1669 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Specifies connection parameters required specifically for PostgreSQL
+ * databases.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.PostgreSqlConnectionProfile} + */ +public final class PostgreSqlConnectionProfile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.PostgreSqlConnectionProfile) + PostgreSqlConnectionProfileOrBuilder { + private static final long serialVersionUID = 0L; + // Use PostgreSqlConnectionProfile.newBuilder() to construct. + private PostgreSqlConnectionProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PostgreSqlConnectionProfile() { + host_ = ""; + username_ = ""; + password_ = ""; + cloudSqlId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PostgreSqlConnectionProfile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PostgreSqlConnectionProfile( + 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(); + + host_ = s; + break; + } + case 16: + { + port_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + username_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + password_ = s; + break; + } + case 40: + { + passwordSet_ = input.readBool(); + break; + } + case 50: + { + com.google.cloud.clouddms.v1.SslConfig.Builder subBuilder = null; + if (ssl_ != null) { + subBuilder = ssl_.toBuilder(); + } + ssl_ = + input.readMessage( + com.google.cloud.clouddms.v1.SslConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(ssl_); + ssl_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + cloudSqlId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.class, + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.Builder.class); + } + + public static final int HOST_FIELD_NUMBER = 1; + private volatile java.lang.Object host_; + /** + * + * + *
+   * Required. The IP or hostname of the source PostgreSQL database.
+   * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + 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(); + host_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The IP or hostname of the source PostgreSQL database.
+   * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_; + /** + * + * + *
+   * Required. The network port of the source PostgreSQL database.
+   * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + private volatile java.lang.Object username_; + /** + * + * + *
+   * Required. The username that Database Migration Service will use to connect to the
+   * database. The value is encrypted when stored in Database Migration Service.
+   * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + 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(); + username_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The username that Database Migration Service will use to connect to the
+   * database. The value is encrypted when stored in Database Migration Service.
+   * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_FIELD_NUMBER = 4; + private volatile java.lang.Object password_; + /** + * + * + *
+   * Required. Input only. The password for the user that Database Migration Service will be using to
+   * connect to the database. This field is not returned on request, and the
+   * value is encrypted when stored in Database Migration Service.
+   * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + 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(); + password_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Input only. The password for the user that Database Migration Service will be using to
+   * connect to the database. This field is not returned on request, and the
+   * value is encrypted when stored in Database Migration Service.
+   * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_SET_FIELD_NUMBER = 5; + private boolean passwordSet_; + /** + * + * + *
+   * Output only. Indicates If this connection profile password is stored.
+   * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The passwordSet. + */ + @java.lang.Override + public boolean getPasswordSet() { + return passwordSet_; + } + + public static final int SSL_FIELD_NUMBER = 6; + private com.google.cloud.clouddms.v1.SslConfig ssl_; + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return Whether the ssl field is set. + */ + @java.lang.Override + public boolean hasSsl() { + return ssl_ != null; + } + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return The ssl. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SslConfig getSsl() { + return ssl_ == null ? com.google.cloud.clouddms.v1.SslConfig.getDefaultInstance() : ssl_; + } + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SslConfigOrBuilder getSslOrBuilder() { + return getSsl(); + } + + public static final int CLOUD_SQL_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object cloudSqlId_; + /** + * + * + *
+   * If the source is a Cloud SQL database, use this field to
+   * provide the Cloud SQL instance ID of the source.
+   * 
+ * + * string cloud_sql_id = 7; + * + * @return The cloudSqlId. + */ + @java.lang.Override + public java.lang.String getCloudSqlId() { + java.lang.Object ref = cloudSqlId_; + 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(); + cloudSqlId_ = s; + return s; + } + } + /** + * + * + *
+   * If the source is a Cloud SQL database, use this field to
+   * provide the Cloud SQL instance ID of the source.
+   * 
+ * + * string cloud_sql_id = 7; + * + * @return The bytes for cloudSqlId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudSqlIdBytes() { + java.lang.Object ref = cloudSqlId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlId_ = 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 (!getHostBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, host_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + if (!getUsernameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, username_); + } + if (!getPasswordBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, password_); + } + if (passwordSet_ != false) { + output.writeBool(5, passwordSet_); + } + if (ssl_ != null) { + output.writeMessage(6, getSsl()); + } + if (!getCloudSqlIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, cloudSqlId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getHostBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, host_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, port_); + } + if (!getUsernameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, username_); + } + if (!getPasswordBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, password_); + } + if (passwordSet_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, passwordSet_); + } + if (ssl_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSsl()); + } + if (!getCloudSqlIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, cloudSqlId_); + } + 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.clouddms.v1.PostgreSqlConnectionProfile)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile other = + (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) obj; + + if (!getHost().equals(other.getHost())) return false; + if (getPort() != other.getPort()) return false; + if (!getUsername().equals(other.getUsername())) return false; + if (!getPassword().equals(other.getPassword())) return false; + if (getPasswordSet() != other.getPasswordSet()) return false; + if (hasSsl() != other.hasSsl()) return false; + if (hasSsl()) { + if (!getSsl().equals(other.getSsl())) return false; + } + if (!getCloudSqlId().equals(other.getCloudSqlId())) 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) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + hash = (37 * hash) + PASSWORD_SET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPasswordSet()); + if (hasSsl()) { + hash = (37 * hash) + SSL_FIELD_NUMBER; + hash = (53 * hash) + getSsl().hashCode(); + } + hash = (37 * hash) + CLOUD_SQL_ID_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile 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.clouddms.v1.PostgreSqlConnectionProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile 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.clouddms.v1.PostgreSqlConnectionProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile 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.clouddms.v1.PostgreSqlConnectionProfile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile 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.clouddms.v1.PostgreSqlConnectionProfile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile 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.clouddms.v1.PostgreSqlConnectionProfile 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; + } + /** + * + * + *
+   * Specifies connection parameters required specifically for PostgreSQL
+   * databases.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.PostgreSqlConnectionProfile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.PostgreSqlConnectionProfile) + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.class, + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.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(); + host_ = ""; + + port_ = 0; + + username_ = ""; + + password_ = ""; + + passwordSet_ = false; + + if (sslBuilder_ == null) { + ssl_ = null; + } else { + ssl_ = null; + sslBuilder_ = null; + } + cloudSqlId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_PostgreSqlConnectionProfile_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile build() { + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile buildPartial() { + com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile result = + new com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile(this); + result.host_ = host_; + result.port_ = port_; + result.username_ = username_; + result.password_ = password_; + result.passwordSet_ = passwordSet_; + if (sslBuilder_ == null) { + result.ssl_ = ssl_; + } else { + result.ssl_ = sslBuilder_.build(); + } + result.cloudSqlId_ = cloudSqlId_; + 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.clouddms.v1.PostgreSqlConnectionProfile) { + return mergeFrom((com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile other) { + if (other == com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.getDefaultInstance()) + return this; + if (!other.getHost().isEmpty()) { + host_ = other.host_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + onChanged(); + } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + onChanged(); + } + if (other.getPasswordSet() != false) { + setPasswordSet(other.getPasswordSet()); + } + if (other.hasSsl()) { + mergeSsl(other.getSsl()); + } + if (!other.getCloudSqlId().isEmpty()) { + cloudSqlId_ = other.cloudSqlId_; + 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.clouddms.v1.PostgreSqlConnectionProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object host_ = ""; + /** + * + * + *
+     * Required. The IP or hostname of the source PostgreSQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The IP or hostname of the source PostgreSQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for host. + */ + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The IP or hostname of the source PostgreSQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + host_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP or hostname of the source PostgreSQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearHost() { + + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP or hostname of the source PostgreSQL database.
+     * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + host_ = value; + onChanged(); + return this; + } + + private int port_; + /** + * + * + *
+     * Required. The network port of the source PostgreSQL database.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * + * + *
+     * Required. The network port of the source PostgreSQL database.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The network port of the source PostgreSQL database.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = 0; + onChanged(); + return this; + } + + private java.lang.Object username_ = ""; + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + username_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUsername() { + + username_ = getDefaultInstance().getUsername(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The username that Database Migration Service will use to connect to the
+     * database. The value is encrypted when stored in Database Migration Service.
+     * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + username_ = value; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for password. + */ + public com.google.protobuf.ByteString getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + password_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPassword() { + + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Input only. The password for the user that Database Migration Service will be using to
+     * connect to the database. This field is not returned on request, and the
+     * value is encrypted when stored in Database Migration Service.
+     * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + password_ = value; + onChanged(); + return this; + } + + private boolean passwordSet_; + /** + * + * + *
+     * Output only. Indicates If this connection profile password is stored.
+     * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The passwordSet. + */ + @java.lang.Override + public boolean getPasswordSet() { + return passwordSet_; + } + /** + * + * + *
+     * Output only. Indicates If this connection profile password is stored.
+     * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The passwordSet to set. + * @return This builder for chaining. + */ + public Builder setPasswordSet(boolean value) { + + passwordSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates If this connection profile password is stored.
+     * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPasswordSet() { + + passwordSet_ = false; + onChanged(); + return this; + } + + private com.google.cloud.clouddms.v1.SslConfig ssl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.SslConfig, + com.google.cloud.clouddms.v1.SslConfig.Builder, + com.google.cloud.clouddms.v1.SslConfigOrBuilder> + sslBuilder_; + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return Whether the ssl field is set. + */ + public boolean hasSsl() { + return sslBuilder_ != null || ssl_ != null; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return The ssl. + */ + public com.google.cloud.clouddms.v1.SslConfig getSsl() { + if (sslBuilder_ == null) { + return ssl_ == null ? com.google.cloud.clouddms.v1.SslConfig.getDefaultInstance() : ssl_; + } else { + return sslBuilder_.getMessage(); + } + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public Builder setSsl(com.google.cloud.clouddms.v1.SslConfig value) { + if (sslBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ssl_ = value; + onChanged(); + } else { + sslBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public Builder setSsl(com.google.cloud.clouddms.v1.SslConfig.Builder builderForValue) { + if (sslBuilder_ == null) { + ssl_ = builderForValue.build(); + onChanged(); + } else { + sslBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public Builder mergeSsl(com.google.cloud.clouddms.v1.SslConfig value) { + if (sslBuilder_ == null) { + if (ssl_ != null) { + ssl_ = + com.google.cloud.clouddms.v1.SslConfig.newBuilder(ssl_) + .mergeFrom(value) + .buildPartial(); + } else { + ssl_ = value; + } + onChanged(); + } else { + sslBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public Builder clearSsl() { + if (sslBuilder_ == null) { + ssl_ = null; + onChanged(); + } else { + ssl_ = null; + sslBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public com.google.cloud.clouddms.v1.SslConfig.Builder getSslBuilder() { + + onChanged(); + return getSslFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + public com.google.cloud.clouddms.v1.SslConfigOrBuilder getSslOrBuilder() { + if (sslBuilder_ != null) { + return sslBuilder_.getMessageOrBuilder(); + } else { + return ssl_ == null ? com.google.cloud.clouddms.v1.SslConfig.getDefaultInstance() : ssl_; + } + } + /** + * + * + *
+     * SSL configuration for the destination to connect to the source database.
+     * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.SslConfig, + com.google.cloud.clouddms.v1.SslConfig.Builder, + com.google.cloud.clouddms.v1.SslConfigOrBuilder> + getSslFieldBuilder() { + if (sslBuilder_ == null) { + sslBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.SslConfig, + com.google.cloud.clouddms.v1.SslConfig.Builder, + com.google.cloud.clouddms.v1.SslConfigOrBuilder>( + getSsl(), getParentForChildren(), isClean()); + ssl_ = null; + } + return sslBuilder_; + } + + private java.lang.Object cloudSqlId_ = ""; + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @return The cloudSqlId. + */ + public java.lang.String getCloudSqlId() { + java.lang.Object ref = cloudSqlId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @return The bytes for cloudSqlId. + */ + public com.google.protobuf.ByteString getCloudSqlIdBytes() { + java.lang.Object ref = cloudSqlId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @param value The cloudSqlId to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudSqlId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @return This builder for chaining. + */ + public Builder clearCloudSqlId() { + + cloudSqlId_ = getDefaultInstance().getCloudSqlId(); + onChanged(); + return this; + } + /** + * + * + *
+     * If the source is a Cloud SQL database, use this field to
+     * provide the Cloud SQL instance ID of the source.
+     * 
+ * + * string cloud_sql_id = 7; + * + * @param value The bytes for cloudSqlId to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudSqlId_ = 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.clouddms.v1.PostgreSqlConnectionProfile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.PostgreSqlConnectionProfile) + private static final com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile(); + } + + public static com.google.cloud.clouddms.v1.PostgreSqlConnectionProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PostgreSqlConnectionProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PostgreSqlConnectionProfile(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.clouddms.v1.PostgreSqlConnectionProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PostgreSqlConnectionProfileOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PostgreSqlConnectionProfileOrBuilder.java new file mode 100644 index 00000000..2d7a74b6 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PostgreSqlConnectionProfileOrBuilder.java @@ -0,0 +1,198 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface PostgreSqlConnectionProfileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.PostgreSqlConnectionProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The IP or hostname of the source PostgreSQL database.
+   * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The host. + */ + java.lang.String getHost(); + /** + * + * + *
+   * Required. The IP or hostname of the source PostgreSQL database.
+   * 
+ * + * string host = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for host. + */ + com.google.protobuf.ByteString getHostBytes(); + + /** + * + * + *
+   * Required. The network port of the source PostgreSQL database.
+   * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The port. + */ + int getPort(); + + /** + * + * + *
+   * Required. The username that Database Migration Service will use to connect to the
+   * database. The value is encrypted when stored in Database Migration Service.
+   * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + java.lang.String getUsername(); + /** + * + * + *
+   * Required. The username that Database Migration Service will use to connect to the
+   * database. The value is encrypted when stored in Database Migration Service.
+   * 
+ * + * string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + com.google.protobuf.ByteString getUsernameBytes(); + + /** + * + * + *
+   * Required. Input only. The password for the user that Database Migration Service will be using to
+   * connect to the database. This field is not returned on request, and the
+   * value is encrypted when stored in Database Migration Service.
+   * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The password. + */ + java.lang.String getPassword(); + /** + * + * + *
+   * Required. Input only. The password for the user that Database Migration Service will be using to
+   * connect to the database. This field is not returned on request, and the
+   * value is encrypted when stored in Database Migration Service.
+   * 
+ * + * + * string password = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for password. + */ + com.google.protobuf.ByteString getPasswordBytes(); + + /** + * + * + *
+   * Output only. Indicates If this connection profile password is stored.
+   * 
+ * + * bool password_set = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The passwordSet. + */ + boolean getPasswordSet(); + + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return Whether the ssl field is set. + */ + boolean hasSsl(); + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + * + * @return The ssl. + */ + com.google.cloud.clouddms.v1.SslConfig getSsl(); + /** + * + * + *
+   * SSL configuration for the destination to connect to the source database.
+   * 
+ * + * .google.cloud.clouddms.v1.SslConfig ssl = 6; + */ + com.google.cloud.clouddms.v1.SslConfigOrBuilder getSslOrBuilder(); + + /** + * + * + *
+   * If the source is a Cloud SQL database, use this field to
+   * provide the Cloud SQL instance ID of the source.
+   * 
+ * + * string cloud_sql_id = 7; + * + * @return The cloudSqlId. + */ + java.lang.String getCloudSqlId(); + /** + * + * + *
+   * If the source is a Cloud SQL database, use this field to
+   * provide the Cloud SQL instance ID of the source.
+   * 
+ * + * string cloud_sql_id = 7; + * + * @return The bytes for cloudSqlId. + */ + com.google.protobuf.ByteString getCloudSqlIdBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PromoteMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PromoteMigrationJobRequest.java new file mode 100644 index 00000000..286b98dd --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PromoteMigrationJobRequest.java @@ -0,0 +1,637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'PromoteMigrationJob' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.PromoteMigrationJobRequest} + */ +public final class PromoteMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.PromoteMigrationJobRequest) + PromoteMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PromoteMigrationJobRequest.newBuilder() to construct. + private PromoteMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PromoteMigrationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PromoteMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PromoteMigrationJobRequest( + 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 (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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest.class, + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the migration job resource to promote.
+   * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+   * Name of the migration job resource to promote.
+   * 
+ * + * string name = 1 [(.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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.clouddms.v1.PromoteMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest other = + (com.google.cloud.clouddms.v1.PromoteMigrationJobRequest) 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.clouddms.v1.PromoteMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.PromoteMigrationJobRequest 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.clouddms.v1.PromoteMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.PromoteMigrationJobRequest 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.clouddms.v1.PromoteMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.PromoteMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.PromoteMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.PromoteMigrationJobRequest 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.clouddms.v1.PromoteMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.PromoteMigrationJobRequest 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.clouddms.v1.PromoteMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.PromoteMigrationJobRequest 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.clouddms.v1.PromoteMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'PromoteMigrationJob' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.PromoteMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.PromoteMigrationJobRequest) + com.google.cloud.clouddms.v1.PromoteMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest.class, + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.PromoteMigrationJobRequest.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_PromoteMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.PromoteMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.PromoteMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.PromoteMigrationJobRequest build() { + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.PromoteMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.PromoteMigrationJobRequest result = + new com.google.cloud.clouddms.v1.PromoteMigrationJobRequest(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.clouddms.v1.PromoteMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.PromoteMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.PromoteMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.PromoteMigrationJobRequest.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.clouddms.v1.PromoteMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.PromoteMigrationJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the migration job resource to promote.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to promote.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to promote.
+     * 
+ * + * string name = 1 [(.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; + } + /** + * + * + *
+     * Name of the migration job resource to promote.
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the migration job resource to promote.
+     * 
+ * + * string name = 1 [(.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.clouddms.v1.PromoteMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.PromoteMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.PromoteMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.PromoteMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.PromoteMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PromoteMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PromoteMigrationJobRequest(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.clouddms.v1.PromoteMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PromoteMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PromoteMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..e5f46816 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/PromoteMigrationJobRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface PromoteMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.PromoteMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the migration job resource to promote.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the migration job resource to promote.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/RestartMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/RestartMigrationJobRequest.java new file mode 100644 index 00000000..5ee44016 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/RestartMigrationJobRequest.java @@ -0,0 +1,637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'RestartMigrationJob' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.RestartMigrationJobRequest} + */ +public final class RestartMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.RestartMigrationJobRequest) + RestartMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RestartMigrationJobRequest.newBuilder() to construct. + private RestartMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestartMigrationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestartMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RestartMigrationJobRequest( + 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 (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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.RestartMigrationJobRequest.class, + com.google.cloud.clouddms.v1.RestartMigrationJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the migration job resource to restart.
+   * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+   * Name of the migration job resource to restart.
+   * 
+ * + * string name = 1 [(.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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.clouddms.v1.RestartMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.RestartMigrationJobRequest other = + (com.google.cloud.clouddms.v1.RestartMigrationJobRequest) 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.clouddms.v1.RestartMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.RestartMigrationJobRequest 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.clouddms.v1.RestartMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.RestartMigrationJobRequest 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.clouddms.v1.RestartMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.RestartMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.RestartMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.RestartMigrationJobRequest 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.clouddms.v1.RestartMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.RestartMigrationJobRequest 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.clouddms.v1.RestartMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.RestartMigrationJobRequest 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.clouddms.v1.RestartMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'RestartMigrationJob' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.RestartMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.RestartMigrationJobRequest) + com.google.cloud.clouddms.v1.RestartMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.RestartMigrationJobRequest.class, + com.google.cloud.clouddms.v1.RestartMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.RestartMigrationJobRequest.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_RestartMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.RestartMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.RestartMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.RestartMigrationJobRequest build() { + com.google.cloud.clouddms.v1.RestartMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.RestartMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.RestartMigrationJobRequest result = + new com.google.cloud.clouddms.v1.RestartMigrationJobRequest(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.clouddms.v1.RestartMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.RestartMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.RestartMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.RestartMigrationJobRequest.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.clouddms.v1.RestartMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.RestartMigrationJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the migration job resource to restart.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to restart.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to restart.
+     * 
+ * + * string name = 1 [(.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; + } + /** + * + * + *
+     * Name of the migration job resource to restart.
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the migration job resource to restart.
+     * 
+ * + * string name = 1 [(.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.clouddms.v1.RestartMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.RestartMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.RestartMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.RestartMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.RestartMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestartMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RestartMigrationJobRequest(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.clouddms.v1.RestartMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/RestartMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/RestartMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..467c9bf1 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/RestartMigrationJobRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface RestartMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.RestartMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the migration job resource to restart.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the migration job resource to restart.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ResumeMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ResumeMigrationJobRequest.java new file mode 100644 index 00000000..81b9ccc3 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ResumeMigrationJobRequest.java @@ -0,0 +1,637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'ResumeMigrationJob' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ResumeMigrationJobRequest} + */ +public final class ResumeMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.ResumeMigrationJobRequest) + ResumeMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResumeMigrationJobRequest.newBuilder() to construct. + private ResumeMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResumeMigrationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResumeMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResumeMigrationJobRequest( + 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 (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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest.class, + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the migration job resource to resume.
+   * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+   * Name of the migration job resource to resume.
+   * 
+ * + * string name = 1 [(.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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.clouddms.v1.ResumeMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest other = + (com.google.cloud.clouddms.v1.ResumeMigrationJobRequest) 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.clouddms.v1.ResumeMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ResumeMigrationJobRequest 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.clouddms.v1.ResumeMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ResumeMigrationJobRequest 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.clouddms.v1.ResumeMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ResumeMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.ResumeMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ResumeMigrationJobRequest 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.clouddms.v1.ResumeMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ResumeMigrationJobRequest 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.clouddms.v1.ResumeMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ResumeMigrationJobRequest 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.clouddms.v1.ResumeMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'ResumeMigrationJob' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ResumeMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.ResumeMigrationJobRequest) + com.google.cloud.clouddms.v1.ResumeMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest.class, + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.ResumeMigrationJobRequest.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_ResumeMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ResumeMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.ResumeMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ResumeMigrationJobRequest build() { + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ResumeMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.ResumeMigrationJobRequest result = + new com.google.cloud.clouddms.v1.ResumeMigrationJobRequest(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.clouddms.v1.ResumeMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.ResumeMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.ResumeMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.ResumeMigrationJobRequest.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.clouddms.v1.ResumeMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.ResumeMigrationJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the migration job resource to resume.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to resume.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to resume.
+     * 
+ * + * string name = 1 [(.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; + } + /** + * + * + *
+     * Name of the migration job resource to resume.
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the migration job resource to resume.
+     * 
+ * + * string name = 1 [(.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.clouddms.v1.ResumeMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.ResumeMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.ResumeMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.ResumeMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.ResumeMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResumeMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResumeMigrationJobRequest(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.clouddms.v1.ResumeMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ResumeMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ResumeMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..0c8c1190 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ResumeMigrationJobRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface ResumeMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.ResumeMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the migration job resource to resume.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the migration job resource to resume.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ReverseSshConnectivity.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ReverseSshConnectivity.java new file mode 100644 index 00000000..f61f8a7a --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ReverseSshConnectivity.java @@ -0,0 +1,1112 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * The details needed to configure a reverse SSH tunnel between the source and
+ * destination databases. These details will be used when calling the
+ * generateSshScript method (see
+ * https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/generateSshScript)
+ * to produce the script that will help set up the reverse SSH tunnel, and to
+ * set up the VPC peering between the Cloud SQL private network and the VPC.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ReverseSshConnectivity} + */ +public final class ReverseSshConnectivity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.ReverseSshConnectivity) + ReverseSshConnectivityOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReverseSshConnectivity.newBuilder() to construct. + private ReverseSshConnectivity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReverseSshConnectivity() { + vmIp_ = ""; + vm_ = ""; + vpc_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReverseSshConnectivity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReverseSshConnectivity( + 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(); + + vmIp_ = s; + break; + } + case 16: + { + vmPort_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + vm_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + vpc_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ReverseSshConnectivity.class, + com.google.cloud.clouddms.v1.ReverseSshConnectivity.Builder.class); + } + + public static final int VM_IP_FIELD_NUMBER = 1; + private volatile java.lang.Object vmIp_; + /** + * + * + *
+   * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
+   * for the SSH tunnel.
+   * 
+ * + * string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmIp. + */ + @java.lang.Override + public java.lang.String getVmIp() { + java.lang.Object ref = vmIp_; + 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(); + vmIp_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
+   * for the SSH tunnel.
+   * 
+ * + * string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmIpBytes() { + java.lang.Object ref = vmIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_PORT_FIELD_NUMBER = 2; + private int vmPort_; + /** + * + * + *
+   * Required. The forwarding port of the virtual machine (Compute Engine) used as the
+   * bastion server for the SSH tunnel.
+   * 
+ * + * int32 vm_port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmPort. + */ + @java.lang.Override + public int getVmPort() { + return vmPort_; + } + + public static final int VM_FIELD_NUMBER = 3; + private volatile java.lang.Object vm_; + /** + * + * + *
+   * The name of the virtual machine (Compute Engine) used as the bastion server
+   * for the SSH tunnel.
+   * 
+ * + * string vm = 3; + * + * @return The vm. + */ + @java.lang.Override + public java.lang.String getVm() { + java.lang.Object ref = vm_; + 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(); + vm_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the virtual machine (Compute Engine) used as the bastion server
+   * for the SSH tunnel.
+   * 
+ * + * string vm = 3; + * + * @return The bytes for vm. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmBytes() { + java.lang.Object ref = vm_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VPC_FIELD_NUMBER = 4; + private volatile java.lang.Object vpc_; + /** + * + * + *
+   * The name of the VPC to peer with the Cloud SQL private network.
+   * 
+ * + * string vpc = 4; + * + * @return The vpc. + */ + @java.lang.Override + public java.lang.String getVpc() { + java.lang.Object ref = vpc_; + 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(); + vpc_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the VPC to peer with the Cloud SQL private network.
+   * 
+ * + * string vpc = 4; + * + * @return The bytes for vpc. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpcBytes() { + java.lang.Object ref = vpc_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpc_ = 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 (!getVmIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vmIp_); + } + if (vmPort_ != 0) { + output.writeInt32(2, vmPort_); + } + if (!getVmBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, vm_); + } + if (!getVpcBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, vpc_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVmIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vmIp_); + } + if (vmPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, vmPort_); + } + if (!getVmBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, vm_); + } + if (!getVpcBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, vpc_); + } + 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.clouddms.v1.ReverseSshConnectivity)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.ReverseSshConnectivity other = + (com.google.cloud.clouddms.v1.ReverseSshConnectivity) obj; + + if (!getVmIp().equals(other.getVmIp())) return false; + if (getVmPort() != other.getVmPort()) return false; + if (!getVm().equals(other.getVm())) return false; + if (!getVpc().equals(other.getVpc())) 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) + VM_IP_FIELD_NUMBER; + hash = (53 * hash) + getVmIp().hashCode(); + hash = (37 * hash) + VM_PORT_FIELD_NUMBER; + hash = (53 * hash) + getVmPort(); + hash = (37 * hash) + VM_FIELD_NUMBER; + hash = (53 * hash) + getVm().hashCode(); + hash = (37 * hash) + VPC_FIELD_NUMBER; + hash = (53 * hash) + getVpc().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.ReverseSshConnectivity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ReverseSshConnectivity 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.clouddms.v1.ReverseSshConnectivity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ReverseSshConnectivity 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.clouddms.v1.ReverseSshConnectivity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.ReverseSshConnectivity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.ReverseSshConnectivity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ReverseSshConnectivity 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.clouddms.v1.ReverseSshConnectivity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ReverseSshConnectivity 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.clouddms.v1.ReverseSshConnectivity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.ReverseSshConnectivity 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.clouddms.v1.ReverseSshConnectivity 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; + } + /** + * + * + *
+   * The details needed to configure a reverse SSH tunnel between the source and
+   * destination databases. These details will be used when calling the
+   * generateSshScript method (see
+   * https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/generateSshScript)
+   * to produce the script that will help set up the reverse SSH tunnel, and to
+   * set up the VPC peering between the Cloud SQL private network and the VPC.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.ReverseSshConnectivity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.ReverseSshConnectivity) + com.google.cloud.clouddms.v1.ReverseSshConnectivityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.ReverseSshConnectivity.class, + com.google.cloud.clouddms.v1.ReverseSshConnectivity.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.ReverseSshConnectivity.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(); + vmIp_ = ""; + + vmPort_ = 0; + + vm_ = ""; + + vpc_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_ReverseSshConnectivity_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ReverseSshConnectivity getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.ReverseSshConnectivity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ReverseSshConnectivity build() { + com.google.cloud.clouddms.v1.ReverseSshConnectivity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.ReverseSshConnectivity buildPartial() { + com.google.cloud.clouddms.v1.ReverseSshConnectivity result = + new com.google.cloud.clouddms.v1.ReverseSshConnectivity(this); + result.vmIp_ = vmIp_; + result.vmPort_ = vmPort_; + result.vm_ = vm_; + result.vpc_ = vpc_; + 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.clouddms.v1.ReverseSshConnectivity) { + return mergeFrom((com.google.cloud.clouddms.v1.ReverseSshConnectivity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.ReverseSshConnectivity other) { + if (other == com.google.cloud.clouddms.v1.ReverseSshConnectivity.getDefaultInstance()) + return this; + if (!other.getVmIp().isEmpty()) { + vmIp_ = other.vmIp_; + onChanged(); + } + if (other.getVmPort() != 0) { + setVmPort(other.getVmPort()); + } + if (!other.getVm().isEmpty()) { + vm_ = other.vm_; + onChanged(); + } + if (!other.getVpc().isEmpty()) { + vpc_ = other.vpc_; + 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.clouddms.v1.ReverseSshConnectivity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.ReverseSshConnectivity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object vmIp_ = ""; + /** + * + * + *
+     * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmIp. + */ + public java.lang.String getVmIp() { + java.lang.Object ref = vmIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmIp. + */ + public com.google.protobuf.ByteString getVmIpBytes() { + java.lang.Object ref = vmIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vmIp to set. + * @return This builder for chaining. + */ + public Builder setVmIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVmIp() { + + vmIp_ = getDefaultInstance().getVmIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for vmIp to set. + * @return This builder for chaining. + */ + public Builder setVmIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmIp_ = value; + onChanged(); + return this; + } + + private int vmPort_; + /** + * + * + *
+     * Required. The forwarding port of the virtual machine (Compute Engine) used as the
+     * bastion server for the SSH tunnel.
+     * 
+ * + * int32 vm_port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmPort. + */ + @java.lang.Override + public int getVmPort() { + return vmPort_; + } + /** + * + * + *
+     * Required. The forwarding port of the virtual machine (Compute Engine) used as the
+     * bastion server for the SSH tunnel.
+     * 
+ * + * int32 vm_port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vmPort to set. + * @return This builder for chaining. + */ + public Builder setVmPort(int value) { + + vmPort_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The forwarding port of the virtual machine (Compute Engine) used as the
+     * bastion server for the SSH tunnel.
+     * 
+ * + * int32 vm_port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVmPort() { + + vmPort_ = 0; + onChanged(); + return this; + } + + private java.lang.Object vm_ = ""; + /** + * + * + *
+     * The name of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm = 3; + * + * @return The vm. + */ + public java.lang.String getVm() { + java.lang.Object ref = vm_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vm_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm = 3; + * + * @return The bytes for vm. + */ + public com.google.protobuf.ByteString getVmBytes() { + java.lang.Object ref = vm_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm = 3; + * + * @param value The vm to set. + * @return This builder for chaining. + */ + public Builder setVm(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vm_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm = 3; + * + * @return This builder for chaining. + */ + public Builder clearVm() { + + vm_ = getDefaultInstance().getVm(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the virtual machine (Compute Engine) used as the bastion server
+     * for the SSH tunnel.
+     * 
+ * + * string vm = 3; + * + * @param value The bytes for vm to set. + * @return This builder for chaining. + */ + public Builder setVmBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vm_ = value; + onChanged(); + return this; + } + + private java.lang.Object vpc_ = ""; + /** + * + * + *
+     * The name of the VPC to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 4; + * + * @return The vpc. + */ + public java.lang.String getVpc() { + java.lang.Object ref = vpc_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpc_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the VPC to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 4; + * + * @return The bytes for vpc. + */ + public com.google.protobuf.ByteString getVpcBytes() { + java.lang.Object ref = vpc_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpc_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the VPC to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 4; + * + * @param value The vpc to set. + * @return This builder for chaining. + */ + public Builder setVpc(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vpc_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VPC to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 4; + * + * @return This builder for chaining. + */ + public Builder clearVpc() { + + vpc_ = getDefaultInstance().getVpc(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VPC to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 4; + * + * @param value The bytes for vpc to set. + * @return This builder for chaining. + */ + public Builder setVpcBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vpc_ = 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.clouddms.v1.ReverseSshConnectivity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.ReverseSshConnectivity) + private static final com.google.cloud.clouddms.v1.ReverseSshConnectivity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.ReverseSshConnectivity(); + } + + public static com.google.cloud.clouddms.v1.ReverseSshConnectivity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReverseSshConnectivity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReverseSshConnectivity(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.clouddms.v1.ReverseSshConnectivity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ReverseSshConnectivityOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ReverseSshConnectivityOrBuilder.java new file mode 100644 index 00000000..e018c513 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/ReverseSshConnectivityOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface ReverseSshConnectivityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.ReverseSshConnectivity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
+   * for the SSH tunnel.
+   * 
+ * + * string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmIp. + */ + java.lang.String getVmIp(); + /** + * + * + *
+   * Required. The IP of the virtual machine (Compute Engine) used as the bastion server
+   * for the SSH tunnel.
+   * 
+ * + * string vm_ip = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmIp. + */ + com.google.protobuf.ByteString getVmIpBytes(); + + /** + * + * + *
+   * Required. The forwarding port of the virtual machine (Compute Engine) used as the
+   * bastion server for the SSH tunnel.
+   * 
+ * + * int32 vm_port = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmPort. + */ + int getVmPort(); + + /** + * + * + *
+   * The name of the virtual machine (Compute Engine) used as the bastion server
+   * for the SSH tunnel.
+   * 
+ * + * string vm = 3; + * + * @return The vm. + */ + java.lang.String getVm(); + /** + * + * + *
+   * The name of the virtual machine (Compute Engine) used as the bastion server
+   * for the SSH tunnel.
+   * 
+ * + * string vm = 3; + * + * @return The bytes for vm. + */ + com.google.protobuf.ByteString getVmBytes(); + + /** + * + * + *
+   * The name of the VPC to peer with the Cloud SQL private network.
+   * 
+ * + * string vpc = 4; + * + * @return The vpc. + */ + java.lang.String getVpc(); + /** + * + * + *
+   * The name of the VPC to peer with the Cloud SQL private network.
+   * 
+ * + * string vpc = 4; + * + * @return The bytes for vpc. + */ + com.google.protobuf.ByteString getVpcBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlAclEntry.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlAclEntry.java new file mode 100644 index 00000000..cc1a882a --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlAclEntry.java @@ -0,0 +1,1511 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * An entry for an Access Control list.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.SqlAclEntry} + */ +public final class SqlAclEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.SqlAclEntry) + SqlAclEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use SqlAclEntry.newBuilder() to construct. + private SqlAclEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SqlAclEntry() { + value_ = ""; + label_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SqlAclEntry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SqlAclEntry( + 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(); + + value_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + label_ = s; + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expirationCase_ == 10) { + subBuilder = ((com.google.protobuf.Timestamp) expiration_).toBuilder(); + } + expiration_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Timestamp) expiration_); + expiration_ = subBuilder.buildPartial(); + } + expirationCase_ = 10; + break; + } + case 90: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (expirationCase_ == 11) { + subBuilder = ((com.google.protobuf.Duration) expiration_).toBuilder(); + } + expiration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Duration) expiration_); + expiration_ = subBuilder.buildPartial(); + } + expirationCase_ = 11; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlAclEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlAclEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.SqlAclEntry.class, + com.google.cloud.clouddms.v1.SqlAclEntry.Builder.class); + } + + private int expirationCase_ = 0; + private java.lang.Object expiration_; + + public enum ExpirationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EXPIRE_TIME(10), + TTL(11), + EXPIRATION_NOT_SET(0); + private final int value; + + private ExpirationCase(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 ExpirationCase valueOf(int value) { + return forNumber(value); + } + + public static ExpirationCase forNumber(int value) { + switch (value) { + case 10: + return EXPIRE_TIME; + case 11: + return TTL; + case 0: + return EXPIRATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ExpirationCase getExpirationCase() { + return ExpirationCase.forNumber(expirationCase_); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private volatile java.lang.Object value_; + /** + * + * + *
+   * The allowlisted value for the access control list.
+   * 
+ * + * string value = 1; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+   * The allowlisted value for the access control list.
+   * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 10; + /** + * + * + *
+   * The time when this access control entry expires in
+   * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+   * `2012-11-15T16:19:00.094Z`.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expirationCase_ == 10; + } + /** + * + * + *
+   * The time when this access control entry expires in
+   * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+   * `2012-11-15T16:19:00.094Z`.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + if (expirationCase_ == 10) { + return (com.google.protobuf.Timestamp) expiration_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + * + * + *
+   * The time when this access control entry expires in
+   * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+   * `2012-11-15T16:19:00.094Z`.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expirationCase_ == 10) { + return (com.google.protobuf.Timestamp) expiration_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int TTL_FIELD_NUMBER = 11; + /** + * + * + *
+   * Input only. The time-to-leave of this access control entry.
+   * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return Whether the ttl field is set. + */ + @java.lang.Override + public boolean hasTtl() { + return expirationCase_ == 11; + } + /** + * + * + *
+   * Input only. The time-to-leave of this access control entry.
+   * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The ttl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTtl() { + if (expirationCase_ == 11) { + return (com.google.protobuf.Duration) expiration_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + /** + * + * + *
+   * Input only. The time-to-leave of this access control entry.
+   * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + if (expirationCase_ == 11) { + return (com.google.protobuf.Duration) expiration_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public static final int LABEL_FIELD_NUMBER = 3; + private volatile java.lang.Object label_; + /** + * + * + *
+   * A label to identify this entry.
+   * 
+ * + * string label = 3; + * + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + 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(); + label_ = s; + return s; + } + } + /** + * + * + *
+   * A label to identify this entry.
+   * 
+ * + * string label = 3; + * + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + label_ = 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 (!getValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); + } + if (!getLabelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, label_); + } + if (expirationCase_ == 10) { + output.writeMessage(10, (com.google.protobuf.Timestamp) expiration_); + } + if (expirationCase_ == 11) { + output.writeMessage(11, (com.google.protobuf.Duration) expiration_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); + } + if (!getLabelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, label_); + } + if (expirationCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.protobuf.Timestamp) expiration_); + } + if (expirationCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.protobuf.Duration) expiration_); + } + 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.clouddms.v1.SqlAclEntry)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.SqlAclEntry other = (com.google.cloud.clouddms.v1.SqlAclEntry) obj; + + if (!getValue().equals(other.getValue())) return false; + if (!getLabel().equals(other.getLabel())) return false; + if (!getExpirationCase().equals(other.getExpirationCase())) return false; + switch (expirationCase_) { + case 10: + if (!getExpireTime().equals(other.getExpireTime())) return false; + break; + case 11: + if (!getTtl().equals(other.getTtl())) 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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + switch (expirationCase_) { + case 10: + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + break; + case 11: + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.SqlAclEntry parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SqlAclEntry 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.clouddms.v1.SqlAclEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SqlAclEntry 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.clouddms.v1.SqlAclEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SqlAclEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.SqlAclEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SqlAclEntry 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.clouddms.v1.SqlAclEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SqlAclEntry 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.clouddms.v1.SqlAclEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SqlAclEntry 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.clouddms.v1.SqlAclEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An entry for an Access Control list.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.SqlAclEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.SqlAclEntry) + com.google.cloud.clouddms.v1.SqlAclEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlAclEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlAclEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.SqlAclEntry.class, + com.google.cloud.clouddms.v1.SqlAclEntry.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.SqlAclEntry.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(); + value_ = ""; + + label_ = ""; + + expirationCase_ = 0; + expiration_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlAclEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlAclEntry getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.SqlAclEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlAclEntry build() { + com.google.cloud.clouddms.v1.SqlAclEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlAclEntry buildPartial() { + com.google.cloud.clouddms.v1.SqlAclEntry result = + new com.google.cloud.clouddms.v1.SqlAclEntry(this); + result.value_ = value_; + if (expirationCase_ == 10) { + if (expireTimeBuilder_ == null) { + result.expiration_ = expiration_; + } else { + result.expiration_ = expireTimeBuilder_.build(); + } + } + if (expirationCase_ == 11) { + if (ttlBuilder_ == null) { + result.expiration_ = expiration_; + } else { + result.expiration_ = ttlBuilder_.build(); + } + } + result.label_ = label_; + result.expirationCase_ = expirationCase_; + 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.clouddms.v1.SqlAclEntry) { + return mergeFrom((com.google.cloud.clouddms.v1.SqlAclEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.SqlAclEntry other) { + if (other == com.google.cloud.clouddms.v1.SqlAclEntry.getDefaultInstance()) return this; + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + onChanged(); + } + switch (other.getExpirationCase()) { + case EXPIRE_TIME: + { + mergeExpireTime(other.getExpireTime()); + break; + } + case TTL: + { + mergeTtl(other.getTtl()); + break; + } + case EXPIRATION_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.clouddms.v1.SqlAclEntry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.SqlAclEntry) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int expirationCase_ = 0; + private java.lang.Object expiration_; + + public ExpirationCase getExpirationCase() { + return ExpirationCase.forNumber(expirationCase_); + } + + public Builder clearExpiration() { + expirationCase_ = 0; + expiration_ = null; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+     * The allowlisted value for the access control list.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The allowlisted value for the access control list.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The allowlisted value for the access control list.
+     * 
+ * + * string value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The allowlisted value for the access control list.
+     * 
+ * + * string value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * + * + *
+     * The allowlisted value for the access control list.
+     * 
+ * + * string value = 1; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * The time when this access control entry expires in
+     * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+     * `2012-11-15T16:19:00.094Z`.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expirationCase_ == 10; + } + /** + * + * + *
+     * The time when this access control entry expires in
+     * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+     * `2012-11-15T16:19:00.094Z`.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + if (expirationCase_ == 10) { + return (com.google.protobuf.Timestamp) expiration_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (expirationCase_ == 10) { + return expireTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * The time when this access control entry expires in
+     * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+     * `2012-11-15T16:19:00.094Z`.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expiration_ = value; + onChanged(); + } else { + expireTimeBuilder_.setMessage(value); + } + expirationCase_ = 10; + return this; + } + /** + * + * + *
+     * The time when this access control entry expires in
+     * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+     * `2012-11-15T16:19:00.094Z`.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expiration_ = builderForValue.build(); + onChanged(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + expirationCase_ = 10; + return this; + } + /** + * + * + *
+     * The time when this access control entry expires in
+     * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+     * `2012-11-15T16:19:00.094Z`.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (expirationCase_ == 10 + && expiration_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + expiration_ = + com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) expiration_) + .mergeFrom(value) + .buildPartial(); + } else { + expiration_ = value; + } + onChanged(); + } else { + if (expirationCase_ == 10) { + expireTimeBuilder_.mergeFrom(value); + } + expireTimeBuilder_.setMessage(value); + } + expirationCase_ = 10; + return this; + } + /** + * + * + *
+     * The time when this access control entry expires in
+     * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+     * `2012-11-15T16:19:00.094Z`.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + */ + public Builder clearExpireTime() { + if (expireTimeBuilder_ == null) { + if (expirationCase_ == 10) { + expirationCase_ = 0; + expiration_ = null; + onChanged(); + } + } else { + if (expirationCase_ == 10) { + expirationCase_ = 0; + expiration_ = null; + } + expireTimeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The time when this access control entry expires in
+     * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+     * `2012-11-15T16:19:00.094Z`.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when this access control entry expires in
+     * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+     * `2012-11-15T16:19:00.094Z`.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if ((expirationCase_ == 10) && (expireTimeBuilder_ != null)) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + if (expirationCase_ == 10) { + return (com.google.protobuf.Timestamp) expiration_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * The time when this access control entry expires in
+     * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+     * `2012-11-15T16:19:00.094Z`.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + if (!(expirationCase_ == 10)) { + expiration_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) expiration_, getParentForChildren(), isClean()); + expiration_ = null; + } + expirationCase_ = 10; + onChanged(); + ; + return expireTimeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + ttlBuilder_; + /** + * + * + *
+     * Input only. The time-to-leave of this access control entry.
+     * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return Whether the ttl field is set. + */ + @java.lang.Override + public boolean hasTtl() { + return expirationCase_ == 11; + } + /** + * + * + *
+     * Input only. The time-to-leave of this access control entry.
+     * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The ttl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTtl() { + if (ttlBuilder_ == null) { + if (expirationCase_ == 11) { + return (com.google.protobuf.Duration) expiration_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (expirationCase_ == 11) { + return ttlBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + * + * + *
+     * Input only. The time-to-leave of this access control entry.
+     * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + public Builder setTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expiration_ = value; + onChanged(); + } else { + ttlBuilder_.setMessage(value); + } + expirationCase_ = 11; + return this; + } + /** + * + * + *
+     * Input only. The time-to-leave of this access control entry.
+     * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (ttlBuilder_ == null) { + expiration_ = builderForValue.build(); + onChanged(); + } else { + ttlBuilder_.setMessage(builderForValue.build()); + } + expirationCase_ = 11; + return this; + } + /** + * + * + *
+     * Input only. The time-to-leave of this access control entry.
+     * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + public Builder mergeTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (expirationCase_ == 11 + && expiration_ != com.google.protobuf.Duration.getDefaultInstance()) { + expiration_ = + com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) expiration_) + .mergeFrom(value) + .buildPartial(); + } else { + expiration_ = value; + } + onChanged(); + } else { + if (expirationCase_ == 11) { + ttlBuilder_.mergeFrom(value); + } + ttlBuilder_.setMessage(value); + } + expirationCase_ = 11; + return this; + } + /** + * + * + *
+     * Input only. The time-to-leave of this access control entry.
+     * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + public Builder clearTtl() { + if (ttlBuilder_ == null) { + if (expirationCase_ == 11) { + expirationCase_ = 0; + expiration_ = null; + onChanged(); + } + } else { + if (expirationCase_ == 11) { + expirationCase_ = 0; + expiration_ = null; + } + ttlBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Input only. The time-to-leave of this access control entry.
+     * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + public com.google.protobuf.Duration.Builder getTtlBuilder() { + return getTtlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. The time-to-leave of this access control entry.
+     * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + if ((expirationCase_ == 11) && (ttlBuilder_ != null)) { + return ttlBuilder_.getMessageOrBuilder(); + } else { + if (expirationCase_ == 11) { + return (com.google.protobuf.Duration) expiration_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + * + * + *
+     * Input only. The time-to-leave of this access control entry.
+     * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTtlFieldBuilder() { + if (ttlBuilder_ == null) { + if (!(expirationCase_ == 11)) { + expiration_ = com.google.protobuf.Duration.getDefaultInstance(); + } + ttlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) expiration_, getParentForChildren(), isClean()); + expiration_ = null; + } + expirationCase_ = 11; + onChanged(); + ; + return ttlBuilder_; + } + + private java.lang.Object label_ = ""; + /** + * + * + *
+     * A label to identify this entry.
+     * 
+ * + * string label = 3; + * + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A label to identify this entry.
+     * 
+ * + * string label = 3; + * + * @return The bytes for label. + */ + public com.google.protobuf.ByteString getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A label to identify this entry.
+     * 
+ * + * string label = 3; + * + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + label_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A label to identify this entry.
+     * 
+ * + * string label = 3; + * + * @return This builder for chaining. + */ + public Builder clearLabel() { + + label_ = getDefaultInstance().getLabel(); + onChanged(); + return this; + } + /** + * + * + *
+     * A label to identify this entry.
+     * 
+ * + * string label = 3; + * + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + label_ = 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.clouddms.v1.SqlAclEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.SqlAclEntry) + private static final com.google.cloud.clouddms.v1.SqlAclEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.SqlAclEntry(); + } + + public static com.google.cloud.clouddms.v1.SqlAclEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SqlAclEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SqlAclEntry(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.clouddms.v1.SqlAclEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlAclEntryOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlAclEntryOrBuilder.java new file mode 100644 index 00000000..807531b7 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlAclEntryOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface SqlAclEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.SqlAclEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The allowlisted value for the access control list.
+   * 
+ * + * string value = 1; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+   * The allowlisted value for the access control list.
+   * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+   * The time when this access control entry expires in
+   * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+   * `2012-11-15T16:19:00.094Z`.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * The time when this access control entry expires in
+   * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+   * `2012-11-15T16:19:00.094Z`.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * The time when this access control entry expires in
+   * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example:
+   * `2012-11-15T16:19:00.094Z`.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 10; + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * Input only. The time-to-leave of this access control entry.
+   * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return Whether the ttl field is set. + */ + boolean hasTtl(); + /** + * + * + *
+   * Input only. The time-to-leave of this access control entry.
+   * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The ttl. + */ + com.google.protobuf.Duration getTtl(); + /** + * + * + *
+   * Input only. The time-to-leave of this access control entry.
+   * 
+ * + * .google.protobuf.Duration ttl = 11 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + com.google.protobuf.DurationOrBuilder getTtlOrBuilder(); + + /** + * + * + *
+   * A label to identify this entry.
+   * 
+ * + * string label = 3; + * + * @return The label. + */ + java.lang.String getLabel(); + /** + * + * + *
+   * A label to identify this entry.
+   * 
+ * + * string label = 3; + * + * @return The bytes for label. + */ + com.google.protobuf.ByteString getLabelBytes(); + + public com.google.cloud.clouddms.v1.SqlAclEntry.ExpirationCase getExpirationCase(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlIpConfig.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlIpConfig.java new file mode 100644 index 00000000..5fd04bd0 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlIpConfig.java @@ -0,0 +1,1772 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * IP Management configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.SqlIpConfig} + */ +public final class SqlIpConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.SqlIpConfig) + SqlIpConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SqlIpConfig.newBuilder() to construct. + private SqlIpConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SqlIpConfig() { + privateNetwork_ = ""; + authorizedNetworks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SqlIpConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SqlIpConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.BoolValue.Builder subBuilder = null; + if (enableIpv4_ != null) { + subBuilder = enableIpv4_.toBuilder(); + } + enableIpv4_ = + input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(enableIpv4_); + enableIpv4_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + privateNetwork_ = s; + break; + } + case 26: + { + com.google.protobuf.BoolValue.Builder subBuilder = null; + if (requireSsl_ != null) { + subBuilder = requireSsl_.toBuilder(); + } + requireSsl_ = + input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(requireSsl_); + requireSsl_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + authorizedNetworks_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + authorizedNetworks_.add( + input.readMessage( + com.google.cloud.clouddms.v1.SqlAclEntry.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + authorizedNetworks_ = java.util.Collections.unmodifiableList(authorizedNetworks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlIpConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlIpConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.SqlIpConfig.class, + com.google.cloud.clouddms.v1.SqlIpConfig.Builder.class); + } + + public static final int ENABLE_IPV4_FIELD_NUMBER = 1; + private com.google.protobuf.BoolValue enableIpv4_; + /** + * + * + *
+   * Whether the instance should be assigned an IPv4 address or not.
+   * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + * + * @return Whether the enableIpv4 field is set. + */ + @java.lang.Override + public boolean hasEnableIpv4() { + return enableIpv4_ != null; + } + /** + * + * + *
+   * Whether the instance should be assigned an IPv4 address or not.
+   * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + * + * @return The enableIpv4. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getEnableIpv4() { + return enableIpv4_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enableIpv4_; + } + /** + * + * + *
+   * Whether the instance should be assigned an IPv4 address or not.
+   * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getEnableIpv4OrBuilder() { + return getEnableIpv4(); + } + + public static final int PRIVATE_NETWORK_FIELD_NUMBER = 2; + private volatile java.lang.Object privateNetwork_; + /** + * + * + *
+   * The resource link for the VPC network from which the Cloud SQL instance is
+   * accessible for private IP. For example,
+   * `/projects/myProject/global/networks/default`. This setting can
+   * be updated, but it cannot be removed after it is set.
+   * 
+ * + * string private_network = 2; + * + * @return The privateNetwork. + */ + @java.lang.Override + public java.lang.String getPrivateNetwork() { + java.lang.Object ref = privateNetwork_; + 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(); + privateNetwork_ = s; + return s; + } + } + /** + * + * + *
+   * The resource link for the VPC network from which the Cloud SQL instance is
+   * accessible for private IP. For example,
+   * `/projects/myProject/global/networks/default`. This setting can
+   * be updated, but it cannot be removed after it is set.
+   * 
+ * + * string private_network = 2; + * + * @return The bytes for privateNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrivateNetworkBytes() { + java.lang.Object ref = privateNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUIRE_SSL_FIELD_NUMBER = 3; + private com.google.protobuf.BoolValue requireSsl_; + /** + * + * + *
+   * Whether SSL connections over IP should be enforced or not.
+   * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + * + * @return Whether the requireSsl field is set. + */ + @java.lang.Override + public boolean hasRequireSsl() { + return requireSsl_ != null; + } + /** + * + * + *
+   * Whether SSL connections over IP should be enforced or not.
+   * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + * + * @return The requireSsl. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getRequireSsl() { + return requireSsl_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : requireSsl_; + } + /** + * + * + *
+   * Whether SSL connections over IP should be enforced or not.
+   * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getRequireSslOrBuilder() { + return getRequireSsl(); + } + + public static final int AUTHORIZED_NETWORKS_FIELD_NUMBER = 4; + private java.util.List authorizedNetworks_; + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + @java.lang.Override + public java.util.List getAuthorizedNetworksList() { + return authorizedNetworks_; + } + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + @java.lang.Override + public java.util.List + getAuthorizedNetworksOrBuilderList() { + return authorizedNetworks_; + } + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + @java.lang.Override + public int getAuthorizedNetworksCount() { + return authorizedNetworks_.size(); + } + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlAclEntry getAuthorizedNetworks(int index) { + return authorizedNetworks_.get(index); + } + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlAclEntryOrBuilder getAuthorizedNetworksOrBuilder( + int index) { + return authorizedNetworks_.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 (enableIpv4_ != null) { + output.writeMessage(1, getEnableIpv4()); + } + if (!getPrivateNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, privateNetwork_); + } + if (requireSsl_ != null) { + output.writeMessage(3, getRequireSsl()); + } + for (int i = 0; i < authorizedNetworks_.size(); i++) { + output.writeMessage(4, authorizedNetworks_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableIpv4_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEnableIpv4()); + } + if (!getPrivateNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, privateNetwork_); + } + if (requireSsl_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRequireSsl()); + } + for (int i = 0; i < authorizedNetworks_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, authorizedNetworks_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.clouddms.v1.SqlIpConfig)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.SqlIpConfig other = (com.google.cloud.clouddms.v1.SqlIpConfig) obj; + + if (hasEnableIpv4() != other.hasEnableIpv4()) return false; + if (hasEnableIpv4()) { + if (!getEnableIpv4().equals(other.getEnableIpv4())) return false; + } + if (!getPrivateNetwork().equals(other.getPrivateNetwork())) return false; + if (hasRequireSsl() != other.hasRequireSsl()) return false; + if (hasRequireSsl()) { + if (!getRequireSsl().equals(other.getRequireSsl())) return false; + } + if (!getAuthorizedNetworksList().equals(other.getAuthorizedNetworksList())) 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 (hasEnableIpv4()) { + hash = (37 * hash) + ENABLE_IPV4_FIELD_NUMBER; + hash = (53 * hash) + getEnableIpv4().hashCode(); + } + hash = (37 * hash) + PRIVATE_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getPrivateNetwork().hashCode(); + if (hasRequireSsl()) { + hash = (37 * hash) + REQUIRE_SSL_FIELD_NUMBER; + hash = (53 * hash) + getRequireSsl().hashCode(); + } + if (getAuthorizedNetworksCount() > 0) { + hash = (37 * hash) + AUTHORIZED_NETWORKS_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizedNetworksList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.SqlIpConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SqlIpConfig 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.clouddms.v1.SqlIpConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SqlIpConfig 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.clouddms.v1.SqlIpConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SqlIpConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.SqlIpConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SqlIpConfig 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.clouddms.v1.SqlIpConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SqlIpConfig 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.clouddms.v1.SqlIpConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SqlIpConfig 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.clouddms.v1.SqlIpConfig 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; + } + /** + * + * + *
+   * IP Management configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.SqlIpConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.SqlIpConfig) + com.google.cloud.clouddms.v1.SqlIpConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlIpConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlIpConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.SqlIpConfig.class, + com.google.cloud.clouddms.v1.SqlIpConfig.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.SqlIpConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAuthorizedNetworksFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (enableIpv4Builder_ == null) { + enableIpv4_ = null; + } else { + enableIpv4_ = null; + enableIpv4Builder_ = null; + } + privateNetwork_ = ""; + + if (requireSslBuilder_ == null) { + requireSsl_ = null; + } else { + requireSsl_ = null; + requireSslBuilder_ = null; + } + if (authorizedNetworksBuilder_ == null) { + authorizedNetworks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + authorizedNetworksBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SqlIpConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlIpConfig getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.SqlIpConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlIpConfig build() { + com.google.cloud.clouddms.v1.SqlIpConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SqlIpConfig buildPartial() { + com.google.cloud.clouddms.v1.SqlIpConfig result = + new com.google.cloud.clouddms.v1.SqlIpConfig(this); + int from_bitField0_ = bitField0_; + if (enableIpv4Builder_ == null) { + result.enableIpv4_ = enableIpv4_; + } else { + result.enableIpv4_ = enableIpv4Builder_.build(); + } + result.privateNetwork_ = privateNetwork_; + if (requireSslBuilder_ == null) { + result.requireSsl_ = requireSsl_; + } else { + result.requireSsl_ = requireSslBuilder_.build(); + } + if (authorizedNetworksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + authorizedNetworks_ = java.util.Collections.unmodifiableList(authorizedNetworks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.authorizedNetworks_ = authorizedNetworks_; + } else { + result.authorizedNetworks_ = authorizedNetworksBuilder_.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.clouddms.v1.SqlIpConfig) { + return mergeFrom((com.google.cloud.clouddms.v1.SqlIpConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.SqlIpConfig other) { + if (other == com.google.cloud.clouddms.v1.SqlIpConfig.getDefaultInstance()) return this; + if (other.hasEnableIpv4()) { + mergeEnableIpv4(other.getEnableIpv4()); + } + if (!other.getPrivateNetwork().isEmpty()) { + privateNetwork_ = other.privateNetwork_; + onChanged(); + } + if (other.hasRequireSsl()) { + mergeRequireSsl(other.getRequireSsl()); + } + if (authorizedNetworksBuilder_ == null) { + if (!other.authorizedNetworks_.isEmpty()) { + if (authorizedNetworks_.isEmpty()) { + authorizedNetworks_ = other.authorizedNetworks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAuthorizedNetworksIsMutable(); + authorizedNetworks_.addAll(other.authorizedNetworks_); + } + onChanged(); + } + } else { + if (!other.authorizedNetworks_.isEmpty()) { + if (authorizedNetworksBuilder_.isEmpty()) { + authorizedNetworksBuilder_.dispose(); + authorizedNetworksBuilder_ = null; + authorizedNetworks_ = other.authorizedNetworks_; + bitField0_ = (bitField0_ & ~0x00000001); + authorizedNetworksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAuthorizedNetworksFieldBuilder() + : null; + } else { + authorizedNetworksBuilder_.addAllMessages(other.authorizedNetworks_); + } + } + } + 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.clouddms.v1.SqlIpConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.SqlIpConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.BoolValue enableIpv4_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + enableIpv4Builder_; + /** + * + * + *
+     * Whether the instance should be assigned an IPv4 address or not.
+     * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + * + * @return Whether the enableIpv4 field is set. + */ + public boolean hasEnableIpv4() { + return enableIpv4Builder_ != null || enableIpv4_ != null; + } + /** + * + * + *
+     * Whether the instance should be assigned an IPv4 address or not.
+     * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + * + * @return The enableIpv4. + */ + public com.google.protobuf.BoolValue getEnableIpv4() { + if (enableIpv4Builder_ == null) { + return enableIpv4_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : enableIpv4_; + } else { + return enableIpv4Builder_.getMessage(); + } + } + /** + * + * + *
+     * Whether the instance should be assigned an IPv4 address or not.
+     * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + */ + public Builder setEnableIpv4(com.google.protobuf.BoolValue value) { + if (enableIpv4Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enableIpv4_ = value; + onChanged(); + } else { + enableIpv4Builder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Whether the instance should be assigned an IPv4 address or not.
+     * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + */ + public Builder setEnableIpv4(com.google.protobuf.BoolValue.Builder builderForValue) { + if (enableIpv4Builder_ == null) { + enableIpv4_ = builderForValue.build(); + onChanged(); + } else { + enableIpv4Builder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Whether the instance should be assigned an IPv4 address or not.
+     * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + */ + public Builder mergeEnableIpv4(com.google.protobuf.BoolValue value) { + if (enableIpv4Builder_ == null) { + if (enableIpv4_ != null) { + enableIpv4_ = + com.google.protobuf.BoolValue.newBuilder(enableIpv4_).mergeFrom(value).buildPartial(); + } else { + enableIpv4_ = value; + } + onChanged(); + } else { + enableIpv4Builder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Whether the instance should be assigned an IPv4 address or not.
+     * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + */ + public Builder clearEnableIpv4() { + if (enableIpv4Builder_ == null) { + enableIpv4_ = null; + onChanged(); + } else { + enableIpv4_ = null; + enableIpv4Builder_ = null; + } + + return this; + } + /** + * + * + *
+     * Whether the instance should be assigned an IPv4 address or not.
+     * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + */ + public com.google.protobuf.BoolValue.Builder getEnableIpv4Builder() { + + onChanged(); + return getEnableIpv4FieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Whether the instance should be assigned an IPv4 address or not.
+     * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + */ + public com.google.protobuf.BoolValueOrBuilder getEnableIpv4OrBuilder() { + if (enableIpv4Builder_ != null) { + return enableIpv4Builder_.getMessageOrBuilder(); + } else { + return enableIpv4_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : enableIpv4_; + } + } + /** + * + * + *
+     * Whether the instance should be assigned an IPv4 address or not.
+     * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getEnableIpv4FieldBuilder() { + if (enableIpv4Builder_ == null) { + enableIpv4Builder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getEnableIpv4(), getParentForChildren(), isClean()); + enableIpv4_ = null; + } + return enableIpv4Builder_; + } + + private java.lang.Object privateNetwork_ = ""; + /** + * + * + *
+     * The resource link for the VPC network from which the Cloud SQL instance is
+     * accessible for private IP. For example,
+     * `/projects/myProject/global/networks/default`. This setting can
+     * be updated, but it cannot be removed after it is set.
+     * 
+ * + * string private_network = 2; + * + * @return The privateNetwork. + */ + public java.lang.String getPrivateNetwork() { + java.lang.Object ref = privateNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource link for the VPC network from which the Cloud SQL instance is
+     * accessible for private IP. For example,
+     * `/projects/myProject/global/networks/default`. This setting can
+     * be updated, but it cannot be removed after it is set.
+     * 
+ * + * string private_network = 2; + * + * @return The bytes for privateNetwork. + */ + public com.google.protobuf.ByteString getPrivateNetworkBytes() { + java.lang.Object ref = privateNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource link for the VPC network from which the Cloud SQL instance is
+     * accessible for private IP. For example,
+     * `/projects/myProject/global/networks/default`. This setting can
+     * be updated, but it cannot be removed after it is set.
+     * 
+ * + * string private_network = 2; + * + * @param value The privateNetwork to set. + * @return This builder for chaining. + */ + public Builder setPrivateNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + privateNetwork_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource link for the VPC network from which the Cloud SQL instance is
+     * accessible for private IP. For example,
+     * `/projects/myProject/global/networks/default`. This setting can
+     * be updated, but it cannot be removed after it is set.
+     * 
+ * + * string private_network = 2; + * + * @return This builder for chaining. + */ + public Builder clearPrivateNetwork() { + + privateNetwork_ = getDefaultInstance().getPrivateNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource link for the VPC network from which the Cloud SQL instance is
+     * accessible for private IP. For example,
+     * `/projects/myProject/global/networks/default`. This setting can
+     * be updated, but it cannot be removed after it is set.
+     * 
+ * + * string private_network = 2; + * + * @param value The bytes for privateNetwork to set. + * @return This builder for chaining. + */ + public Builder setPrivateNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + privateNetwork_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue requireSsl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + requireSslBuilder_; + /** + * + * + *
+     * Whether SSL connections over IP should be enforced or not.
+     * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + * + * @return Whether the requireSsl field is set. + */ + public boolean hasRequireSsl() { + return requireSslBuilder_ != null || requireSsl_ != null; + } + /** + * + * + *
+     * Whether SSL connections over IP should be enforced or not.
+     * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + * + * @return The requireSsl. + */ + public com.google.protobuf.BoolValue getRequireSsl() { + if (requireSslBuilder_ == null) { + return requireSsl_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : requireSsl_; + } else { + return requireSslBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Whether SSL connections over IP should be enforced or not.
+     * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + */ + public Builder setRequireSsl(com.google.protobuf.BoolValue value) { + if (requireSslBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requireSsl_ = value; + onChanged(); + } else { + requireSslBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Whether SSL connections over IP should be enforced or not.
+     * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + */ + public Builder setRequireSsl(com.google.protobuf.BoolValue.Builder builderForValue) { + if (requireSslBuilder_ == null) { + requireSsl_ = builderForValue.build(); + onChanged(); + } else { + requireSslBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Whether SSL connections over IP should be enforced or not.
+     * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + */ + public Builder mergeRequireSsl(com.google.protobuf.BoolValue value) { + if (requireSslBuilder_ == null) { + if (requireSsl_ != null) { + requireSsl_ = + com.google.protobuf.BoolValue.newBuilder(requireSsl_).mergeFrom(value).buildPartial(); + } else { + requireSsl_ = value; + } + onChanged(); + } else { + requireSslBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Whether SSL connections over IP should be enforced or not.
+     * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + */ + public Builder clearRequireSsl() { + if (requireSslBuilder_ == null) { + requireSsl_ = null; + onChanged(); + } else { + requireSsl_ = null; + requireSslBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Whether SSL connections over IP should be enforced or not.
+     * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + */ + public com.google.protobuf.BoolValue.Builder getRequireSslBuilder() { + + onChanged(); + return getRequireSslFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Whether SSL connections over IP should be enforced or not.
+     * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + */ + public com.google.protobuf.BoolValueOrBuilder getRequireSslOrBuilder() { + if (requireSslBuilder_ != null) { + return requireSslBuilder_.getMessageOrBuilder(); + } else { + return requireSsl_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : requireSsl_; + } + } + /** + * + * + *
+     * Whether SSL connections over IP should be enforced or not.
+     * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getRequireSslFieldBuilder() { + if (requireSslBuilder_ == null) { + requireSslBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getRequireSsl(), getParentForChildren(), isClean()); + requireSsl_ = null; + } + return requireSslBuilder_; + } + + private java.util.List authorizedNetworks_ = + java.util.Collections.emptyList(); + + private void ensureAuthorizedNetworksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + authorizedNetworks_ = + new java.util.ArrayList(authorizedNetworks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.clouddms.v1.SqlAclEntry, + com.google.cloud.clouddms.v1.SqlAclEntry.Builder, + com.google.cloud.clouddms.v1.SqlAclEntryOrBuilder> + authorizedNetworksBuilder_; + + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public java.util.List getAuthorizedNetworksList() { + if (authorizedNetworksBuilder_ == null) { + return java.util.Collections.unmodifiableList(authorizedNetworks_); + } else { + return authorizedNetworksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public int getAuthorizedNetworksCount() { + if (authorizedNetworksBuilder_ == null) { + return authorizedNetworks_.size(); + } else { + return authorizedNetworksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public com.google.cloud.clouddms.v1.SqlAclEntry getAuthorizedNetworks(int index) { + if (authorizedNetworksBuilder_ == null) { + return authorizedNetworks_.get(index); + } else { + return authorizedNetworksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public Builder setAuthorizedNetworks( + int index, com.google.cloud.clouddms.v1.SqlAclEntry value) { + if (authorizedNetworksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizedNetworksIsMutable(); + authorizedNetworks_.set(index, value); + onChanged(); + } else { + authorizedNetworksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public Builder setAuthorizedNetworks( + int index, com.google.cloud.clouddms.v1.SqlAclEntry.Builder builderForValue) { + if (authorizedNetworksBuilder_ == null) { + ensureAuthorizedNetworksIsMutable(); + authorizedNetworks_.set(index, builderForValue.build()); + onChanged(); + } else { + authorizedNetworksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public Builder addAuthorizedNetworks(com.google.cloud.clouddms.v1.SqlAclEntry value) { + if (authorizedNetworksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizedNetworksIsMutable(); + authorizedNetworks_.add(value); + onChanged(); + } else { + authorizedNetworksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public Builder addAuthorizedNetworks( + int index, com.google.cloud.clouddms.v1.SqlAclEntry value) { + if (authorizedNetworksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizedNetworksIsMutable(); + authorizedNetworks_.add(index, value); + onChanged(); + } else { + authorizedNetworksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public Builder addAuthorizedNetworks( + com.google.cloud.clouddms.v1.SqlAclEntry.Builder builderForValue) { + if (authorizedNetworksBuilder_ == null) { + ensureAuthorizedNetworksIsMutable(); + authorizedNetworks_.add(builderForValue.build()); + onChanged(); + } else { + authorizedNetworksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public Builder addAuthorizedNetworks( + int index, com.google.cloud.clouddms.v1.SqlAclEntry.Builder builderForValue) { + if (authorizedNetworksBuilder_ == null) { + ensureAuthorizedNetworksIsMutable(); + authorizedNetworks_.add(index, builderForValue.build()); + onChanged(); + } else { + authorizedNetworksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public Builder addAllAuthorizedNetworks( + java.lang.Iterable values) { + if (authorizedNetworksBuilder_ == null) { + ensureAuthorizedNetworksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, authorizedNetworks_); + onChanged(); + } else { + authorizedNetworksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public Builder clearAuthorizedNetworks() { + if (authorizedNetworksBuilder_ == null) { + authorizedNetworks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + authorizedNetworksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public Builder removeAuthorizedNetworks(int index) { + if (authorizedNetworksBuilder_ == null) { + ensureAuthorizedNetworksIsMutable(); + authorizedNetworks_.remove(index); + onChanged(); + } else { + authorizedNetworksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public com.google.cloud.clouddms.v1.SqlAclEntry.Builder getAuthorizedNetworksBuilder( + int index) { + return getAuthorizedNetworksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public com.google.cloud.clouddms.v1.SqlAclEntryOrBuilder getAuthorizedNetworksOrBuilder( + int index) { + if (authorizedNetworksBuilder_ == null) { + return authorizedNetworks_.get(index); + } else { + return authorizedNetworksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public java.util.List + getAuthorizedNetworksOrBuilderList() { + if (authorizedNetworksBuilder_ != null) { + return authorizedNetworksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(authorizedNetworks_); + } + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public com.google.cloud.clouddms.v1.SqlAclEntry.Builder addAuthorizedNetworksBuilder() { + return getAuthorizedNetworksFieldBuilder() + .addBuilder(com.google.cloud.clouddms.v1.SqlAclEntry.getDefaultInstance()); + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public com.google.cloud.clouddms.v1.SqlAclEntry.Builder addAuthorizedNetworksBuilder( + int index) { + return getAuthorizedNetworksFieldBuilder() + .addBuilder(index, com.google.cloud.clouddms.v1.SqlAclEntry.getDefaultInstance()); + } + /** + * + * + *
+     * The list of external networks that are allowed to connect to the instance
+     * using the IP. See
+     * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+     * 'slash' notation (e.g. `192.168.100.0/24`).
+     * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + public java.util.List + getAuthorizedNetworksBuilderList() { + return getAuthorizedNetworksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.clouddms.v1.SqlAclEntry, + com.google.cloud.clouddms.v1.SqlAclEntry.Builder, + com.google.cloud.clouddms.v1.SqlAclEntryOrBuilder> + getAuthorizedNetworksFieldBuilder() { + if (authorizedNetworksBuilder_ == null) { + authorizedNetworksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.clouddms.v1.SqlAclEntry, + com.google.cloud.clouddms.v1.SqlAclEntry.Builder, + com.google.cloud.clouddms.v1.SqlAclEntryOrBuilder>( + authorizedNetworks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + authorizedNetworks_ = null; + } + return authorizedNetworksBuilder_; + } + + @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.clouddms.v1.SqlIpConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.SqlIpConfig) + private static final com.google.cloud.clouddms.v1.SqlIpConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.SqlIpConfig(); + } + + public static com.google.cloud.clouddms.v1.SqlIpConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SqlIpConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SqlIpConfig(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.clouddms.v1.SqlIpConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlIpConfigOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlIpConfigOrBuilder.java new file mode 100644 index 00000000..0999da0c --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SqlIpConfigOrBuilder.java @@ -0,0 +1,193 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface SqlIpConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.SqlIpConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether the instance should be assigned an IPv4 address or not.
+   * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + * + * @return Whether the enableIpv4 field is set. + */ + boolean hasEnableIpv4(); + /** + * + * + *
+   * Whether the instance should be assigned an IPv4 address or not.
+   * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + * + * @return The enableIpv4. + */ + com.google.protobuf.BoolValue getEnableIpv4(); + /** + * + * + *
+   * Whether the instance should be assigned an IPv4 address or not.
+   * 
+ * + * .google.protobuf.BoolValue enable_ipv4 = 1; + */ + com.google.protobuf.BoolValueOrBuilder getEnableIpv4OrBuilder(); + + /** + * + * + *
+   * The resource link for the VPC network from which the Cloud SQL instance is
+   * accessible for private IP. For example,
+   * `/projects/myProject/global/networks/default`. This setting can
+   * be updated, but it cannot be removed after it is set.
+   * 
+ * + * string private_network = 2; + * + * @return The privateNetwork. + */ + java.lang.String getPrivateNetwork(); + /** + * + * + *
+   * The resource link for the VPC network from which the Cloud SQL instance is
+   * accessible for private IP. For example,
+   * `/projects/myProject/global/networks/default`. This setting can
+   * be updated, but it cannot be removed after it is set.
+   * 
+ * + * string private_network = 2; + * + * @return The bytes for privateNetwork. + */ + com.google.protobuf.ByteString getPrivateNetworkBytes(); + + /** + * + * + *
+   * Whether SSL connections over IP should be enforced or not.
+   * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + * + * @return Whether the requireSsl field is set. + */ + boolean hasRequireSsl(); + /** + * + * + *
+   * Whether SSL connections over IP should be enforced or not.
+   * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + * + * @return The requireSsl. + */ + com.google.protobuf.BoolValue getRequireSsl(); + /** + * + * + *
+   * Whether SSL connections over IP should be enforced or not.
+   * 
+ * + * .google.protobuf.BoolValue require_ssl = 3; + */ + com.google.protobuf.BoolValueOrBuilder getRequireSslOrBuilder(); + + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + java.util.List getAuthorizedNetworksList(); + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + com.google.cloud.clouddms.v1.SqlAclEntry getAuthorizedNetworks(int index); + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + int getAuthorizedNetworksCount(); + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + java.util.List + getAuthorizedNetworksOrBuilderList(); + /** + * + * + *
+   * The list of external networks that are allowed to connect to the instance
+   * using the IP. See
+   * https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
+   * 'slash' notation (e.g. `192.168.100.0/24`).
+   * 
+ * + * repeated .google.cloud.clouddms.v1.SqlAclEntry authorized_networks = 4; + */ + com.google.cloud.clouddms.v1.SqlAclEntryOrBuilder getAuthorizedNetworksOrBuilder(int index); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SshScript.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SshScript.java new file mode 100644 index 00000000..1f535be0 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SshScript.java @@ -0,0 +1,633 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Response message for 'GenerateSshScript' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.SshScript} + */ +public final class SshScript extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.SshScript) + SshScriptOrBuilder { + private static final long serialVersionUID = 0L; + // Use SshScript.newBuilder() to construct. + private SshScript(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SshScript() { + script_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SshScript(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SshScript( + 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(); + + script_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_SshScript_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_SshScript_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.SshScript.class, + com.google.cloud.clouddms.v1.SshScript.Builder.class); + } + + public static final int SCRIPT_FIELD_NUMBER = 1; + private volatile java.lang.Object script_; + /** + * + * + *
+   * The ssh configuration script.
+   * 
+ * + * string script = 1; + * + * @return The script. + */ + @java.lang.Override + public java.lang.String getScript() { + java.lang.Object ref = script_; + 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(); + script_ = s; + return s; + } + } + /** + * + * + *
+   * The ssh configuration script.
+   * 
+ * + * string script = 1; + * + * @return The bytes for script. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScriptBytes() { + java.lang.Object ref = script_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + script_ = 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 (!getScriptBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, script_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getScriptBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, script_); + } + 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.clouddms.v1.SshScript)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.SshScript other = (com.google.cloud.clouddms.v1.SshScript) obj; + + if (!getScript().equals(other.getScript())) 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) + SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getScript().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.SshScript parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SshScript 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.clouddms.v1.SshScript parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SshScript 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.clouddms.v1.SshScript parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SshScript parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.SshScript parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SshScript 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.clouddms.v1.SshScript parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SshScript 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.clouddms.v1.SshScript parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SshScript 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.clouddms.v1.SshScript prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for 'GenerateSshScript' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.SshScript} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.SshScript) + com.google.cloud.clouddms.v1.SshScriptOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_SshScript_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_SshScript_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.SshScript.class, + com.google.cloud.clouddms.v1.SshScript.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.SshScript.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(); + script_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_SshScript_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SshScript getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.SshScript.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SshScript build() { + com.google.cloud.clouddms.v1.SshScript result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SshScript buildPartial() { + com.google.cloud.clouddms.v1.SshScript result = + new com.google.cloud.clouddms.v1.SshScript(this); + result.script_ = script_; + 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.clouddms.v1.SshScript) { + return mergeFrom((com.google.cloud.clouddms.v1.SshScript) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.SshScript other) { + if (other == com.google.cloud.clouddms.v1.SshScript.getDefaultInstance()) return this; + if (!other.getScript().isEmpty()) { + script_ = other.script_; + 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.clouddms.v1.SshScript parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.SshScript) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object script_ = ""; + /** + * + * + *
+     * The ssh configuration script.
+     * 
+ * + * string script = 1; + * + * @return The script. + */ + public java.lang.String getScript() { + java.lang.Object ref = script_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + script_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ssh configuration script.
+     * 
+ * + * string script = 1; + * + * @return The bytes for script. + */ + public com.google.protobuf.ByteString getScriptBytes() { + java.lang.Object ref = script_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + script_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ssh configuration script.
+     * 
+ * + * string script = 1; + * + * @param value The script to set. + * @return This builder for chaining. + */ + public Builder setScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + script_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The ssh configuration script.
+     * 
+ * + * string script = 1; + * + * @return This builder for chaining. + */ + public Builder clearScript() { + + script_ = getDefaultInstance().getScript(); + onChanged(); + return this; + } + /** + * + * + *
+     * The ssh configuration script.
+     * 
+ * + * string script = 1; + * + * @param value The bytes for script to set. + * @return This builder for chaining. + */ + public Builder setScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + script_ = 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.clouddms.v1.SshScript) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.SshScript) + private static final com.google.cloud.clouddms.v1.SshScript DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.SshScript(); + } + + public static com.google.cloud.clouddms.v1.SshScript getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SshScript parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SshScript(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.clouddms.v1.SshScript getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SshScriptOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SshScriptOrBuilder.java new file mode 100644 index 00000000..784cf07b --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SshScriptOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface SshScriptOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.SshScript) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The ssh configuration script.
+   * 
+ * + * string script = 1; + * + * @return The script. + */ + java.lang.String getScript(); + /** + * + * + *
+   * The ssh configuration script.
+   * 
+ * + * string script = 1; + * + * @return The bytes for script. + */ + com.google.protobuf.ByteString getScriptBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SslConfig.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SslConfig.java new file mode 100644 index 00000000..52780524 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SslConfig.java @@ -0,0 +1,1377 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * SSL configuration information.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.SslConfig} + */ +public final class SslConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.SslConfig) + SslConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SslConfig.newBuilder() to construct. + private SslConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SslConfig() { + type_ = 0; + clientKey_ = ""; + clientCertificate_ = ""; + caCertificate_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SslConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SslConfig( + 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 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + clientKey_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + clientCertificate_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + caCertificate_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SslConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SslConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.SslConfig.class, + com.google.cloud.clouddms.v1.SslConfig.Builder.class); + } + + /** + * + * + *
+   * Specifies The kind of ssl configuration used.
+   * 
+ * + * Protobuf enum {@code google.cloud.clouddms.v1.SslConfig.SslType} + */ + public enum SslType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * SSL_TYPE_UNSPECIFIED = 0; + */ + SSL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Only 'ca_certificate' specified.
+     * 
+ * + * SERVER_ONLY = 1; + */ + SERVER_ONLY(1), + /** + * + * + *
+     * Both server ('ca_certificate'), and client ('client_key',
+     * 'client_certificate') specified.
+     * 
+ * + * SERVER_CLIENT = 2; + */ + SERVER_CLIENT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * SSL_TYPE_UNSPECIFIED = 0; + */ + public static final int SSL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Only 'ca_certificate' specified.
+     * 
+ * + * SERVER_ONLY = 1; + */ + public static final int SERVER_ONLY_VALUE = 1; + /** + * + * + *
+     * Both server ('ca_certificate'), and client ('client_key',
+     * 'client_certificate') specified.
+     * 
+ * + * SERVER_CLIENT = 2; + */ + public static final int SERVER_CLIENT_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 SslType 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 SslType forNumber(int value) { + switch (value) { + case 0: + return SSL_TYPE_UNSPECIFIED; + case 1: + return SERVER_ONLY; + case 2: + return SERVER_CLIENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SslType findValueByNumber(int number) { + return SslType.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.clouddms.v1.SslConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final SslType[] VALUES = values(); + + public static SslType 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 SslType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.clouddms.v1.SslConfig.SslType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+   * Output only. The ssl config type according to 'client_key', 'client_certificate' and
+   * 'ca_certificate'.
+   * 
+ * + * + * .google.cloud.clouddms.v1.SslConfig.SslType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Output only. The ssl config type according to 'client_key', 'client_certificate' and
+   * 'ca_certificate'.
+   * 
+ * + * + * .google.cloud.clouddms.v1.SslConfig.SslType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SslConfig.SslType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.SslConfig.SslType result = + com.google.cloud.clouddms.v1.SslConfig.SslType.valueOf(type_); + return result == null ? com.google.cloud.clouddms.v1.SslConfig.SslType.UNRECOGNIZED : result; + } + + public static final int CLIENT_KEY_FIELD_NUMBER = 2; + private volatile java.lang.Object clientKey_; + /** + * + * + *
+   * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
+   * the Client Certificate. If this field is used then the 'client_certificate'
+   * field is mandatory.
+   * 
+ * + * string client_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The clientKey. + */ + @java.lang.Override + public java.lang.String getClientKey() { + java.lang.Object ref = clientKey_; + 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(); + clientKey_ = s; + return s; + } + } + /** + * + * + *
+   * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
+   * the Client Certificate. If this field is used then the 'client_certificate'
+   * field is mandatory.
+   * 
+ * + * string client_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for clientKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientKeyBytes() { + java.lang.Object ref = clientKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_CERTIFICATE_FIELD_NUMBER = 3; + private volatile java.lang.Object clientCertificate_; + /** + * + * + *
+   * Input only. The x509 PEM-encoded certificate that will be used by the replica to
+   * authenticate against the source database server.If this field is used then
+   * the 'client_key' field is mandatory.
+   * 
+ * + * string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The clientCertificate. + */ + @java.lang.Override + public java.lang.String getClientCertificate() { + java.lang.Object ref = clientCertificate_; + 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(); + clientCertificate_ = s; + return s; + } + } + /** + * + * + *
+   * Input only. The x509 PEM-encoded certificate that will be used by the replica to
+   * authenticate against the source database server.If this field is used then
+   * the 'client_key' field is mandatory.
+   * 
+ * + * string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for clientCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientCertificateBytes() { + java.lang.Object ref = clientCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CA_CERTIFICATE_FIELD_NUMBER = 4; + private volatile java.lang.Object caCertificate_; + /** + * + * + *
+   * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database
+   * server's certificate. The replica will use this certificate to verify
+   * it's connecting to the right host.
+   * 
+ * + * + * string ca_certificate = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The caCertificate. + */ + @java.lang.Override + public java.lang.String getCaCertificate() { + java.lang.Object ref = caCertificate_; + 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(); + caCertificate_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database
+   * server's certificate. The replica will use this certificate to verify
+   * it's connecting to the right host.
+   * 
+ * + * + * string ca_certificate = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for caCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCaCertificateBytes() { + java.lang.Object ref = caCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caCertificate_ = 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 (type_ != com.google.cloud.clouddms.v1.SslConfig.SslType.SSL_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (!getClientKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientKey_); + } + if (!getClientCertificateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clientCertificate_); + } + if (!getCaCertificateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, caCertificate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.clouddms.v1.SslConfig.SslType.SSL_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (!getClientKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientKey_); + } + if (!getClientCertificateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clientCertificate_); + } + if (!getCaCertificateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, caCertificate_); + } + 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.clouddms.v1.SslConfig)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.SslConfig other = (com.google.cloud.clouddms.v1.SslConfig) obj; + + if (type_ != other.type_) return false; + if (!getClientKey().equals(other.getClientKey())) return false; + if (!getClientCertificate().equals(other.getClientCertificate())) return false; + if (!getCaCertificate().equals(other.getCaCertificate())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + CLIENT_KEY_FIELD_NUMBER; + hash = (53 * hash) + getClientKey().hashCode(); + hash = (37 * hash) + CLIENT_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getClientCertificate().hashCode(); + hash = (37 * hash) + CA_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getCaCertificate().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.SslConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SslConfig 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.clouddms.v1.SslConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SslConfig 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.clouddms.v1.SslConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.SslConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.SslConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SslConfig 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.clouddms.v1.SslConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SslConfig 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.clouddms.v1.SslConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.SslConfig 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.clouddms.v1.SslConfig 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; + } + /** + * + * + *
+   * SSL configuration information.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.SslConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.SslConfig) + com.google.cloud.clouddms.v1.SslConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SslConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SslConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.SslConfig.class, + com.google.cloud.clouddms.v1.SslConfig.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.SslConfig.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(); + type_ = 0; + + clientKey_ = ""; + + clientCertificate_ = ""; + + caCertificate_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_SslConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SslConfig getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.SslConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SslConfig build() { + com.google.cloud.clouddms.v1.SslConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.SslConfig buildPartial() { + com.google.cloud.clouddms.v1.SslConfig result = + new com.google.cloud.clouddms.v1.SslConfig(this); + result.type_ = type_; + result.clientKey_ = clientKey_; + result.clientCertificate_ = clientCertificate_; + result.caCertificate_ = caCertificate_; + 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.clouddms.v1.SslConfig) { + return mergeFrom((com.google.cloud.clouddms.v1.SslConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.SslConfig other) { + if (other == com.google.cloud.clouddms.v1.SslConfig.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getClientKey().isEmpty()) { + clientKey_ = other.clientKey_; + onChanged(); + } + if (!other.getClientCertificate().isEmpty()) { + clientCertificate_ = other.clientCertificate_; + onChanged(); + } + if (!other.getCaCertificate().isEmpty()) { + caCertificate_ = other.caCertificate_; + 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.clouddms.v1.SslConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.SslConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Output only. The ssl config type according to 'client_key', 'client_certificate' and
+     * 'ca_certificate'.
+     * 
+ * + * + * .google.cloud.clouddms.v1.SslConfig.SslType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Output only. The ssl config type according to 'client_key', 'client_certificate' and
+     * 'ca_certificate'.
+     * 
+ * + * + * .google.cloud.clouddms.v1.SslConfig.SslType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ssl config type according to 'client_key', 'client_certificate' and
+     * 'ca_certificate'.
+     * 
+ * + * + * .google.cloud.clouddms.v1.SslConfig.SslType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.SslConfig.SslType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.clouddms.v1.SslConfig.SslType result = + com.google.cloud.clouddms.v1.SslConfig.SslType.valueOf(type_); + return result == null ? com.google.cloud.clouddms.v1.SslConfig.SslType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The ssl config type according to 'client_key', 'client_certificate' and
+     * 'ca_certificate'.
+     * 
+ * + * + * .google.cloud.clouddms.v1.SslConfig.SslType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.clouddms.v1.SslConfig.SslType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ssl config type according to 'client_key', 'client_certificate' and
+     * 'ca_certificate'.
+     * 
+ * + * + * .google.cloud.clouddms.v1.SslConfig.SslType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object clientKey_ = ""; + /** + * + * + *
+     * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
+     * the Client Certificate. If this field is used then the 'client_certificate'
+     * field is mandatory.
+     * 
+ * + * string client_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The clientKey. + */ + public java.lang.String getClientKey() { + java.lang.Object ref = clientKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
+     * the Client Certificate. If this field is used then the 'client_certificate'
+     * field is mandatory.
+     * 
+ * + * string client_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for clientKey. + */ + public com.google.protobuf.ByteString getClientKeyBytes() { + java.lang.Object ref = clientKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
+     * the Client Certificate. If this field is used then the 'client_certificate'
+     * field is mandatory.
+     * 
+ * + * string client_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The clientKey to set. + * @return This builder for chaining. + */ + public Builder setClientKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clientKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
+     * the Client Certificate. If this field is used then the 'client_certificate'
+     * field is mandatory.
+     * 
+ * + * string client_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearClientKey() { + + clientKey_ = getDefaultInstance().getClientKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
+     * the Client Certificate. If this field is used then the 'client_certificate'
+     * field is mandatory.
+     * 
+ * + * string client_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes for clientKey to set. + * @return This builder for chaining. + */ + public Builder setClientKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clientKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object clientCertificate_ = ""; + /** + * + * + *
+     * Input only. The x509 PEM-encoded certificate that will be used by the replica to
+     * authenticate against the source database server.If this field is used then
+     * the 'client_key' field is mandatory.
+     * 
+ * + * string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The clientCertificate. + */ + public java.lang.String getClientCertificate() { + java.lang.Object ref = clientCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Input only. The x509 PEM-encoded certificate that will be used by the replica to
+     * authenticate against the source database server.If this field is used then
+     * the 'client_key' field is mandatory.
+     * 
+ * + * string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for clientCertificate. + */ + public com.google.protobuf.ByteString getClientCertificateBytes() { + java.lang.Object ref = clientCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Input only. The x509 PEM-encoded certificate that will be used by the replica to
+     * authenticate against the source database server.If this field is used then
+     * the 'client_key' field is mandatory.
+     * 
+ * + * string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The clientCertificate to set. + * @return This builder for chaining. + */ + public Builder setClientCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clientCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The x509 PEM-encoded certificate that will be used by the replica to
+     * authenticate against the source database server.If this field is used then
+     * the 'client_key' field is mandatory.
+     * 
+ * + * string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearClientCertificate() { + + clientCertificate_ = getDefaultInstance().getClientCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The x509 PEM-encoded certificate that will be used by the replica to
+     * authenticate against the source database server.If this field is used then
+     * the 'client_key' field is mandatory.
+     * 
+ * + * string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes for clientCertificate to set. + * @return This builder for chaining. + */ + public Builder setClientCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clientCertificate_ = value; + onChanged(); + return this; + } + + private java.lang.Object caCertificate_ = ""; + /** + * + * + *
+     * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database
+     * server's certificate. The replica will use this certificate to verify
+     * it's connecting to the right host.
+     * 
+ * + * + * string ca_certificate = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The caCertificate. + */ + public java.lang.String getCaCertificate() { + java.lang.Object ref = caCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + caCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database
+     * server's certificate. The replica will use this certificate to verify
+     * it's connecting to the right host.
+     * 
+ * + * + * string ca_certificate = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for caCertificate. + */ + public com.google.protobuf.ByteString getCaCertificateBytes() { + java.lang.Object ref = caCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database
+     * server's certificate. The replica will use this certificate to verify
+     * it's connecting to the right host.
+     * 
+ * + * + * string ca_certificate = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The caCertificate to set. + * @return This builder for chaining. + */ + public Builder setCaCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + caCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database
+     * server's certificate. The replica will use this certificate to verify
+     * it's connecting to the right host.
+     * 
+ * + * + * string ca_certificate = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearCaCertificate() { + + caCertificate_ = getDefaultInstance().getCaCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database
+     * server's certificate. The replica will use this certificate to verify
+     * it's connecting to the right host.
+     * 
+ * + * + * string ca_certificate = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for caCertificate to set. + * @return This builder for chaining. + */ + public Builder setCaCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + caCertificate_ = 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.clouddms.v1.SslConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.SslConfig) + private static final com.google.cloud.clouddms.v1.SslConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.SslConfig(); + } + + public static com.google.cloud.clouddms.v1.SslConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SslConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SslConfig(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.clouddms.v1.SslConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SslConfigOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SslConfigOrBuilder.java new file mode 100644 index 00000000..c6ff8122 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/SslConfigOrBuilder.java @@ -0,0 +1,147 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface SslConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.SslConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The ssl config type according to 'client_key', 'client_certificate' and
+   * 'ca_certificate'.
+   * 
+ * + * + * .google.cloud.clouddms.v1.SslConfig.SslType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Output only. The ssl config type according to 'client_key', 'client_certificate' and
+   * 'ca_certificate'.
+   * 
+ * + * + * .google.cloud.clouddms.v1.SslConfig.SslType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.cloud.clouddms.v1.SslConfig.SslType getType(); + + /** + * + * + *
+   * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
+   * the Client Certificate. If this field is used then the 'client_certificate'
+   * field is mandatory.
+   * 
+ * + * string client_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The clientKey. + */ + java.lang.String getClientKey(); + /** + * + * + *
+   * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
+   * the Client Certificate. If this field is used then the 'client_certificate'
+   * field is mandatory.
+   * 
+ * + * string client_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for clientKey. + */ + com.google.protobuf.ByteString getClientKeyBytes(); + + /** + * + * + *
+   * Input only. The x509 PEM-encoded certificate that will be used by the replica to
+   * authenticate against the source database server.If this field is used then
+   * the 'client_key' field is mandatory.
+   * 
+ * + * string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The clientCertificate. + */ + java.lang.String getClientCertificate(); + /** + * + * + *
+   * Input only. The x509 PEM-encoded certificate that will be used by the replica to
+   * authenticate against the source database server.If this field is used then
+   * the 'client_key' field is mandatory.
+   * 
+ * + * string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for clientCertificate. + */ + com.google.protobuf.ByteString getClientCertificateBytes(); + + /** + * + * + *
+   * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database
+   * server's certificate. The replica will use this certificate to verify
+   * it's connecting to the right host.
+   * 
+ * + * + * string ca_certificate = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The caCertificate. + */ + java.lang.String getCaCertificate(); + /** + * + * + *
+   * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database
+   * server's certificate. The replica will use this certificate to verify
+   * it's connecting to the right host.
+   * 
+ * + * + * string ca_certificate = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for caCertificate. + */ + com.google.protobuf.ByteString getCaCertificateBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StartMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StartMigrationJobRequest.java new file mode 100644 index 00000000..3e729c94 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StartMigrationJobRequest.java @@ -0,0 +1,637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'StartMigrationJob' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.StartMigrationJobRequest} + */ +public final class StartMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.StartMigrationJobRequest) + StartMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartMigrationJobRequest.newBuilder() to construct. + private StartMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartMigrationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StartMigrationJobRequest( + 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 (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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.StartMigrationJobRequest.class, + com.google.cloud.clouddms.v1.StartMigrationJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the migration job resource to start.
+   * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+   * Name of the migration job resource to start.
+   * 
+ * + * string name = 1 [(.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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.clouddms.v1.StartMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.StartMigrationJobRequest other = + (com.google.cloud.clouddms.v1.StartMigrationJobRequest) 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.clouddms.v1.StartMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.StartMigrationJobRequest 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.clouddms.v1.StartMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.StartMigrationJobRequest 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.clouddms.v1.StartMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.StartMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.StartMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.StartMigrationJobRequest 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.clouddms.v1.StartMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.StartMigrationJobRequest 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.clouddms.v1.StartMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.StartMigrationJobRequest 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.clouddms.v1.StartMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'StartMigrationJob' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.StartMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.StartMigrationJobRequest) + com.google.cloud.clouddms.v1.StartMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.StartMigrationJobRequest.class, + com.google.cloud.clouddms.v1.StartMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.StartMigrationJobRequest.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StartMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.StartMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.StartMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.StartMigrationJobRequest build() { + com.google.cloud.clouddms.v1.StartMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.StartMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.StartMigrationJobRequest result = + new com.google.cloud.clouddms.v1.StartMigrationJobRequest(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.clouddms.v1.StartMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.StartMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.StartMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.StartMigrationJobRequest.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.clouddms.v1.StartMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.StartMigrationJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the migration job resource to start.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to start.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to start.
+     * 
+ * + * string name = 1 [(.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; + } + /** + * + * + *
+     * Name of the migration job resource to start.
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the migration job resource to start.
+     * 
+ * + * string name = 1 [(.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.clouddms.v1.StartMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.StartMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.StartMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.StartMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.StartMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartMigrationJobRequest(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.clouddms.v1.StartMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StartMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StartMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..4fac61fc --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StartMigrationJobRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface StartMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.StartMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the migration job resource to start.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the migration job resource to start.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StaticIpConnectivity.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StaticIpConnectivity.java new file mode 100644 index 00000000..13061f01 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StaticIpConnectivity.java @@ -0,0 +1,462 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * The source database will allow incoming connections from the destination
+ * database's public IP. You can retrieve the Cloud SQL instance's public IP
+ * from the Cloud SQL console or using Cloud SQL APIs. No additional
+ * configuration is required.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.StaticIpConnectivity} + */ +public final class StaticIpConnectivity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.StaticIpConnectivity) + StaticIpConnectivityOrBuilder { + private static final long serialVersionUID = 0L; + // Use StaticIpConnectivity.newBuilder() to construct. + private StaticIpConnectivity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StaticIpConnectivity() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StaticIpConnectivity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StaticIpConnectivity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.StaticIpConnectivity.class, + com.google.cloud.clouddms.v1.StaticIpConnectivity.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.clouddms.v1.StaticIpConnectivity)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.StaticIpConnectivity other = + (com.google.cloud.clouddms.v1.StaticIpConnectivity) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.StaticIpConnectivity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.StaticIpConnectivity 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.clouddms.v1.StaticIpConnectivity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.StaticIpConnectivity 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.clouddms.v1.StaticIpConnectivity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.StaticIpConnectivity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.StaticIpConnectivity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.StaticIpConnectivity 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.clouddms.v1.StaticIpConnectivity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.StaticIpConnectivity 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.clouddms.v1.StaticIpConnectivity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.StaticIpConnectivity 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.clouddms.v1.StaticIpConnectivity 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; + } + /** + * + * + *
+   * The source database will allow incoming connections from the destination
+   * database's public IP. You can retrieve the Cloud SQL instance's public IP
+   * from the Cloud SQL console or using Cloud SQL APIs. No additional
+   * configuration is required.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.StaticIpConnectivity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.StaticIpConnectivity) + com.google.cloud.clouddms.v1.StaticIpConnectivityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.StaticIpConnectivity.class, + com.google.cloud.clouddms.v1.StaticIpConnectivity.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.StaticIpConnectivity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_StaticIpConnectivity_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.StaticIpConnectivity getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.StaticIpConnectivity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.StaticIpConnectivity build() { + com.google.cloud.clouddms.v1.StaticIpConnectivity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.StaticIpConnectivity buildPartial() { + com.google.cloud.clouddms.v1.StaticIpConnectivity result = + new com.google.cloud.clouddms.v1.StaticIpConnectivity(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.clouddms.v1.StaticIpConnectivity) { + return mergeFrom((com.google.cloud.clouddms.v1.StaticIpConnectivity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.StaticIpConnectivity other) { + if (other == com.google.cloud.clouddms.v1.StaticIpConnectivity.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.clouddms.v1.StaticIpConnectivity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.StaticIpConnectivity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.clouddms.v1.StaticIpConnectivity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.StaticIpConnectivity) + private static final com.google.cloud.clouddms.v1.StaticIpConnectivity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.StaticIpConnectivity(); + } + + public static com.google.cloud.clouddms.v1.StaticIpConnectivity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StaticIpConnectivity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StaticIpConnectivity(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.clouddms.v1.StaticIpConnectivity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StaticIpConnectivityOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StaticIpConnectivityOrBuilder.java new file mode 100644 index 00000000..58aced9d --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StaticIpConnectivityOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface StaticIpConnectivityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.StaticIpConnectivity) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StopMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StopMigrationJobRequest.java new file mode 100644 index 00000000..aed0dc33 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StopMigrationJobRequest.java @@ -0,0 +1,636 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'StopMigrationJob' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.StopMigrationJobRequest} + */ +public final class StopMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.StopMigrationJobRequest) + StopMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopMigrationJobRequest.newBuilder() to construct. + private StopMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopMigrationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StopMigrationJobRequest( + 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 (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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.StopMigrationJobRequest.class, + com.google.cloud.clouddms.v1.StopMigrationJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the migration job resource to stop.
+   * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+   * Name of the migration job resource to stop.
+   * 
+ * + * string name = 1 [(.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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.clouddms.v1.StopMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.StopMigrationJobRequest other = + (com.google.cloud.clouddms.v1.StopMigrationJobRequest) 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.clouddms.v1.StopMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.StopMigrationJobRequest 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.clouddms.v1.StopMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.StopMigrationJobRequest 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.clouddms.v1.StopMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.StopMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.StopMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.StopMigrationJobRequest 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.clouddms.v1.StopMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.StopMigrationJobRequest 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.clouddms.v1.StopMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.StopMigrationJobRequest 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.clouddms.v1.StopMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'StopMigrationJob' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.StopMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.StopMigrationJobRequest) + com.google.cloud.clouddms.v1.StopMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.StopMigrationJobRequest.class, + com.google.cloud.clouddms.v1.StopMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.StopMigrationJobRequest.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_StopMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.StopMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.StopMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.StopMigrationJobRequest build() { + com.google.cloud.clouddms.v1.StopMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.StopMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.StopMigrationJobRequest result = + new com.google.cloud.clouddms.v1.StopMigrationJobRequest(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.clouddms.v1.StopMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.StopMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.StopMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.StopMigrationJobRequest.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.clouddms.v1.StopMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.StopMigrationJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the migration job resource to stop.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to stop.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to stop.
+     * 
+ * + * string name = 1 [(.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; + } + /** + * + * + *
+     * Name of the migration job resource to stop.
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the migration job resource to stop.
+     * 
+ * + * string name = 1 [(.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.clouddms.v1.StopMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.StopMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.StopMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.StopMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.StopMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StopMigrationJobRequest(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.clouddms.v1.StopMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StopMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StopMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..d9648ba9 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/StopMigrationJobRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface StopMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.StopMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the migration job resource to stop.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the migration job resource to stop.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateConnectionProfileRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateConnectionProfileRequest.java new file mode 100644 index 00000000..874ff0aa --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateConnectionProfileRequest.java @@ -0,0 +1,1264 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'UpdateConnectionProfile' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.UpdateConnectionProfileRequest} + */ +public final class UpdateConnectionProfileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.UpdateConnectionProfileRequest) + UpdateConnectionProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateConnectionProfileRequest.newBuilder() to construct. + private UpdateConnectionProfileRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateConnectionProfileRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateConnectionProfileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateConnectionProfileRequest( + 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.clouddms.v1.ConnectionProfile.Builder subBuilder = null; + if (connectionProfile_ != null) { + subBuilder = connectionProfile_.toBuilder(); + } + connectionProfile_ = + input.readMessage( + com.google.cloud.clouddms.v1.ConnectionProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(connectionProfile_); + connectionProfile_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest.class, + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * connection profile resource by the update.
+   * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+   * connection profile resource by the update.
+   * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+   * connection profile resource by the update.
+   * 
+ * + * .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 CONNECTION_PROFILE_FIELD_NUMBER = 2; + private com.google.cloud.clouddms.v1.ConnectionProfile connectionProfile_; + /** + * + * + *
+   * Required. The connection profile parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the connectionProfile field is set. + */ + @java.lang.Override + public boolean hasConnectionProfile() { + return connectionProfile_ != null; + } + /** + * + * + *
+   * Required. The connection profile parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The connectionProfile. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfile() { + return connectionProfile_ == null + ? com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance() + : connectionProfile_; + } + /** + * + * + *
+   * Required. The connection profile parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder getConnectionProfileOrBuilder() { + return getConnectionProfile(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (connectionProfile_ != null) { + output.writeMessage(2, getConnectionProfile()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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 (connectionProfile_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConnectionProfile()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.clouddms.v1.UpdateConnectionProfileRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest other = + (com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasConnectionProfile() != other.hasConnectionProfile()) return false; + if (hasConnectionProfile()) { + if (!getConnectionProfile().equals(other.getConnectionProfile())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasConnectionProfile()) { + hash = (37 * hash) + CONNECTION_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getConnectionProfile().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest 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.clouddms.v1.UpdateConnectionProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest 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.clouddms.v1.UpdateConnectionProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest 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.clouddms.v1.UpdateConnectionProfileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest 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.clouddms.v1.UpdateConnectionProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest 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.clouddms.v1.UpdateConnectionProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'UpdateConnectionProfile' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.UpdateConnectionProfileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.UpdateConnectionProfileRequest) + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest.class, + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest.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 (connectionProfileBuilder_ == null) { + connectionProfile_ = null; + } else { + connectionProfile_ = null; + connectionProfileBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateConnectionProfileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest build() { + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest buildPartial() { + com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest result = + new com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest(this); + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + if (connectionProfileBuilder_ == null) { + result.connectionProfile_ = connectionProfile_; + } else { + result.connectionProfile_ = connectionProfileBuilder_.build(); + } + result.requestId_ = requestId_; + 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.clouddms.v1.UpdateConnectionProfileRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest other) { + if (other == com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasConnectionProfile()) { + mergeConnectionProfile(other.getConnectionProfile()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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.clouddms.v1.UpdateConnectionProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest) 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. Field mask is used to specify the fields to be overwritten in the
+     * connection profile resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * connection profile resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * connection profile resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * connection profile resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * connection profile resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * connection profile resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * connection profile resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * connection profile resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * connection profile resource by the update.
+     * 
+ * + * .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.clouddms.v1.ConnectionProfile connectionProfile_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.ConnectionProfile, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder, + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder> + connectionProfileBuilder_; + /** + * + * + *
+     * Required. The connection profile parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the connectionProfile field is set. + */ + public boolean hasConnectionProfile() { + return connectionProfileBuilder_ != null || connectionProfile_ != null; + } + /** + * + * + *
+     * Required. The connection profile parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The connectionProfile. + */ + public com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfile() { + if (connectionProfileBuilder_ == null) { + return connectionProfile_ == null + ? com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance() + : connectionProfile_; + } else { + return connectionProfileBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The connection profile parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConnectionProfile(com.google.cloud.clouddms.v1.ConnectionProfile value) { + if (connectionProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionProfile_ = value; + onChanged(); + } else { + connectionProfileBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The connection profile parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConnectionProfile( + com.google.cloud.clouddms.v1.ConnectionProfile.Builder builderForValue) { + if (connectionProfileBuilder_ == null) { + connectionProfile_ = builderForValue.build(); + onChanged(); + } else { + connectionProfileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The connection profile parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConnectionProfile(com.google.cloud.clouddms.v1.ConnectionProfile value) { + if (connectionProfileBuilder_ == null) { + if (connectionProfile_ != null) { + connectionProfile_ = + com.google.cloud.clouddms.v1.ConnectionProfile.newBuilder(connectionProfile_) + .mergeFrom(value) + .buildPartial(); + } else { + connectionProfile_ = value; + } + onChanged(); + } else { + connectionProfileBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The connection profile parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConnectionProfile() { + if (connectionProfileBuilder_ == null) { + connectionProfile_ = null; + onChanged(); + } else { + connectionProfile_ = null; + connectionProfileBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The connection profile parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.clouddms.v1.ConnectionProfile.Builder getConnectionProfileBuilder() { + + onChanged(); + return getConnectionProfileFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The connection profile parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder getConnectionProfileOrBuilder() { + if (connectionProfileBuilder_ != null) { + return connectionProfileBuilder_.getMessageOrBuilder(); + } else { + return connectionProfile_ == null + ? com.google.cloud.clouddms.v1.ConnectionProfile.getDefaultInstance() + : connectionProfile_; + } + } + /** + * + * + *
+     * Required. The connection profile parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.ConnectionProfile, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder, + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder> + getConnectionProfileFieldBuilder() { + if (connectionProfileBuilder_ == null) { + connectionProfileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.ConnectionProfile, + com.google.cloud.clouddms.v1.ConnectionProfile.Builder, + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder>( + getConnectionProfile(), getParentForChildren(), isClean()); + connectionProfile_ = null; + } + return connectionProfileBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = 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.clouddms.v1.UpdateConnectionProfileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.UpdateConnectionProfileRequest) + private static final com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest(); + } + + public static com.google.cloud.clouddms.v1.UpdateConnectionProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateConnectionProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateConnectionProfileRequest(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.clouddms.v1.UpdateConnectionProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateConnectionProfileRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateConnectionProfileRequestOrBuilder.java new file mode 100644 index 00000000..03ca5e59 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateConnectionProfileRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface UpdateConnectionProfileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.UpdateConnectionProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * connection profile resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * connection profile resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * connection profile resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The connection profile parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the connectionProfile field is set. + */ + boolean hasConnectionProfile(); + /** + * + * + *
+   * Required. The connection profile parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The connectionProfile. + */ + com.google.cloud.clouddms.v1.ConnectionProfile getConnectionProfile(); + /** + * + * + *
+   * Required. The connection profile parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.clouddms.v1.ConnectionProfileOrBuilder getConnectionProfileOrBuilder(); + + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateMigrationJobRequest.java new file mode 100644 index 00000000..33b77c9a --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateMigrationJobRequest.java @@ -0,0 +1,1263 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'UpdateMigrationJob' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.UpdateMigrationJobRequest} + */ +public final class UpdateMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.UpdateMigrationJobRequest) + UpdateMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateMigrationJobRequest.newBuilder() to construct. + private UpdateMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateMigrationJobRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateMigrationJobRequest( + 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.clouddms.v1.MigrationJob.Builder subBuilder = null; + if (migrationJob_ != null) { + subBuilder = migrationJob_.toBuilder(); + } + migrationJob_ = + input.readMessage( + com.google.cloud.clouddms.v1.MigrationJob.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(migrationJob_); + migrationJob_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest.class, + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * migration job resource by the update.
+   * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+   * migration job resource by the update.
+   * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+   * migration job resource by the update.
+   * 
+ * + * .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 MIGRATION_JOB_FIELD_NUMBER = 2; + private com.google.cloud.clouddms.v1.MigrationJob migrationJob_; + /** + * + * + *
+   * Required. The migration job parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the migrationJob field is set. + */ + @java.lang.Override + public boolean hasMigrationJob() { + return migrationJob_ != null; + } + /** + * + * + *
+   * Required. The migration job parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The migrationJob. + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJob getMigrationJob() { + return migrationJob_ == null + ? com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance() + : migrationJob_; + } + /** + * + * + *
+   * Required. The migration job parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.clouddms.v1.MigrationJobOrBuilder getMigrationJobOrBuilder() { + return getMigrationJob(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (migrationJob_ != null) { + output.writeMessage(2, getMigrationJob()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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 (migrationJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMigrationJob()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.clouddms.v1.UpdateMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest other = + (com.google.cloud.clouddms.v1.UpdateMigrationJobRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasMigrationJob() != other.hasMigrationJob()) return false; + if (hasMigrationJob()) { + if (!getMigrationJob().equals(other.getMigrationJob())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasMigrationJob()) { + hash = (37 * hash) + MIGRATION_JOB_FIELD_NUMBER; + hash = (53 * hash) + getMigrationJob().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.UpdateMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.UpdateMigrationJobRequest 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.clouddms.v1.UpdateMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.UpdateMigrationJobRequest 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.clouddms.v1.UpdateMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.UpdateMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.UpdateMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.UpdateMigrationJobRequest 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.clouddms.v1.UpdateMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.UpdateMigrationJobRequest 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.clouddms.v1.UpdateMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.UpdateMigrationJobRequest 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.clouddms.v1.UpdateMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'UpdateMigrationJob' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.UpdateMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.UpdateMigrationJobRequest) + com.google.cloud.clouddms.v1.UpdateMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest.class, + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.UpdateMigrationJobRequest.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 (migrationJobBuilder_ == null) { + migrationJob_ = null; + } else { + migrationJob_ = null; + migrationJobBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_UpdateMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.UpdateMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.UpdateMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.UpdateMigrationJobRequest build() { + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.UpdateMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.UpdateMigrationJobRequest result = + new com.google.cloud.clouddms.v1.UpdateMigrationJobRequest(this); + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + if (migrationJobBuilder_ == null) { + result.migrationJob_ = migrationJob_; + } else { + result.migrationJob_ = migrationJobBuilder_.build(); + } + result.requestId_ = requestId_; + 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.clouddms.v1.UpdateMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.UpdateMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.UpdateMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.UpdateMigrationJobRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasMigrationJob()) { + mergeMigrationJob(other.getMigrationJob()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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.clouddms.v1.UpdateMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.UpdateMigrationJobRequest) 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. Field mask is used to specify the fields to be overwritten in the
+     * migration job resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * migration job resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * migration job resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * migration job resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * migration job resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * migration job resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * migration job resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * migration job resource by the update.
+     * 
+ * + * .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. Field mask is used to specify the fields to be overwritten in the
+     * migration job resource by the update.
+     * 
+ * + * .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.clouddms.v1.MigrationJob migrationJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.MigrationJob, + com.google.cloud.clouddms.v1.MigrationJob.Builder, + com.google.cloud.clouddms.v1.MigrationJobOrBuilder> + migrationJobBuilder_; + /** + * + * + *
+     * Required. The migration job parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the migrationJob field is set. + */ + public boolean hasMigrationJob() { + return migrationJobBuilder_ != null || migrationJob_ != null; + } + /** + * + * + *
+     * Required. The migration job parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The migrationJob. + */ + public com.google.cloud.clouddms.v1.MigrationJob getMigrationJob() { + if (migrationJobBuilder_ == null) { + return migrationJob_ == null + ? com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance() + : migrationJob_; + } else { + return migrationJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The migration job parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMigrationJob(com.google.cloud.clouddms.v1.MigrationJob value) { + if (migrationJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + migrationJob_ = value; + onChanged(); + } else { + migrationJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The migration job parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMigrationJob( + com.google.cloud.clouddms.v1.MigrationJob.Builder builderForValue) { + if (migrationJobBuilder_ == null) { + migrationJob_ = builderForValue.build(); + onChanged(); + } else { + migrationJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The migration job parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMigrationJob(com.google.cloud.clouddms.v1.MigrationJob value) { + if (migrationJobBuilder_ == null) { + if (migrationJob_ != null) { + migrationJob_ = + com.google.cloud.clouddms.v1.MigrationJob.newBuilder(migrationJob_) + .mergeFrom(value) + .buildPartial(); + } else { + migrationJob_ = value; + } + onChanged(); + } else { + migrationJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The migration job parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMigrationJob() { + if (migrationJobBuilder_ == null) { + migrationJob_ = null; + onChanged(); + } else { + migrationJob_ = null; + migrationJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The migration job parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.clouddms.v1.MigrationJob.Builder getMigrationJobBuilder() { + + onChanged(); + return getMigrationJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The migration job parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.clouddms.v1.MigrationJobOrBuilder getMigrationJobOrBuilder() { + if (migrationJobBuilder_ != null) { + return migrationJobBuilder_.getMessageOrBuilder(); + } else { + return migrationJob_ == null + ? com.google.cloud.clouddms.v1.MigrationJob.getDefaultInstance() + : migrationJob_; + } + } + /** + * + * + *
+     * Required. The migration job parameters to update.
+     * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.MigrationJob, + com.google.cloud.clouddms.v1.MigrationJob.Builder, + com.google.cloud.clouddms.v1.MigrationJobOrBuilder> + getMigrationJobFieldBuilder() { + if (migrationJobBuilder_ == null) { + migrationJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.clouddms.v1.MigrationJob, + com.google.cloud.clouddms.v1.MigrationJob.Builder, + com.google.cloud.clouddms.v1.MigrationJobOrBuilder>( + getMigrationJob(), getParentForChildren(), isClean()); + migrationJob_ = null; + } + return migrationJobBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id used to identify the request. If the server receives two
+     * requests with the same id, then the second request will be ignored.
+     * It is recommended to always set this value to a UUID.
+     * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+     * (_), and hyphens (-). The maximum length is 40 characters.
+     * 
+ * + * string request_id = 3; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = 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.clouddms.v1.UpdateMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.UpdateMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.UpdateMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.UpdateMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.UpdateMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateMigrationJobRequest(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.clouddms.v1.UpdateMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..59e76896 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/UpdateMigrationJobRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface UpdateMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.UpdateMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * migration job resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * migration job resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * migration job resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The migration job parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the migrationJob field is set. + */ + boolean hasMigrationJob(); + /** + * + * + *
+   * Required. The migration job parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The migrationJob. + */ + com.google.cloud.clouddms.v1.MigrationJob getMigrationJob(); + /** + * + * + *
+   * Required. The migration job parameters to update.
+   * 
+ * + * + * .google.cloud.clouddms.v1.MigrationJob migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.clouddms.v1.MigrationJobOrBuilder getMigrationJobOrBuilder(); + + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique id used to identify the request. If the server receives two
+   * requests with the same id, then the second request will be ignored.
+   * It is recommended to always set this value to a UUID.
+   * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
+   * (_), and hyphens (-). The maximum length is 40 characters.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VerifyMigrationJobRequest.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VerifyMigrationJobRequest.java new file mode 100644 index 00000000..06219510 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VerifyMigrationJobRequest.java @@ -0,0 +1,637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * Request message for 'VerifyMigrationJob' request.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.VerifyMigrationJobRequest} + */ +public final class VerifyMigrationJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.VerifyMigrationJobRequest) + VerifyMigrationJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use VerifyMigrationJobRequest.newBuilder() to construct. + private VerifyMigrationJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VerifyMigrationJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VerifyMigrationJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VerifyMigrationJobRequest( + 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 (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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest.class, + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the migration job resource to verify.
+   * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+   * Name of the migration job resource to verify.
+   * 
+ * + * string name = 1 [(.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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.clouddms.v1.VerifyMigrationJobRequest)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest other = + (com.google.cloud.clouddms.v1.VerifyMigrationJobRequest) 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.clouddms.v1.VerifyMigrationJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VerifyMigrationJobRequest 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.clouddms.v1.VerifyMigrationJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VerifyMigrationJobRequest 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.clouddms.v1.VerifyMigrationJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VerifyMigrationJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.VerifyMigrationJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VerifyMigrationJobRequest 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.clouddms.v1.VerifyMigrationJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VerifyMigrationJobRequest 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.clouddms.v1.VerifyMigrationJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VerifyMigrationJobRequest 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.clouddms.v1.VerifyMigrationJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'VerifyMigrationJob' request.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.VerifyMigrationJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.VerifyMigrationJobRequest) + com.google.cloud.clouddms.v1.VerifyMigrationJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest.class, + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.VerifyMigrationJobRequest.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VerifyMigrationJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VerifyMigrationJobRequest getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.VerifyMigrationJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VerifyMigrationJobRequest build() { + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VerifyMigrationJobRequest buildPartial() { + com.google.cloud.clouddms.v1.VerifyMigrationJobRequest result = + new com.google.cloud.clouddms.v1.VerifyMigrationJobRequest(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.clouddms.v1.VerifyMigrationJobRequest) { + return mergeFrom((com.google.cloud.clouddms.v1.VerifyMigrationJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.VerifyMigrationJobRequest other) { + if (other == com.google.cloud.clouddms.v1.VerifyMigrationJobRequest.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.clouddms.v1.VerifyMigrationJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.VerifyMigrationJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the migration job resource to verify.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to verify.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * Name of the migration job resource to verify.
+     * 
+ * + * string name = 1 [(.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; + } + /** + * + * + *
+     * Name of the migration job resource to verify.
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the migration job resource to verify.
+     * 
+ * + * string name = 1 [(.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.clouddms.v1.VerifyMigrationJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.VerifyMigrationJobRequest) + private static final com.google.cloud.clouddms.v1.VerifyMigrationJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.VerifyMigrationJobRequest(); + } + + public static com.google.cloud.clouddms.v1.VerifyMigrationJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VerifyMigrationJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VerifyMigrationJobRequest(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.clouddms.v1.VerifyMigrationJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VerifyMigrationJobRequestOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VerifyMigrationJobRequestOrBuilder.java new file mode 100644 index 00000000..99fa7d9b --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VerifyMigrationJobRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface VerifyMigrationJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.VerifyMigrationJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the migration job resource to verify.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the migration job resource to verify.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmCreationConfig.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmCreationConfig.java new file mode 100644 index 00000000..92bcfbe4 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmCreationConfig.java @@ -0,0 +1,992 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * VM creation configuration message
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.VmCreationConfig} + */ +public final class VmCreationConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.VmCreationConfig) + VmCreationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use VmCreationConfig.newBuilder() to construct. + private VmCreationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VmCreationConfig() { + vmMachineType_ = ""; + vmZone_ = ""; + subnet_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VmCreationConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VmCreationConfig( + 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(); + + vmMachineType_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmZone_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnet_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmCreationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmCreationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.VmCreationConfig.class, + com.google.cloud.clouddms.v1.VmCreationConfig.Builder.class); + } + + public static final int VM_MACHINE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object vmMachineType_; + /** + * + * + *
+   * Required. VM instance machine type to create.
+   * 
+ * + * string vm_machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmMachineType. + */ + @java.lang.Override + public java.lang.String getVmMachineType() { + java.lang.Object ref = vmMachineType_; + 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(); + vmMachineType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. VM instance machine type to create.
+   * 
+ * + * string vm_machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmMachineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmMachineTypeBytes() { + java.lang.Object ref = vmMachineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmMachineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_ZONE_FIELD_NUMBER = 2; + private volatile java.lang.Object vmZone_; + /** + * + * + *
+   * The Google Cloud Platform zone to create the VM in.
+   * 
+ * + * string vm_zone = 2; + * + * @return The vmZone. + */ + @java.lang.Override + public java.lang.String getVmZone() { + java.lang.Object ref = vmZone_; + 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(); + vmZone_ = s; + return s; + } + } + /** + * + * + *
+   * The Google Cloud Platform zone to create the VM in.
+   * 
+ * + * string vm_zone = 2; + * + * @return The bytes for vmZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmZoneBytes() { + java.lang.Object ref = vmZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNET_FIELD_NUMBER = 3; + private volatile java.lang.Object subnet_; + /** + * + * + *
+   * The subnet name the vm needs to be created in.
+   * 
+ * + * string subnet = 3; + * + * @return The subnet. + */ + @java.lang.Override + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + 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(); + subnet_ = s; + return s; + } + } + /** + * + * + *
+   * The subnet name the vm needs to be created in.
+   * 
+ * + * string subnet = 3; + * + * @return The bytes for subnet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = 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 (!getVmMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vmMachineType_); + } + if (!getVmZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vmZone_); + } + if (!getSubnetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subnet_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVmMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vmMachineType_); + } + if (!getVmZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vmZone_); + } + if (!getSubnetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subnet_); + } + 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.clouddms.v1.VmCreationConfig)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.VmCreationConfig other = + (com.google.cloud.clouddms.v1.VmCreationConfig) obj; + + if (!getVmMachineType().equals(other.getVmMachineType())) return false; + if (!getVmZone().equals(other.getVmZone())) return false; + if (!getSubnet().equals(other.getSubnet())) 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) + VM_MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getVmMachineType().hashCode(); + hash = (37 * hash) + VM_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getVmZone().hashCode(); + hash = (37 * hash) + SUBNET_FIELD_NUMBER; + hash = (53 * hash) + getSubnet().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.VmCreationConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VmCreationConfig 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.clouddms.v1.VmCreationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VmCreationConfig 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.clouddms.v1.VmCreationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VmCreationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.VmCreationConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VmCreationConfig 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.clouddms.v1.VmCreationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VmCreationConfig 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.clouddms.v1.VmCreationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VmCreationConfig 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.clouddms.v1.VmCreationConfig 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; + } + /** + * + * + *
+   * VM creation configuration message
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.VmCreationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.VmCreationConfig) + com.google.cloud.clouddms.v1.VmCreationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmCreationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmCreationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.VmCreationConfig.class, + com.google.cloud.clouddms.v1.VmCreationConfig.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.VmCreationConfig.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(); + vmMachineType_ = ""; + + vmZone_ = ""; + + subnet_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmCreationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VmCreationConfig getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.VmCreationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VmCreationConfig build() { + com.google.cloud.clouddms.v1.VmCreationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VmCreationConfig buildPartial() { + com.google.cloud.clouddms.v1.VmCreationConfig result = + new com.google.cloud.clouddms.v1.VmCreationConfig(this); + result.vmMachineType_ = vmMachineType_; + result.vmZone_ = vmZone_; + result.subnet_ = subnet_; + 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.clouddms.v1.VmCreationConfig) { + return mergeFrom((com.google.cloud.clouddms.v1.VmCreationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.VmCreationConfig other) { + if (other == com.google.cloud.clouddms.v1.VmCreationConfig.getDefaultInstance()) return this; + if (!other.getVmMachineType().isEmpty()) { + vmMachineType_ = other.vmMachineType_; + onChanged(); + } + if (!other.getVmZone().isEmpty()) { + vmZone_ = other.vmZone_; + onChanged(); + } + if (!other.getSubnet().isEmpty()) { + subnet_ = other.subnet_; + 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.clouddms.v1.VmCreationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.VmCreationConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object vmMachineType_ = ""; + /** + * + * + *
+     * Required. VM instance machine type to create.
+     * 
+ * + * string vm_machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmMachineType. + */ + public java.lang.String getVmMachineType() { + java.lang.Object ref = vmMachineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmMachineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. VM instance machine type to create.
+     * 
+ * + * string vm_machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmMachineType. + */ + public com.google.protobuf.ByteString getVmMachineTypeBytes() { + java.lang.Object ref = vmMachineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmMachineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. VM instance machine type to create.
+     * 
+ * + * string vm_machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vmMachineType to set. + * @return This builder for chaining. + */ + public Builder setVmMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmMachineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. VM instance machine type to create.
+     * 
+ * + * string vm_machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVmMachineType() { + + vmMachineType_ = getDefaultInstance().getVmMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. VM instance machine type to create.
+     * 
+ * + * string vm_machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for vmMachineType to set. + * @return This builder for chaining. + */ + public Builder setVmMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmMachineType_ = value; + onChanged(); + return this; + } + + private java.lang.Object vmZone_ = ""; + /** + * + * + *
+     * The Google Cloud Platform zone to create the VM in.
+     * 
+ * + * string vm_zone = 2; + * + * @return The vmZone. + */ + public java.lang.String getVmZone() { + java.lang.Object ref = vmZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Google Cloud Platform zone to create the VM in.
+     * 
+ * + * string vm_zone = 2; + * + * @return The bytes for vmZone. + */ + public com.google.protobuf.ByteString getVmZoneBytes() { + java.lang.Object ref = vmZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Google Cloud Platform zone to create the VM in.
+     * 
+ * + * string vm_zone = 2; + * + * @param value The vmZone to set. + * @return This builder for chaining. + */ + public Builder setVmZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmZone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Platform zone to create the VM in.
+     * 
+ * + * string vm_zone = 2; + * + * @return This builder for chaining. + */ + public Builder clearVmZone() { + + vmZone_ = getDefaultInstance().getVmZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google Cloud Platform zone to create the VM in.
+     * 
+ * + * string vm_zone = 2; + * + * @param value The bytes for vmZone to set. + * @return This builder for chaining. + */ + public Builder setVmZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmZone_ = value; + onChanged(); + return this; + } + + private java.lang.Object subnet_ = ""; + /** + * + * + *
+     * The subnet name the vm needs to be created in.
+     * 
+ * + * string subnet = 3; + * + * @return The subnet. + */ + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The subnet name the vm needs to be created in.
+     * 
+ * + * string subnet = 3; + * + * @return The bytes for subnet. + */ + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The subnet name the vm needs to be created in.
+     * 
+ * + * string subnet = 3; + * + * @param value The subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The subnet name the vm needs to be created in.
+     * 
+ * + * string subnet = 3; + * + * @return This builder for chaining. + */ + public Builder clearSubnet() { + + subnet_ = getDefaultInstance().getSubnet(); + onChanged(); + return this; + } + /** + * + * + *
+     * The subnet name the vm needs to be created in.
+     * 
+ * + * string subnet = 3; + * + * @param value The bytes for subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnet_ = 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.clouddms.v1.VmCreationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.VmCreationConfig) + private static final com.google.cloud.clouddms.v1.VmCreationConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.VmCreationConfig(); + } + + public static com.google.cloud.clouddms.v1.VmCreationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VmCreationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VmCreationConfig(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.clouddms.v1.VmCreationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmCreationConfigOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmCreationConfigOrBuilder.java new file mode 100644 index 00000000..de732620 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmCreationConfigOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface VmCreationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.VmCreationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. VM instance machine type to create.
+   * 
+ * + * string vm_machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmMachineType. + */ + java.lang.String getVmMachineType(); + /** + * + * + *
+   * Required. VM instance machine type to create.
+   * 
+ * + * string vm_machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmMachineType. + */ + com.google.protobuf.ByteString getVmMachineTypeBytes(); + + /** + * + * + *
+   * The Google Cloud Platform zone to create the VM in.
+   * 
+ * + * string vm_zone = 2; + * + * @return The vmZone. + */ + java.lang.String getVmZone(); + /** + * + * + *
+   * The Google Cloud Platform zone to create the VM in.
+   * 
+ * + * string vm_zone = 2; + * + * @return The bytes for vmZone. + */ + com.google.protobuf.ByteString getVmZoneBytes(); + + /** + * + * + *
+   * The subnet name the vm needs to be created in.
+   * 
+ * + * string subnet = 3; + * + * @return The subnet. + */ + java.lang.String getSubnet(); + /** + * + * + *
+   * The subnet name the vm needs to be created in.
+   * 
+ * + * string subnet = 3; + * + * @return The bytes for subnet. + */ + com.google.protobuf.ByteString getSubnetBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmSelectionConfig.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmSelectionConfig.java new file mode 100644 index 00000000..322400c6 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmSelectionConfig.java @@ -0,0 +1,634 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * VM selection configuration message
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.VmSelectionConfig} + */ +public final class VmSelectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.VmSelectionConfig) + VmSelectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use VmSelectionConfig.newBuilder() to construct. + private VmSelectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VmSelectionConfig() { + vmZone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VmSelectionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VmSelectionConfig( + 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(); + + vmZone_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmSelectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmSelectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.VmSelectionConfig.class, + com.google.cloud.clouddms.v1.VmSelectionConfig.Builder.class); + } + + public static final int VM_ZONE_FIELD_NUMBER = 1; + private volatile java.lang.Object vmZone_; + /** + * + * + *
+   * Required. The Google Cloud Platform zone the VM is located.
+   * 
+ * + * string vm_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmZone. + */ + @java.lang.Override + public java.lang.String getVmZone() { + java.lang.Object ref = vmZone_; + 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(); + vmZone_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Google Cloud Platform zone the VM is located.
+   * 
+ * + * string vm_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmZoneBytes() { + java.lang.Object ref = vmZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmZone_ = 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 (!getVmZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vmZone_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVmZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vmZone_); + } + 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.clouddms.v1.VmSelectionConfig)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.VmSelectionConfig other = + (com.google.cloud.clouddms.v1.VmSelectionConfig) obj; + + if (!getVmZone().equals(other.getVmZone())) 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) + VM_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getVmZone().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.VmSelectionConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VmSelectionConfig 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.clouddms.v1.VmSelectionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VmSelectionConfig 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.clouddms.v1.VmSelectionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VmSelectionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.VmSelectionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VmSelectionConfig 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.clouddms.v1.VmSelectionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VmSelectionConfig 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.clouddms.v1.VmSelectionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VmSelectionConfig 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.clouddms.v1.VmSelectionConfig 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; + } + /** + * + * + *
+   * VM selection configuration message
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.VmSelectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.VmSelectionConfig) + com.google.cloud.clouddms.v1.VmSelectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmSelectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmSelectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.VmSelectionConfig.class, + com.google.cloud.clouddms.v1.VmSelectionConfig.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.VmSelectionConfig.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(); + vmZone_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsProto + .internal_static_google_cloud_clouddms_v1_VmSelectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VmSelectionConfig getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.VmSelectionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VmSelectionConfig build() { + com.google.cloud.clouddms.v1.VmSelectionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VmSelectionConfig buildPartial() { + com.google.cloud.clouddms.v1.VmSelectionConfig result = + new com.google.cloud.clouddms.v1.VmSelectionConfig(this); + result.vmZone_ = vmZone_; + 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.clouddms.v1.VmSelectionConfig) { + return mergeFrom((com.google.cloud.clouddms.v1.VmSelectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.VmSelectionConfig other) { + if (other == com.google.cloud.clouddms.v1.VmSelectionConfig.getDefaultInstance()) return this; + if (!other.getVmZone().isEmpty()) { + vmZone_ = other.vmZone_; + 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.clouddms.v1.VmSelectionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.clouddms.v1.VmSelectionConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object vmZone_ = ""; + /** + * + * + *
+     * Required. The Google Cloud Platform zone the VM is located.
+     * 
+ * + * string vm_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmZone. + */ + public java.lang.String getVmZone() { + java.lang.Object ref = vmZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Google Cloud Platform zone the VM is located.
+     * 
+ * + * string vm_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmZone. + */ + public com.google.protobuf.ByteString getVmZoneBytes() { + java.lang.Object ref = vmZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Google Cloud Platform zone the VM is located.
+     * 
+ * + * string vm_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vmZone to set. + * @return This builder for chaining. + */ + public Builder setVmZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmZone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Platform zone the VM is located.
+     * 
+ * + * string vm_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVmZone() { + + vmZone_ = getDefaultInstance().getVmZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Platform zone the VM is located.
+     * 
+ * + * string vm_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for vmZone to set. + * @return This builder for chaining. + */ + public Builder setVmZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmZone_ = 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.clouddms.v1.VmSelectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.VmSelectionConfig) + private static final com.google.cloud.clouddms.v1.VmSelectionConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.VmSelectionConfig(); + } + + public static com.google.cloud.clouddms.v1.VmSelectionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VmSelectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VmSelectionConfig(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.clouddms.v1.VmSelectionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmSelectionConfigOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmSelectionConfigOrBuilder.java new file mode 100644 index 00000000..3d74b42f --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VmSelectionConfigOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms.proto + +package com.google.cloud.clouddms.v1; + +public interface VmSelectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.VmSelectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Google Cloud Platform zone the VM is located.
+   * 
+ * + * string vm_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmZone. + */ + java.lang.String getVmZone(); + /** + * + * + *
+   * Required. The Google Cloud Platform zone the VM is located.
+   * 
+ * + * string vm_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmZone. + */ + com.google.protobuf.ByteString getVmZoneBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VpcPeeringConnectivity.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VpcPeeringConnectivity.java new file mode 100644 index 00000000..5df5eb20 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VpcPeeringConnectivity.java @@ -0,0 +1,640 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +/** + * + * + *
+ * The details of the VPC where the source database is located in Google Cloud.
+ * We will use this information to set up the VPC peering connection between
+ * Cloud SQL and this VPC.
+ * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.VpcPeeringConnectivity} + */ +public final class VpcPeeringConnectivity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.VpcPeeringConnectivity) + VpcPeeringConnectivityOrBuilder { + private static final long serialVersionUID = 0L; + // Use VpcPeeringConnectivity.newBuilder() to construct. + private VpcPeeringConnectivity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpcPeeringConnectivity() { + vpc_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpcPeeringConnectivity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VpcPeeringConnectivity( + 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(); + + vpc_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.class, + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.Builder.class); + } + + public static final int VPC_FIELD_NUMBER = 1; + private volatile java.lang.Object vpc_; + /** + * + * + *
+   * The name of the VPC network to peer with the Cloud SQL private network.
+   * 
+ * + * string vpc = 1; + * + * @return The vpc. + */ + @java.lang.Override + public java.lang.String getVpc() { + java.lang.Object ref = vpc_; + 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(); + vpc_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the VPC network to peer with the Cloud SQL private network.
+   * 
+ * + * string vpc = 1; + * + * @return The bytes for vpc. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpcBytes() { + java.lang.Object ref = vpc_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpc_ = 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 (!getVpcBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vpc_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVpcBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vpc_); + } + 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.clouddms.v1.VpcPeeringConnectivity)) { + return super.equals(obj); + } + com.google.cloud.clouddms.v1.VpcPeeringConnectivity other = + (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) obj; + + if (!getVpc().equals(other.getVpc())) 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) + VPC_FIELD_NUMBER; + hash = (53 * hash) + getVpc().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.clouddms.v1.VpcPeeringConnectivity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VpcPeeringConnectivity 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.clouddms.v1.VpcPeeringConnectivity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VpcPeeringConnectivity 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.clouddms.v1.VpcPeeringConnectivity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.clouddms.v1.VpcPeeringConnectivity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.clouddms.v1.VpcPeeringConnectivity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VpcPeeringConnectivity 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.clouddms.v1.VpcPeeringConnectivity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VpcPeeringConnectivity 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.clouddms.v1.VpcPeeringConnectivity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.clouddms.v1.VpcPeeringConnectivity 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.clouddms.v1.VpcPeeringConnectivity 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; + } + /** + * + * + *
+   * The details of the VPC where the source database is located in Google Cloud.
+   * We will use this information to set up the VPC peering connection between
+   * Cloud SQL and this VPC.
+   * 
+ * + * Protobuf type {@code google.cloud.clouddms.v1.VpcPeeringConnectivity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.clouddms.v1.VpcPeeringConnectivity) + com.google.cloud.clouddms.v1.VpcPeeringConnectivityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.class, + com.google.cloud.clouddms.v1.VpcPeeringConnectivity.Builder.class); + } + + // Construct using com.google.cloud.clouddms.v1.VpcPeeringConnectivity.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(); + vpc_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.clouddms.v1.ClouddmsResourcesProto + .internal_static_google_cloud_clouddms_v1_VpcPeeringConnectivity_descriptor; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VpcPeeringConnectivity getDefaultInstanceForType() { + return com.google.cloud.clouddms.v1.VpcPeeringConnectivity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VpcPeeringConnectivity build() { + com.google.cloud.clouddms.v1.VpcPeeringConnectivity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.clouddms.v1.VpcPeeringConnectivity buildPartial() { + com.google.cloud.clouddms.v1.VpcPeeringConnectivity result = + new com.google.cloud.clouddms.v1.VpcPeeringConnectivity(this); + result.vpc_ = vpc_; + 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.clouddms.v1.VpcPeeringConnectivity) { + return mergeFrom((com.google.cloud.clouddms.v1.VpcPeeringConnectivity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.clouddms.v1.VpcPeeringConnectivity other) { + if (other == com.google.cloud.clouddms.v1.VpcPeeringConnectivity.getDefaultInstance()) + return this; + if (!other.getVpc().isEmpty()) { + vpc_ = other.vpc_; + 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.clouddms.v1.VpcPeeringConnectivity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.clouddms.v1.VpcPeeringConnectivity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object vpc_ = ""; + /** + * + * + *
+     * The name of the VPC network to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 1; + * + * @return The vpc. + */ + public java.lang.String getVpc() { + java.lang.Object ref = vpc_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpc_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the VPC network to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 1; + * + * @return The bytes for vpc. + */ + public com.google.protobuf.ByteString getVpcBytes() { + java.lang.Object ref = vpc_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpc_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the VPC network to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 1; + * + * @param value The vpc to set. + * @return This builder for chaining. + */ + public Builder setVpc(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vpc_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VPC network to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 1; + * + * @return This builder for chaining. + */ + public Builder clearVpc() { + + vpc_ = getDefaultInstance().getVpc(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VPC network to peer with the Cloud SQL private network.
+     * 
+ * + * string vpc = 1; + * + * @param value The bytes for vpc to set. + * @return This builder for chaining. + */ + public Builder setVpcBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vpc_ = 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.clouddms.v1.VpcPeeringConnectivity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.clouddms.v1.VpcPeeringConnectivity) + private static final com.google.cloud.clouddms.v1.VpcPeeringConnectivity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.clouddms.v1.VpcPeeringConnectivity(); + } + + public static com.google.cloud.clouddms.v1.VpcPeeringConnectivity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpcPeeringConnectivity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VpcPeeringConnectivity(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.clouddms.v1.VpcPeeringConnectivity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VpcPeeringConnectivityOrBuilder.java b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VpcPeeringConnectivityOrBuilder.java new file mode 100644 index 00000000..c2a6e042 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/java/com/google/cloud/clouddms/v1/VpcPeeringConnectivityOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/clouddms/v1/clouddms_resources.proto + +package com.google.cloud.clouddms.v1; + +public interface VpcPeeringConnectivityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.clouddms.v1.VpcPeeringConnectivity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the VPC network to peer with the Cloud SQL private network.
+   * 
+ * + * string vpc = 1; + * + * @return The vpc. + */ + java.lang.String getVpc(); + /** + * + * + *
+   * The name of the VPC network to peer with the Cloud SQL private network.
+   * 
+ * + * string vpc = 1; + * + * @return The bytes for vpc. + */ + com.google.protobuf.ByteString getVpcBytes(); +} diff --git a/proto-google-cloud-dms-v1/src/main/proto/google/cloud/clouddms/v1/clouddms.proto b/proto-google-cloud-dms-v1/src/main/proto/google/cloud/clouddms/v1/clouddms.proto new file mode 100644 index 00000000..a17a4eb5 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/proto/google/cloud/clouddms/v1/clouddms.proto @@ -0,0 +1,622 @@ +// 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.clouddms.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/clouddms/v1/clouddms_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/clouddms/v1;clouddms"; +option java_multiple_files = true; +option java_outer_classname = "ClouddmsProto"; +option java_package = "com.google.cloud.clouddms.v1"; + +// Database Migration service +service DataMigrationService { + option (google.api.default_host) = "datamigration.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists migration jobs in a given project and location. + rpc ListMigrationJobs(ListMigrationJobsRequest) returns (ListMigrationJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/migrationJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single migration job. + rpc GetMigrationJob(GetMigrationJobRequest) returns (MigrationJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/migrationJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new migration job in a given project and location. + rpc CreateMigrationJob(CreateMigrationJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/migrationJobs" + body: "migration_job" + }; + option (google.api.method_signature) = "parent,migration_job,migration_job_id"; + option (google.longrunning.operation_info) = { + response_type: "MigrationJob" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single migration job. + rpc UpdateMigrationJob(UpdateMigrationJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{migration_job.name=projects/*/locations/*/migrationJobs/*}" + body: "migration_job" + }; + option (google.api.method_signature) = "migration_job,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MigrationJob" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single migration job. + rpc DeleteMigrationJob(DeleteMigrationJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/migrationJobs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Start an already created migration job. + rpc StartMigrationJob(StartMigrationJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:start" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MigrationJob" + metadata_type: "OperationMetadata" + }; + } + + // Stops a running migration job. + rpc StopMigrationJob(StopMigrationJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:stop" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MigrationJob" + metadata_type: "OperationMetadata" + }; + } + + // Resume a migration job that is currently stopped and is resumable (was + // stopped during CDC phase). + rpc ResumeMigrationJob(ResumeMigrationJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:resume" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MigrationJob" + metadata_type: "OperationMetadata" + }; + } + + // Promote a migration job, stopping replication to the destination and + // promoting the destination to be a standalone database. + rpc PromoteMigrationJob(PromoteMigrationJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:promote" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MigrationJob" + metadata_type: "OperationMetadata" + }; + } + + // Verify a migration job, making sure the destination can reach the source + // and that all configuration and prerequisites are met. + rpc VerifyMigrationJob(VerifyMigrationJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:verify" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MigrationJob" + metadata_type: "OperationMetadata" + }; + } + + // Restart a stopped or failed migration job, resetting the destination + // instance to its original state and starting the migration process from + // scratch. + rpc RestartMigrationJob(RestartMigrationJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:restart" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MigrationJob" + metadata_type: "OperationMetadata" + }; + } + + // Generate a SSH configuration script to configure the reverse SSH + // connectivity. + rpc GenerateSshScript(GenerateSshScriptRequest) returns (SshScript) { + option (google.api.http) = { + post: "/v1/{migration_job=projects/*/locations/*/migrationJobs/*}:generateSshScript" + body: "*" + }; + } + + // Retrieve a list of all connection profiles in a given project and location. + rpc ListConnectionProfiles(ListConnectionProfilesRequest) returns (ListConnectionProfilesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/connectionProfiles" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single connection profile. + rpc GetConnectionProfile(GetConnectionProfileRequest) returns (ConnectionProfile) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new connection profile in a given project and location. + rpc CreateConnectionProfile(CreateConnectionProfileRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/connectionProfiles" + body: "connection_profile" + }; + option (google.api.method_signature) = "parent,connection_profile,connection_profile_id"; + option (google.longrunning.operation_info) = { + response_type: "ConnectionProfile" + metadata_type: "OperationMetadata" + }; + } + + // Update the configuration of a single connection profile. + rpc UpdateConnectionProfile(UpdateConnectionProfileRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}" + body: "connection_profile" + }; + option (google.api.method_signature) = "connection_profile,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ConnectionProfile" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Database Migration Service connection profile. + // A connection profile can only be deleted if it is not in use by any + // active migration jobs. + rpc DeleteConnectionProfile(DeleteConnectionProfileRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Retrieve a list of all migration jobs in a given project and location. +message ListMigrationJobsRequest { + // Required. The parent, which owns this collection of migrationJobs. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamigration.googleapis.com/MigrationJob" + } + ]; + + // The maximum number of migration jobs to return. The service may return + // fewer than this value. If unspecified, at most 50 migration jobs will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2; + + // The nextPageToken value received in the previous call to + // migrationJobs.list, used in the subsequent request to retrieve the next + // page of results. On first call this should be left blank. When paginating, + // all other parameters provided to migrationJobs.list must match the call + // that provided the page token. + string page_token = 3; + + // A filter expression that filters migration jobs listed in the response. + // The expression must specify the field name, a comparison operator, and the + // value that you want to use for filtering. The value must be a string, + // a number, or a boolean. The comparison operator must be + // either =, !=, >, or <. For example, list migration jobs created this year + // by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** + // You can also filter nested fields. For example, you could specify + // **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration + // jobs connecting through the specific SSH tunnel bastion. + string filter = 4; + + // Sort the results based on the migration job name. + // Valid values are: "name", "name asc", and "name desc". + string order_by = 5; +} + +// Response message for 'ListMigrationJobs' request. +message ListMigrationJobsResponse { + // The list of migration jobs objects. + repeated MigrationJob migration_jobs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for 'GetMigrationJob' request. +message GetMigrationJobRequest { + // Required. Name of the migration job resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/MigrationJob" + } + ]; +} + +// Request message to create a new Database Migration Service migration job +// in the specified project and region. +message CreateMigrationJobRequest { + // Required. The parent, which owns this collection of migration jobs. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamigration.googleapis.com/MigrationJob" + } + ]; + + // Required. The ID of the instance to create. + string migration_job_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Represents a [migration + // job](https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.migrationJobs) + // object. + MigrationJob migration_job = 3 [(google.api.field_behavior) = REQUIRED]; + + // A unique id used to identify the request. If the server receives two + // requests with the same id, then the second request will be ignored. + // + // It is recommended to always set this value to a UUID. + // + // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 4; +} + +// Request message for 'UpdateMigrationJob' request. +message UpdateMigrationJobRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // migration job resource by the update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The migration job parameters to update. + MigrationJob migration_job = 2 [(google.api.field_behavior) = REQUIRED]; + + // A unique id used to identify the request. If the server receives two + // requests with the same id, then the second request will be ignored. + // + // It is recommended to always set this value to a UUID. + // + // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 3; +} + +// Request message for 'DeleteMigrationJob' request. +message DeleteMigrationJobRequest { + // Required. Name of the migration job resource to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/MigrationJob" + } + ]; + + // A unique id used to identify the request. If the server receives two + // requests with the same id, then the second request will be ignored. + // + // It is recommended to always set this value to a UUID. + // + // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 2; + + // The destination CloudSQL connection profile is always deleted with the + // migration job. In case of force delete, the destination CloudSQL replica + // database is also deleted. + bool force = 3; +} + +// Request message for 'StartMigrationJob' request. +message StartMigrationJobRequest { + // Name of the migration job resource to start. + string name = 1 [(google.api.resource_reference) = { + type: "datamigration.googleapis.com/MigrationJob" + }]; +} + +// Request message for 'StopMigrationJob' request. +message StopMigrationJobRequest { + // Name of the migration job resource to stop. + string name = 1 [(google.api.resource_reference) = { + type: "datamigration.googleapis.com/MigrationJob" + }]; +} + +// Request message for 'ResumeMigrationJob' request. +message ResumeMigrationJobRequest { + // Name of the migration job resource to resume. + string name = 1 [(google.api.resource_reference) = { + type: "datamigration.googleapis.com/MigrationJob" + }]; +} + +// Request message for 'PromoteMigrationJob' request. +message PromoteMigrationJobRequest { + // Name of the migration job resource to promote. + string name = 1 [(google.api.resource_reference) = { + type: "datamigration.googleapis.com/MigrationJob" + }]; +} + +// Request message for 'VerifyMigrationJob' request. +message VerifyMigrationJobRequest { + // Name of the migration job resource to verify. + string name = 1 [(google.api.resource_reference) = { + type: "datamigration.googleapis.com/MigrationJob" + }]; +} + +// Request message for 'RestartMigrationJob' request. +message RestartMigrationJobRequest { + // Name of the migration job resource to restart. + string name = 1 [(google.api.resource_reference) = { + type: "datamigration.googleapis.com/MigrationJob" + }]; +} + +// Request message for 'GenerateSshScript' request. +message GenerateSshScriptRequest { + // Name of the migration job resource to generate the SSH script. + string migration_job = 1 [(google.api.resource_reference) = { + type: "datamigration.googleapis.com/MigrationJob" + }]; + + // Required. Bastion VM Instance name to use or to create. + string vm = 2 [(google.api.field_behavior) = REQUIRED]; + + // The VM configuration + oneof vm_config { + // The VM creation configuration + VmCreationConfig vm_creation_config = 100; + + // The VM selection configuration + VmSelectionConfig vm_selection_config = 101; + } + + // The port that will be open on the bastion host + int32 vm_port = 3; +} + +// VM creation configuration message +message VmCreationConfig { + // Required. VM instance machine type to create. + string vm_machine_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // The Google Cloud Platform zone to create the VM in. + string vm_zone = 2; + + // The subnet name the vm needs to be created in. + string subnet = 3; +} + +// VM selection configuration message +message VmSelectionConfig { + // Required. The Google Cloud Platform zone the VM is located. + string vm_zone = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for 'GenerateSshScript' request. +message SshScript { + // The ssh configuration script. + string script = 1; +} + +// Request message for 'ListConnectionProfiles' request. +message ListConnectionProfilesRequest { + // Required. The parent, which owns this collection of connection profiles. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamigration.googleapis.com/ConnectionProfile" + } + ]; + + // The maximum number of connection profiles to return. The service may return + // fewer than this value. If unspecified, at most 50 connection profiles will + // be returned. The maximum value is 1000; values above 1000 will be coerced + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListConnectionProfiles` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListConnectionProfiles` + // must match the call that provided the page token. + string page_token = 3; + + // A filter expression that filters connection profiles listed in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. The value must + // be a string, a number, or a boolean. The comparison operator must be either + // =, !=, >, or <. For example, list connection profiles created this year by + // specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can + // also filter nested fields. For example, you could specify **mySql.username + // = %lt;my_username%gt;** to list all connection profiles configured to + // connect with a specific username. + string filter = 4; + + // the order by fields for the result. + string order_by = 5; +} + +// Response message for 'ListConnectionProfiles' request. +message ListConnectionProfilesResponse { + // The response list of connection profiles. + repeated ConnectionProfile connection_profiles = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for 'GetConnectionProfile' request. +message GetConnectionProfileRequest { + // Required. Name of the connection profile resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConnectionProfile" + } + ]; +} + +// Request message for 'CreateConnectionProfile' request. +message CreateConnectionProfileRequest { + // Required. The parent, which owns this collection of connection profiles. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConnectionProfile" + } + ]; + + // Required. The connection profile identifier. + string connection_profile_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The create request body including the connection profile data + ConnectionProfile connection_profile = 3 [(google.api.field_behavior) = REQUIRED]; + + // A unique id used to identify the request. If the server receives two + // requests with the same id, then the second request will be ignored. + // + // It is recommended to always set this value to a UUID. + // + // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 4; +} + +// Request message for 'UpdateConnectionProfile' request. +message UpdateConnectionProfileRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // connection profile resource by the update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The connection profile parameters to update. + ConnectionProfile connection_profile = 2 [(google.api.field_behavior) = REQUIRED]; + + // A unique id used to identify the request. If the server receives two + // requests with the same id, then the second request will be ignored. + // + // It is recommended to always set this value to a UUID. + // + // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 3; +} + +// Request message for 'DeleteConnectionProfile' request. +message DeleteConnectionProfileRequest { + // Required. Name of the connection profile resource to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConnectionProfile" + } + ]; + + // A unique id used to identify the request. If the server receives two + // requests with the same id, then the second request will be ignored. + // + // It is recommended to always set this value to a UUID. + // + // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 2; + + // In case of force delete, the CloudSQL replica database is also deleted + // (only for CloudSQL connection profile). + bool force = 3; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-dms-v1/src/main/proto/google/cloud/clouddms/v1/clouddms_resources.proto b/proto-google-cloud-dms-v1/src/main/proto/google/cloud/clouddms/v1/clouddms_resources.proto new file mode 100644 index 00000000..f50a5496 --- /dev/null +++ b/proto-google-cloud-dms-v1/src/main/proto/google/cloud/clouddms/v1/clouddms_resources.proto @@ -0,0 +1,713 @@ +// 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.clouddms.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/clouddms/v1;clouddms"; +option java_multiple_files = true; +option java_outer_classname = "ClouddmsResourcesProto"; +option java_package = "com.google.cloud.clouddms.v1"; + +// SSL configuration information. +message SslConfig { + // Specifies The kind of ssl configuration used. + enum SslType { + // Unspecified. + SSL_TYPE_UNSPECIFIED = 0; + + // Only 'ca_certificate' specified. + SERVER_ONLY = 1; + + // Both server ('ca_certificate'), and client ('client_key', + // 'client_certificate') specified. + SERVER_CLIENT = 2; + } + + // Output only. The ssl config type according to 'client_key', 'client_certificate' and + // 'ca_certificate'. + SslType type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with + // the Client Certificate. If this field is used then the 'client_certificate' + // field is mandatory. + string client_key = 2 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. The x509 PEM-encoded certificate that will be used by the replica to + // authenticate against the source database server.If this field is used then + // the 'client_key' field is mandatory. + string client_certificate = 3 [(google.api.field_behavior) = INPUT_ONLY]; + + // Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database + // server's certificate. The replica will use this certificate to verify + // it's connecting to the right host. + string ca_certificate = 4 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; +} + +// Specifies connection parameters required specifically for MySQL databases. +message MySqlConnectionProfile { + // Required. The IP or hostname of the source MySQL database. + string host = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The network port of the source MySQL database. + int32 port = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The username that Database Migration Service will use to connect to the + // database. The value is encrypted when stored in Database Migration Service. + string username = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Input only. The password for the user that Database Migration Service will be using to + // connect to the database. This field is not returned on request, and the + // value is encrypted when stored in Database Migration Service. + string password = 4 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. Indicates If this connection profile password is stored. + bool password_set = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // SSL configuration for the destination to connect to the source database. + SslConfig ssl = 6; + + // If the source is a Cloud SQL database, use this field to + // provide the Cloud SQL instance ID of the source. + string cloud_sql_id = 7; +} + +// Specifies connection parameters required specifically for PostgreSQL +// databases. +message PostgreSqlConnectionProfile { + // Required. The IP or hostname of the source PostgreSQL database. + string host = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The network port of the source PostgreSQL database. + int32 port = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The username that Database Migration Service will use to connect to the + // database. The value is encrypted when stored in Database Migration Service. + string username = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Input only. The password for the user that Database Migration Service will be using to + // connect to the database. This field is not returned on request, and the + // value is encrypted when stored in Database Migration Service. + string password = 4 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. Indicates If this connection profile password is stored. + bool password_set = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // SSL configuration for the destination to connect to the source database. + SslConfig ssl = 6; + + // If the source is a Cloud SQL database, use this field to + // provide the Cloud SQL instance ID of the source. + string cloud_sql_id = 7; +} + +// Specifies required connection parameters, and, optionally, the parameters +// required to create a Cloud SQL destination database instance. +message CloudSqlConnectionProfile { + // Output only. The Cloud SQL instance ID that this connection profile is associated with. + string cloud_sql_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Metadata used to create the destination Cloud SQL database. + CloudSqlSettings settings = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The Cloud SQL database instance's private IP. + string private_ip = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud SQL database instance's public IP. + string public_ip = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// An entry for an Access Control list. +message SqlAclEntry { + // The allowlisted value for the access control list. + string value = 1; + + // The access control entry entry expiration. + oneof expiration { + // The time when this access control entry expires in + // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example: + // `2012-11-15T16:19:00.094Z`. + google.protobuf.Timestamp expire_time = 10; + + // Input only. The time-to-leave of this access control entry. + google.protobuf.Duration ttl = 11 [(google.api.field_behavior) = INPUT_ONLY]; + } + + // A label to identify this entry. + string label = 3; +} + +// IP Management configuration. +message SqlIpConfig { + // Whether the instance should be assigned an IPv4 address or not. + google.protobuf.BoolValue enable_ipv4 = 1; + + // The resource link for the VPC network from which the Cloud SQL instance is + // accessible for private IP. For example, + // `/projects/myProject/global/networks/default`. This setting can + // be updated, but it cannot be removed after it is set. + string private_network = 2; + + // Whether SSL connections over IP should be enforced or not. + google.protobuf.BoolValue require_ssl = 3; + + // The list of external networks that are allowed to connect to the instance + // using the IP. See + // https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as + // 'slash' notation (e.g. `192.168.100.0/24`). + repeated SqlAclEntry authorized_networks = 4; +} + +// Settings for creating a Cloud SQL database instance. +message CloudSqlSettings { + // Specifies when the instance should be activated. + enum SqlActivationPolicy { + // unspecified policy. + SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; + + // The instance is always up and running. + ALWAYS = 1; + + // The instance should never spin up. + NEVER = 2; + } + + // The storage options for Cloud SQL databases. + enum SqlDataDiskType { + // Unspecified. + SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; + + // SSD disk. + PD_SSD = 1; + + // HDD disk. + PD_HDD = 2; + } + + // The database engine type and version. + enum SqlDatabaseVersion { + // Unspecified version. + SQL_DATABASE_VERSION_UNSPECIFIED = 0; + + // MySQL 5.6. + MYSQL_5_6 = 1; + + // MySQL 5.7. + MYSQL_5_7 = 2; + + // PostgreSQL 9.6. + POSTGRES_9_6 = 3; + + // PostgreSQL 11. + POSTGRES_11 = 4; + + // PostgreSQL 10. + POSTGRES_10 = 5; + + // MySQL 8.0. + MYSQL_8_0 = 6; + + // PostgreSQL 12. + POSTGRES_12 = 7; + + // PostgreSQL 13. + POSTGRES_13 = 8; + } + + // The database engine type and version. + SqlDatabaseVersion database_version = 1; + + // The resource labels for a Cloud SQL instance to use to annotate any related + // underlying resources such as Compute Engine VMs. + // An object containing a list of "key": "value" pairs. + // + // Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`. + map user_labels = 2; + + // The tier (or machine type) for this instance, for example: + // `db-n1-standard-1` (MySQL instances) or + // `db-custom-1-3840` (PostgreSQL instances). + // For more information, see + // [Cloud SQL Instance + // Settings](https://cloud.google.com/sql/docs/mysql/instance-settings). + string tier = 3; + + // The maximum size to which storage capacity can be automatically increased. + // The default value is 0, which specifies that there is no limit. + google.protobuf.Int64Value storage_auto_resize_limit = 4; + + // The activation policy specifies when the instance is activated; it is + // applicable only when the instance state is 'RUNNABLE'. Valid values: + // + // 'ALWAYS': The instance is on, and remains so even in + // the absence of connection requests. + // + // `NEVER`: The instance is off; it is not activated, even if a + // connection request arrives. + SqlActivationPolicy activation_policy = 5; + + // The settings for IP Management. This allows to enable or disable the + // instance IP and manage which external networks can connect to the instance. + // The IPv4 address cannot be disabled. + SqlIpConfig ip_config = 6; + + // [default: ON] If you enable this setting, Cloud SQL checks your available + // storage every 30 seconds. If the available storage falls below a threshold + // size, Cloud SQL automatically adds additional storage capacity. If the + // available storage repeatedly falls below the threshold size, Cloud SQL + // continues to add storage until it reaches the maximum of 30 TB. + google.protobuf.BoolValue auto_storage_increase = 7; + + // The database flags passed to the Cloud SQL instance at startup. + // An object containing a list of "key": value pairs. + // Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + map database_flags = 8; + + // The type of storage: `PD_SSD` (default) or `PD_HDD`. + SqlDataDiskType data_disk_type = 9; + + // The storage capacity available to the database, in GB. + // The minimum (and default) size is 10GB. + google.protobuf.Int64Value data_disk_size_gb = 10; + + // The Google Cloud Platform zone where your Cloud SQL datdabse instance is + // located. + string zone = 11; + + // The Database Migration Service source connection profile ID, + // in the format: + // `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID` + string source_id = 12; + + // Input only. Initial root password. + string root_password = 13 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. Indicates If this connection profile root password is stored. + bool root_password_set = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The Cloud SQL default instance level collation. + string collation = 15; +} + +// The source database will allow incoming connections from the destination +// database's public IP. You can retrieve the Cloud SQL instance's public IP +// from the Cloud SQL console or using Cloud SQL APIs. No additional +// configuration is required. +message StaticIpConnectivity { + +} + +// The details needed to configure a reverse SSH tunnel between the source and +// destination databases. These details will be used when calling the +// generateSshScript method (see +// https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/generateSshScript) +// to produce the script that will help set up the reverse SSH tunnel, and to +// set up the VPC peering between the Cloud SQL private network and the VPC. +message ReverseSshConnectivity { + // Required. The IP of the virtual machine (Compute Engine) used as the bastion server + // for the SSH tunnel. + string vm_ip = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The forwarding port of the virtual machine (Compute Engine) used as the + // bastion server for the SSH tunnel. + int32 vm_port = 2 [(google.api.field_behavior) = REQUIRED]; + + // The name of the virtual machine (Compute Engine) used as the bastion server + // for the SSH tunnel. + string vm = 3; + + // The name of the VPC to peer with the Cloud SQL private network. + string vpc = 4; +} + +// The details of the VPC where the source database is located in Google Cloud. +// We will use this information to set up the VPC peering connection between +// Cloud SQL and this VPC. +message VpcPeeringConnectivity { + // The name of the VPC network to peer with the Cloud SQL private network. + string vpc = 1; +} + +// A message defining the database engine and provider. +message DatabaseType { + // The database provider. + DatabaseProvider provider = 1; + + // The database engine. + DatabaseEngine engine = 2; +} + +// Represents a Database Migration Service migration job object. +message MigrationJob { + option (google.api.resource) = { + type: "datamigration.googleapis.com/MigrationJob" + pattern: "projects/{project}/locations/{location}/migrationJobs/{migration_job}" + }; + + // The current migration job states. + enum State { + // The state of the migration job is unknown. + STATE_UNSPECIFIED = 0; + + // The migration job is down for maintenance. + MAINTENANCE = 1; + + // The migration job is in draft mode and no resources are created. + DRAFT = 2; + + // The migration job is being created. + CREATING = 3; + + // The migration job is created, not started and is fully editable. + NOT_STARTED = 4; + + // The migration job is running. + RUNNING = 5; + + // The migration job failed. + FAILED = 6; + + // The migration job has been completed. + COMPLETED = 7; + + // The migration job is being deleted. + DELETING = 8; + + // The migration job is being stopped. + STOPPING = 9; + + // The migration job is currently stopped. + STOPPED = 10; + + // The migration job has been deleted. + DELETED = 11; + + // The migration job is being updated. + UPDATING = 12; + + // The migration job is starting. + STARTING = 13; + + // The migration job is restarting. + RESTARTING = 14; + + // The migration job is resuming. + RESUMING = 15; + } + + // The current migration job phase. + enum Phase { + // The phase of the migration job is unknown. + PHASE_UNSPECIFIED = 0; + + // The migration job is in the full dump phase. + FULL_DUMP = 1; + + // The migration job is CDC phase. + CDC = 2; + + // The migration job is running the promote phase. + PROMOTE_IN_PROGRESS = 3; + + // Only RDS flow - waiting for source writes to stop + WAITING_FOR_SOURCE_WRITES_TO_STOP = 4; + + // Only RDS flow - the sources writes stopped, waiting for dump to begin + PREPARING_THE_DUMP = 5; + } + + // The type of migration job (one-time or continuous). + enum Type { + // The type of the migration job is unknown. + TYPE_UNSPECIFIED = 0; + + // The migration job is a one time migration. + ONE_TIME = 1; + + // The migration job is a continuous migration. + CONTINUOUS = 2; + } + + // The name (URI) of this migration job resource, in the form of: + // projects/{project}/locations/{location}/instances/{instance}. + string name = 1; + + // Output only. The timestamp when the migration job resource was created. + // A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. + // Example: "2014-10-02T15:01:23.045123456Z". + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the migration job resource was last updated. + // A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. + // Example: "2014-10-02T15:01:23.045123456Z". + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The resource labels for migration job to use to annotate any related + // underlying resources such as Compute Engine VMs. An object containing a + // list of "key": "value" pairs. + // + // Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. + map labels = 4; + + // The migration job display name. + string display_name = 5; + + // The current migration job state. + State state = 6; + + // Output only. The current migration job phase. + Phase phase = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The migration job type. + Type type = 8 [(google.api.field_behavior) = REQUIRED]; + + // The path to the dump file in Google Cloud Storage, + // in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]). + string dump_path = 9; + + // Required. The resource name (URI) of the source connection profile. + string source = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name (URI) of the destination connection profile. + string destination = 11 [(google.api.field_behavior) = REQUIRED]; + + // The connectivity method. + oneof connectivity { + // The details needed to communicate to the source over Reverse SSH + // tunnel connectivity. + ReverseSshConnectivity reverse_ssh_connectivity = 101; + + // The details of the VPC network that the source database is located in. + VpcPeeringConnectivity vpc_peering_connectivity = 102; + + // static ip connectivity data (default, no additional details needed). + StaticIpConnectivity static_ip_connectivity = 103; + } + + // Output only. The duration of the migration job (in seconds). A duration in seconds + // with up to nine fractional digits, terminated by 's'. Example: "3.5s". + google.protobuf.Duration duration = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error details in case of state FAILED. + google.rpc.Status error = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The database engine type and provider of the source. + DatabaseType source_database = 14; + + // The database engine type and provider of the destination. + DatabaseType destination_database = 15; + + // Output only. If the migration job is completed, the time when it was completed. + google.protobuf.Timestamp end_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A connection profile definition. +message ConnectionProfile { + option (google.api.resource) = { + type: "datamigration.googleapis.com/ConnectionProfile" + pattern: "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}" + }; + + // The current connection profile state (e.g. DRAFT, READY, or FAILED). + enum State { + // The state of the connection profile is unknown. + STATE_UNSPECIFIED = 0; + + // The connection profile is in draft mode and fully editable. + DRAFT = 1; + + // The connection profile is being created. + CREATING = 2; + + // The connection profile is ready. + READY = 3; + + // The connection profile is being updated. + UPDATING = 4; + + // The connection profile is being deleted. + DELETING = 5; + + // The connection profile has been deleted. + DELETED = 6; + + // The last action on the connection profile failed. + FAILED = 7; + } + + // The name of this connection profile resource in the form of + // projects/{project}/locations/{location}/instances/{instance}. + string name = 1; + + // Output only. The timestamp when the resource was created. + // A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. + // Example: "2014-10-02T15:01:23.045123456Z". + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the resource was last updated. + // A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. + // Example: "2014-10-02T15:01:23.045123456Z". + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The resource labels for connection profile to use to annotate any related + // underlying resources such as Compute Engine VMs. An object containing a + // list of "key": "value" pairs. + // + // Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. + map labels = 4; + + // The current connection profile state (e.g. DRAFT, READY, or FAILED). + State state = 5; + + // The connection profile display name. + string display_name = 6; + + // The connection profile definition. + oneof connection_profile { + // A MySQL database connection profile. + MySqlConnectionProfile mysql = 100; + + // A PostgreSQL database connection profile. + PostgreSqlConnectionProfile postgresql = 101; + + // A CloudSQL database connection profile. + CloudSqlConnectionProfile cloudsql = 102; + } + + // Output only. The error details in case of state FAILED. + google.rpc.Status error = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The database provider. + DatabaseProvider provider = 8; +} + +// Error message of a verification Migration job. +message MigrationJobVerificationError { + // A general error code describing the type of error that occurred. + enum ErrorCode { + // An unknown error occurred + ERROR_CODE_UNSPECIFIED = 0; + + // We failed to connect to one of the connection profile. + CONNECTION_FAILURE = 1; + + // We failed to authenticate to one of the connection profile. + AUTHENTICATION_FAILURE = 2; + + // One of the involved connection profiles has an invalid configuration. + INVALID_CONNECTION_PROFILE_CONFIG = 3; + + // The versions of the source and the destination are incompatible. + VERSION_INCOMPATIBILITY = 4; + + // The types of the source and the destination are incompatible. + CONNECTION_PROFILE_TYPES_INCOMPATIBILITY = 5; + + // No pglogical extension installed on databases, applicable for postgres. + NO_PGLOGICAL_INSTALLED = 7; + + // pglogical node already exists on databases, applicable for postgres. + PGLOGICAL_NODE_ALREADY_EXISTS = 8; + + // The value of parameter wal_level is not set to logical. + INVALID_WAL_LEVEL = 9; + + // The value of parameter shared_preload_libraries does not include + // pglogical. + INVALID_SHARED_PRELOAD_LIBRARY = 10; + + // The value of parameter max_replication_slots is not sufficient. + INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; + + // The value of parameter max_wal_senders is not sufficient. + INSUFFICIENT_MAX_WAL_SENDERS = 12; + + // The value of parameter max_worker_processes is not sufficient. + INSUFFICIENT_MAX_WORKER_PROCESSES = 13; + + // Extensions installed are either not supported or having unsupported + // versions. + UNSUPPORTED_EXTENSIONS = 14; + + // Unsupported migration type. + UNSUPPORTED_MIGRATION_TYPE = 15; + + // Invalid RDS logical replication. + INVALID_RDS_LOGICAL_REPLICATION = 16; + + // The gtid_mode is not supported, applicable for MySQL. + UNSUPPORTED_GTID_MODE = 17; + + // The table definition is not support due to missing primary key or replica + // identity. + UNSUPPORTED_TABLE_DEFINITION = 18; + + // The definer is not supported. + UNSUPPORTED_DEFINER = 19; + + // Migration is already running at the time of restart request. + CANT_RESTART_RUNNING_MIGRATION = 21; + } + + // Output only. An instance of ErrorCode specifying the error that occurred. + ErrorCode error_code = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A formatted message with further details about the error and a CTA. + string error_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A specific detailed error message, if supplied by the engine. + string error_detail_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The database engine types. +enum DatabaseEngine { + // The source database engine of the migration job is unknown. + DATABASE_ENGINE_UNSPECIFIED = 0; + + // The source engine is MySQL. + MYSQL = 1; + + // The source engine is PostgreSQL. + POSTGRESQL = 2; +} + +// The database providers. +enum DatabaseProvider { + // The database provider is unknown. + DATABASE_PROVIDER_UNSPECIFIED = 0; + + // CloudSQL runs the database. + CLOUDSQL = 1; + + // RDS runs the database. + RDS = 2; +} diff --git a/versions.txt b/versions.txt index 4c80c217..5101303c 100644 --- a/versions.txt +++ b/versions.txt @@ -2,3 +2,5 @@ # module:released-version:current-version google-cloud-dms:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-dms-v1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-dms-v1:0.0.0:0.0.1-SNAPSHOT