diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml
index 66d162c562fb..0b7744d50122 100644
--- a/gapic-libraries-bom/pom.xml
+++ b/gapic-libraries-bom/pom.xml
@@ -658,6 +658,13 @@
pomimport
+
+ com.google.cloud
+ google-cloud-migrationcenter-bom
+ 0.0.1-SNAPSHOT
+ pom
+ import
+ com.google.cloudgoogle-cloud-monitoring-dashboard-bom
diff --git a/java-migrationcenter/.OwlBot.yaml b/java-migrationcenter/.OwlBot.yaml
new file mode 100644
index 000000000000..653bc889f6d1
--- /dev/null
+++ b/java-migrationcenter/.OwlBot.yaml
@@ -0,0 +1,36 @@
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+deep-remove-regex:
+- "/java-migrationcenter/grpc-google-.*/src"
+- "/java-migrationcenter/proto-google-.*/src"
+- "/java-migrationcenter/google-.*/src"
+- "/java-migrationcenter/samples/snippets/generated"
+
+deep-preserve-regex:
+- "/java-migrationcenter/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java"
+
+deep-copy-regex:
+- source: "/google/cloud/migrationcenter/(v.*)/.*-java/proto-google-.*/src"
+ dest: "/owl-bot-staging/java-migrationcenter/$1/proto-google-cloud-migrationcenter-$1/src"
+- source: "/google/cloud/migrationcenter/(v.*)/.*-java/grpc-google-.*/src"
+ dest: "/owl-bot-staging/java-migrationcenter/$1/grpc-google-cloud-migrationcenter-$1/src"
+- source: "/google/cloud/migrationcenter/(v.*)/.*-java/gapic-google-.*/src"
+ dest: "/owl-bot-staging/java-migrationcenter/$1/google-cloud-migrationcenter/src"
+- source: "/google/cloud/migrationcenter/(v.*)/.*-java/samples/snippets/generated"
+ dest: "/owl-bot-staging/java-migrationcenter/$1/samples/snippets/generated"
+
+
+api-name: migrationcenter
\ No newline at end of file
diff --git a/java-migrationcenter/.repo-metadata.json b/java-migrationcenter/.repo-metadata.json
new file mode 100644
index 000000000000..c0e0790acf5c
--- /dev/null
+++ b/java-migrationcenter/.repo-metadata.json
@@ -0,0 +1,16 @@
+{
+ "api_shortname": "migrationcenter",
+ "name_pretty": "Migration Center API",
+ "product_documentation": "https://cloud.google.com/migration-center/docs/migration-center-overview",
+ "api_description": "Google Cloud Migration Center is a unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud",
+ "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-migrationcenter/latest/overview",
+ "release_level": "preview",
+ "transport": "grpc",
+ "language": "java",
+ "repo": "googleapis/java-migrationcenter",
+ "repo_short": "java-migrationcenter",
+ "distribution_name": "com.google.cloud:google-cloud-migrationcenter",
+ "api_id": "migrationcenter.googleapis.com",
+ "library_type": "GAPIC_AUTO",
+ "requires_billing": true
+}
\ No newline at end of file
diff --git a/java-migrationcenter/README.md b/java-migrationcenter/README.md
new file mode 100644
index 000000000000..e691f71b69f7
--- /dev/null
+++ b/java-migrationcenter/README.md
@@ -0,0 +1,225 @@
+# Google Migration Center API Client for Java
+
+Java idiomatic client for [Migration Center API][product-docs].
+
+[![Maven][maven-version-image]][maven-version-link]
+![Stability][stability-image]
+
+- [Product Documentation][product-docs]
+- [Client Library Documentation][javadocs]
+
+> Note: This client is a work-in-progress, and may occasionally
+> make backwards-incompatible changes.
+
+
+## Quickstart
+
+
+If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
+
+```xml
+
+
+
+ com.google.cloud
+ libraries-bom
+ 26.16.0
+ pom
+ import
+
+
+
+
+
+
+ com.google.cloud
+ google-cloud-migrationcenter
+
+```
+
+If you are using Maven without the BOM, add this to your dependencies:
+
+
+
+```xml
+
+ com.google.cloud
+ google-cloud-migrationcenter
+ 0.0.0
+
+```
+
+If you are using Gradle without BOM, add this to your dependencies:
+
+```Groovy
+implementation 'com.google.cloud:google-cloud-migrationcenter:0.0.0'
+```
+
+If you are using SBT, add this to your dependencies:
+
+```Scala
+libraryDependencies += "com.google.cloud" % "google-cloud-migrationcenter" % "0.0.0"
+```
+
+
+## Authentication
+
+See the [Authentication][authentication] section in the base directory's README.
+
+## Authorization
+
+The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Migration Center API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Migration Center API API calls.
+
+## Getting Started
+
+### Prerequisites
+
+You will need a [Google Cloud Platform Console][developer-console] project with the Migration Center API [API enabled][enable-api].
+You will need to [enable billing][enable-billing] to use Google Migration Center API.
+[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
+[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:
+`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
+
+### Installation and setup
+
+You'll need to obtain the `google-cloud-migrationcenter` library. See the [Quickstart](#quickstart) section
+to add `google-cloud-migrationcenter` as a dependency in your code.
+
+## About Migration Center API
+
+
+[Migration Center API][product-docs] Google Cloud Migration Center is a unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud
+
+See the [Migration Center API client library docs][javadocs] to learn how to
+use this Migration Center API Client Library.
+
+
+
+
+
+
+## Troubleshooting
+
+To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].
+
+## Transport
+
+Migration Center API uses gRPC for the transport layer.
+
+## Supported Java Versions
+
+Java 8 or above is required for using this client.
+
+Google's Java client libraries,
+[Google Cloud Client Libraries][cloudlibs]
+and
+[Google Cloud API Libraries][apilibs],
+follow the
+[Oracle Java SE support roadmap][oracle]
+(see the Oracle Java SE Product Releases section).
+
+### For new development
+
+In general, new feature development occurs with support for the lowest Java
+LTS version covered by Oracle's Premier Support (which typically lasts 5 years
+from initial General Availability). If the minimum required JVM for a given
+library is changed, it is accompanied by a [semver][semver] major release.
+
+Java 11 and (in September 2021) Java 17 are the best choices for new
+development.
+
+### Keeping production systems current
+
+Google tests its client libraries with all current LTS versions covered by
+Oracle's Extended Support (which typically lasts 8 years from initial
+General Availability).
+
+#### Legacy support
+
+Google's client libraries support legacy versions of Java runtimes with long
+term stable libraries that don't receive feature updates on a best efforts basis
+as it may not be possible to backport all patches.
+
+Google provides updates on a best efforts basis to apps that continue to use
+Java 7, though apps might need to upgrade to current versions of the library
+that supports their JVM.
+
+#### Where to find specific information
+
+The latest versions and the supported Java versions are identified on
+the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME`
+and on [google-cloud-java][g-c-j].
+
+## Versioning
+
+
+This library follows [Semantic Versioning](http://semver.org/).
+
+
+It is currently in major version zero (``0.y.z``), which means that anything may change at any time
+and the public API should not be considered stable.
+
+
+## Contributing
+
+
+Contributions to this library are always welcome and highly encouraged.
+
+See [CONTRIBUTING][contributing] for more information how to get started.
+
+Please note that this project is released with a Contributor Code of Conduct. By participating in
+this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more
+information.
+
+
+## License
+
+Apache 2.0 - See [LICENSE][license] for more information.
+
+## CI Status
+
+Java Version | Status
+------------ | ------
+Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2]
+Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3]
+Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4]
+Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]
+
+Java is a registered trademark of Oracle and/or its affiliates.
+
+[product-docs]: https://cloud.google.com/migration-center/docs/migration-center-overview
+[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-migrationcenter/latest/overview
+[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java7.svg
+[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java7.html
+[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8.svg
+[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8.html
+[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8-osx.svg
+[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8-osx.html
+[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8-win.svg
+[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java8-win.html
+[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java11.svg
+[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-migrationcenter/java11.html
+[stability-image]: https://img.shields.io/badge/stability-preview-yellow
+[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-migrationcenter.svg
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-migrationcenter/0.0.0
+[authentication]: https://github.com/googleapis/google-cloud-java#authentication
+[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
+[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
+[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy
+[developer-console]: https://console.developers.google.com/
+[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
+[cloud-cli]: https://cloud.google.com/cli
+[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md
+[contributing]: https://github.com/googleapis/java-migrationcenter/blob/main/CONTRIBUTING.md
+[code-of-conduct]: https://github.com/googleapis/java-migrationcenter/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
+[license]: https://github.com/googleapis/java-migrationcenter/blob/main/LICENSE
+[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
+[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=migrationcenter.googleapis.com
+[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
+[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
+
+[semver]: https://semver.org/
+[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained
+[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries
+[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html
+[g-c-j]: http://github.com/googleapis/google-cloud-java
diff --git a/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml b/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml
new file mode 100644
index 000000000000..6748ea98ff57
--- /dev/null
+++ b/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml
@@ -0,0 +1,44 @@
+
+
+ 4.0.0
+ com.google.cloud
+ google-cloud-migrationcenter-bom
+ 0.0.1-SNAPSHOT
+ pom
+
+
+ com.google.cloud
+ google-cloud-pom-parent
+ 1.13.0-SNAPSHOT
+ ../../google-cloud-pom-parent/pom.xml
+
+
+ Google Migration Center API BOM
+
+ BOM for Migration Center API
+
+
+
+ true
+
+
+
+
+
+ com.google.cloud
+ google-cloud-migrationcenter
+ 0.0.1-SNAPSHOT
+
+
+ com.google.api.grpc
+ grpc-google-cloud-migrationcenter-v1
+ 0.0.1-SNAPSHOT
+
+
+ com.google.api.grpc
+ proto-google-cloud-migrationcenter-v1
+ 0.0.1-SNAPSHOT
+
+
+
+
diff --git a/java-migrationcenter/google-cloud-migrationcenter/pom.xml b/java-migrationcenter/google-cloud-migrationcenter/pom.xml
new file mode 100644
index 000000000000..98287a6c5554
--- /dev/null
+++ b/java-migrationcenter/google-cloud-migrationcenter/pom.xml
@@ -0,0 +1,113 @@
+
+
+ 4.0.0
+ com.google.cloud
+ google-cloud-migrationcenter
+ 0.0.1-SNAPSHOT
+ jar
+ Google Migration Center API
+ Migration Center API Google Cloud Migration Center is a unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud
+
+ com.google.cloud
+ google-cloud-migrationcenter-parent
+ 0.0.1-SNAPSHOT
+
+
+ google-cloud-migrationcenter
+
+
+
+ io.grpc
+ grpc-api
+
+
+ io.grpc
+ grpc-stub
+
+
+ io.grpc
+ grpc-protobuf
+
+
+ com.google.api
+ api-common
+
+
+ com.google.protobuf
+ protobuf-java
+
+
+ com.google.api.grpc
+ proto-google-common-protos
+
+
+
+ com.google.api.grpc
+ proto-google-cloud-migrationcenter-v1
+
+
+ com.google.guava
+ guava
+
+
+ com.google.api
+ gax
+
+
+ com.google.api
+ gax-grpc
+
+
+ com.google.api
+ gax-httpjson
+
+
+ com.google.api.grpc
+ grpc-google-common-protos
+
+
+ com.google.api.grpc
+ proto-google-iam-v1
+
+
+ com.google.api.grpc
+ grpc-google-iam-v1
+
+
+ org.threeten
+ threetenbp
+
+
+
+
+ junit
+ junit
+ test
+
+
+
+ com.google.api.grpc
+ grpc-google-cloud-migrationcenter-v1
+ test
+
+
+
+ com.google.api
+ gax
+ testlib
+ test
+
+
+ com.google.api
+ gax-grpc
+ testlib
+ test
+
+
+ com.google.api
+ gax-httpjson
+ testlib
+ test
+
+
+
diff --git a/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterClient.java b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterClient.java
new file mode 100644
index 000000000000..ac36b7910163
--- /dev/null
+++ b/java-migrationcenter/google-cloud-migrationcenter/src/main/java/com/google/cloud/migrationcenter/v1/MigrationCenterClient.java
@@ -0,0 +1,7857 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.migrationcenter.v1;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.migrationcenter.v1.stub.MigrationCenterStub;
+import com.google.cloud.migrationcenter.v1.stub.MigrationCenterStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: Service describing handlers for resources.
+ *
+ *
This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
+ * Asset response = migrationCenterClient.getAsset(name);
+ * }
+ * }
+ *
+ *
Note: close() needs to be called on the MigrationCenterClient 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:
+ *
+ *
+ *
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.
+ *
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.
+ *
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 MigrationCenterSettings to
+ * create(). For example:
+ *
+ *
To customize credentials:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MigrationCenterSettings migrationCenterSettings =
+ * MigrationCenterSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * MigrationCenterClient migrationCenterClient =
+ * MigrationCenterClient.create(migrationCenterSettings);
+ * }
+ *
+ *
To customize the endpoint:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MigrationCenterSettings migrationCenterSettings =
+ * MigrationCenterSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * MigrationCenterClient migrationCenterClient =
+ * MigrationCenterClient.create(migrationCenterSettings);
+ * }
+ *
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MigrationCenterSettings migrationCenterSettings =
+ * MigrationCenterSettings.newHttpJsonBuilder().build();
+ * MigrationCenterClient migrationCenterClient =
+ * MigrationCenterClient.create(migrationCenterSettings);
+ * }
+ *
+ *
Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class MigrationCenterClient implements BackgroundResource {
+ private final MigrationCenterSettings settings;
+ private final MigrationCenterStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of MigrationCenterClient with default settings. */
+ public static final MigrationCenterClient create() throws IOException {
+ return create(MigrationCenterSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of MigrationCenterClient, 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 MigrationCenterClient create(MigrationCenterSettings settings)
+ throws IOException {
+ return new MigrationCenterClient(settings);
+ }
+
+ /**
+ * Constructs an instance of MigrationCenterClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(MigrationCenterSettings).
+ */
+ public static final MigrationCenterClient create(MigrationCenterStub stub) {
+ return new MigrationCenterClient(stub);
+ }
+
+ /**
+ * Constructs an instance of MigrationCenterClient, 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 MigrationCenterClient(MigrationCenterSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((MigrationCenterStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected MigrationCenterClient(MigrationCenterStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ public final MigrationCenterSettings getSettings() {
+ return settings;
+ }
+
+ public MigrationCenterStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the assets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListAssetsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAssetsPagedResponse listAssets(LocationName parent) {
+ ListAssetsRequest request =
+ ListAssetsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listAssets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the assets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListAssetsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAssetsPagedResponse listAssets(String parent) {
+ ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build();
+ return listAssets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the assets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListAssetsRequest request =
+ * ListAssetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setView(AssetView.forNumber(0))
+ * .build();
+ * for (Asset element : migrationCenterClient.listAssets(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 ListAssetsPagedResponse listAssets(ListAssetsRequest request) {
+ return listAssetsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the assets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListAssetsRequest request =
+ * ListAssetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setView(AssetView.forNumber(0))
+ * .build();
+ * ApiFuture future = migrationCenterClient.listAssetsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Asset element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listAssetsPagedCallable() {
+ return stub.listAssetsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the assets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListAssetsRequest request =
+ * ListAssetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setView(AssetView.forNumber(0))
+ * .build();
+ * while (true) {
+ * ListAssetsResponse response = migrationCenterClient.listAssetsCallable().call(request);
+ * for (Asset element : response.getAssetsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listAssetsCallable() {
+ return stub.listAssetsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
+ * Asset response = migrationCenterClient.getAsset(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Asset getAsset(AssetName name) {
+ GetAssetRequest request =
+ GetAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getAsset(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString();
+ * Asset response = migrationCenterClient.getAsset(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Asset getAsset(String name) {
+ GetAssetRequest request = GetAssetRequest.newBuilder().setName(name).build();
+ return getAsset(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetAssetRequest request =
+ * GetAssetRequest.newBuilder()
+ * .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
+ * .setView(AssetView.forNumber(0))
+ * .build();
+ * Asset response = migrationCenterClient.getAsset(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 Asset getAsset(GetAssetRequest request) {
+ return getAssetCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetAssetRequest request =
+ * GetAssetRequest.newBuilder()
+ * .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
+ * .setView(AssetView.forNumber(0))
+ * .build();
+ * ApiFuture future = migrationCenterClient.getAssetCallable().futureCall(request);
+ * // Do something.
+ * Asset response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getAssetCallable() {
+ return stub.getAssetCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * Asset asset = Asset.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Asset response = migrationCenterClient.updateAsset(asset, updateMask);
+ * }
+ * }
+ *
+ * @param asset Required. The resource being updated.
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * `Asset` resource by the update. The values specified in the `update_mask` field are
+ * relative to the resource, not the full request. A field will be overwritten if it is in the
+ * mask. A single * value in the mask lets you to overwrite all fields.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Asset updateAsset(Asset asset, FieldMask updateMask) {
+ UpdateAssetRequest request =
+ UpdateAssetRequest.newBuilder().setAsset(asset).setUpdateMask(updateMask).build();
+ return updateAsset(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateAssetRequest request =
+ * UpdateAssetRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAsset(Asset.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Asset response = migrationCenterClient.updateAsset(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 Asset updateAsset(UpdateAssetRequest request) {
+ return updateAssetCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateAssetRequest request =
+ * UpdateAssetRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAsset(Asset.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = migrationCenterClient.updateAssetCallable().futureCall(request);
+ * // Do something.
+ * Asset response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateAssetCallable() {
+ return stub.updateAssetCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a list of assets.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * List requests = new ArrayList<>();
+ * BatchUpdateAssetsResponse response =
+ * migrationCenterClient.batchUpdateAssets(parent, requests);
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for batch asset update.
+ * @param requests Required. The request message specifying the resources to update. A maximum of
+ * 1000 assets can be modified in a batch.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final BatchUpdateAssetsResponse batchUpdateAssets(
+ LocationName parent, List requests) {
+ BatchUpdateAssetsRequest request =
+ BatchUpdateAssetsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .addAllRequests(requests)
+ .build();
+ return batchUpdateAssets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a list of assets.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * List requests = new ArrayList<>();
+ * BatchUpdateAssetsResponse response =
+ * migrationCenterClient.batchUpdateAssets(parent, requests);
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for batch asset update.
+ * @param requests Required. The request message specifying the resources to update. A maximum of
+ * 1000 assets can be modified in a batch.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final BatchUpdateAssetsResponse batchUpdateAssets(
+ String parent, List requests) {
+ BatchUpdateAssetsRequest request =
+ BatchUpdateAssetsRequest.newBuilder().setParent(parent).addAllRequests(requests).build();
+ return batchUpdateAssets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a list of assets.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * BatchUpdateAssetsRequest request =
+ * BatchUpdateAssetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .addAllRequests(new ArrayList())
+ * .build();
+ * BatchUpdateAssetsResponse response = migrationCenterClient.batchUpdateAssets(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 BatchUpdateAssetsResponse batchUpdateAssets(BatchUpdateAssetsRequest request) {
+ return batchUpdateAssetsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a list of assets.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * BatchUpdateAssetsRequest request =
+ * BatchUpdateAssetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .addAllRequests(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.batchUpdateAssetsCallable().futureCall(request);
+ * // Do something.
+ * BatchUpdateAssetsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ batchUpdateAssetsCallable() {
+ return stub.batchUpdateAssetsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
+ * migrationCenterClient.deleteAsset(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAsset(AssetName name) {
+ DeleteAssetRequest request =
+ DeleteAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteAsset(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString();
+ * migrationCenterClient.deleteAsset(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAsset(String name) {
+ DeleteAssetRequest request = DeleteAssetRequest.newBuilder().setName(name).build();
+ deleteAsset(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteAssetRequest request =
+ * DeleteAssetRequest.newBuilder()
+ * .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * migrationCenterClient.deleteAsset(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 void deleteAsset(DeleteAssetRequest request) {
+ deleteAssetCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an asset.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteAssetRequest request =
+ * DeleteAssetRequest.newBuilder()
+ * .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = migrationCenterClient.deleteAssetCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteAssetCallable() {
+ return stub.deleteAssetCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes list of Assets.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * List names = new ArrayList<>();
+ * migrationCenterClient.batchDeleteAssets(parent, names);
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for batch asset delete.
+ * @param names Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted
+ * in a batch. Format: projects/{project}/locations/{location}/assets/{name}.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void batchDeleteAssets(LocationName parent, List names) {
+ BatchDeleteAssetsRequest request =
+ BatchDeleteAssetsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .addAllNames(names)
+ .build();
+ batchDeleteAssets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes list of Assets.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * List names = new ArrayList<>();
+ * migrationCenterClient.batchDeleteAssets(parent, names);
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for batch asset delete.
+ * @param names Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted
+ * in a batch. Format: projects/{project}/locations/{location}/assets/{name}.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void batchDeleteAssets(String parent, List names) {
+ BatchDeleteAssetsRequest request =
+ BatchDeleteAssetsRequest.newBuilder().setParent(parent).addAllNames(names).build();
+ batchDeleteAssets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes list of Assets.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * BatchDeleteAssetsRequest request =
+ * BatchDeleteAssetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .addAllNames(new ArrayList())
+ * .setAllowMissing(true)
+ * .build();
+ * migrationCenterClient.batchDeleteAssets(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 void batchDeleteAssets(BatchDeleteAssetsRequest request) {
+ batchDeleteAssetsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes list of Assets.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * BatchDeleteAssetsRequest request =
+ * BatchDeleteAssetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .addAllNames(new ArrayList())
+ * .setAllowMissing(true)
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.batchDeleteAssetsCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable batchDeleteAssetsCallable() {
+ return stub.batchDeleteAssetsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Reports a set of frames.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ReportAssetFramesRequest request =
+ * ReportAssetFramesRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setFrames(Frames.newBuilder().build())
+ * .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .build();
+ * ReportAssetFramesResponse response = migrationCenterClient.reportAssetFrames(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 ReportAssetFramesResponse reportAssetFrames(ReportAssetFramesRequest request) {
+ return reportAssetFramesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Reports a set of frames.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ReportAssetFramesRequest request =
+ * ReportAssetFramesRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setFrames(Frames.newBuilder().build())
+ * .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.reportAssetFramesCallable().futureCall(request);
+ * // Do something.
+ * ReportAssetFramesResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ reportAssetFramesCallable() {
+ return stub.reportAssetFramesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Aggregates the requested fields based on provided function.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * AggregateAssetsValuesRequest request =
+ * AggregateAssetsValuesRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .addAllAggregations(new ArrayList())
+ * .setFilter("filter-1274492040")
+ * .build();
+ * AggregateAssetsValuesResponse response = migrationCenterClient.aggregateAssetsValues(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 AggregateAssetsValuesResponse aggregateAssetsValues(
+ AggregateAssetsValuesRequest request) {
+ return aggregateAssetsValuesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Aggregates the requested fields based on provided function.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * AggregateAssetsValuesRequest request =
+ * AggregateAssetsValuesRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .addAllAggregations(new ArrayList())
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.aggregateAssetsValuesCallable().futureCall(request);
+ * // Do something.
+ * AggregateAssetsValuesResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ aggregateAssetsValuesCallable() {
+ return stub.aggregateAssetsValuesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ImportJob importJob = ImportJob.newBuilder().build();
+ * String importJobId = "importJobId1449444627";
+ * ImportJob response =
+ * migrationCenterClient.createImportJobAsync(parent, importJob, importJobId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param importJob Required. The resource being created.
+ * @param importJobId Required. ID of the import job.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createImportJobAsync(
+ LocationName parent, ImportJob importJob, String importJobId) {
+ CreateImportJobRequest request =
+ CreateImportJobRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setImportJob(importJob)
+ .setImportJobId(importJobId)
+ .build();
+ return createImportJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * ImportJob importJob = ImportJob.newBuilder().build();
+ * String importJobId = "importJobId1449444627";
+ * ImportJob response =
+ * migrationCenterClient.createImportJobAsync(parent, importJob, importJobId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param importJob Required. The resource being created.
+ * @param importJobId Required. ID of the import job.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createImportJobAsync(
+ String parent, ImportJob importJob, String importJobId) {
+ CreateImportJobRequest request =
+ CreateImportJobRequest.newBuilder()
+ .setParent(parent)
+ .setImportJob(importJob)
+ .setImportJobId(importJobId)
+ .build();
+ return createImportJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateImportJobRequest request =
+ * CreateImportJobRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setImportJobId("importJobId1449444627")
+ * .setImportJob(ImportJob.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ImportJob response = migrationCenterClient.createImportJobAsync(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 createImportJobAsync(
+ CreateImportJobRequest request) {
+ return createImportJobOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateImportJobRequest request =
+ * CreateImportJobRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setImportJobId("importJobId1449444627")
+ * .setImportJob(ImportJob.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.createImportJobOperationCallable().futureCall(request);
+ * // Do something.
+ * ImportJob response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createImportJobOperationCallable() {
+ return stub.createImportJobOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateImportJobRequest request =
+ * CreateImportJobRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setImportJobId("importJobId1449444627")
+ * .setImportJob(ImportJob.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.createImportJobCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createImportJobCallable() {
+ return stub.createImportJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all import jobs.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListImportJobsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListImportJobsPagedResponse listImportJobs(LocationName parent) {
+ ListImportJobsRequest request =
+ ListImportJobsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listImportJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all import jobs.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListImportJobsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListImportJobsPagedResponse listImportJobs(String parent) {
+ ListImportJobsRequest request = ListImportJobsRequest.newBuilder().setParent(parent).build();
+ return listImportJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all import jobs.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListImportJobsRequest request =
+ * ListImportJobsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setView(ImportJobView.forNumber(0))
+ * .build();
+ * for (ImportJob element : migrationCenterClient.listImportJobs(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 ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest request) {
+ return listImportJobsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all import jobs.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListImportJobsRequest request =
+ * ListImportJobsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setView(ImportJobView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.listImportJobsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ImportJob element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listImportJobsPagedCallable() {
+ return stub.listImportJobsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all import jobs.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListImportJobsRequest request =
+ * ListImportJobsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setView(ImportJobView.forNumber(0))
+ * .build();
+ * while (true) {
+ * ListImportJobsResponse response =
+ * migrationCenterClient.listImportJobsCallable().call(request);
+ * for (ImportJob element : response.getImportJobsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listImportJobsCallable() {
+ return stub.listImportJobsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+ * ImportJob response = migrationCenterClient.getImportJob(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ImportJob getImportJob(ImportJobName name) {
+ GetImportJobRequest request =
+ GetImportJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getImportJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+ * ImportJob response = migrationCenterClient.getImportJob(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ImportJob getImportJob(String name) {
+ GetImportJobRequest request = GetImportJobRequest.newBuilder().setName(name).build();
+ return getImportJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetImportJobRequest request =
+ * GetImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setView(ImportJobView.forNumber(0))
+ * .build();
+ * ImportJob response = migrationCenterClient.getImportJob(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 ImportJob getImportJob(GetImportJobRequest request) {
+ return getImportJobCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetImportJobRequest request =
+ * GetImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setView(ImportJobView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.getImportJobCallable().futureCall(request);
+ * // Do something.
+ * ImportJob response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getImportJobCallable() {
+ return stub.getImportJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+ * migrationCenterClient.deleteImportJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteImportJobAsync(ImportJobName name) {
+ DeleteImportJobRequest request =
+ DeleteImportJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteImportJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+ * migrationCenterClient.deleteImportJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteImportJobAsync(String name) {
+ DeleteImportJobRequest request = DeleteImportJobRequest.newBuilder().setName(name).build();
+ return deleteImportJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteImportJobRequest request =
+ * DeleteImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setRequestId("requestId693933066")
+ * .setForce(true)
+ * .build();
+ * migrationCenterClient.deleteImportJobAsync(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 deleteImportJobAsync(
+ DeleteImportJobRequest request) {
+ return deleteImportJobOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteImportJobRequest request =
+ * DeleteImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setRequestId("requestId693933066")
+ * .setForce(true)
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.deleteImportJobOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteImportJobOperationCallable() {
+ return stub.deleteImportJobOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteImportJobRequest request =
+ * DeleteImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setRequestId("requestId693933066")
+ * .setForce(true)
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.deleteImportJobCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteImportJobCallable() {
+ return stub.deleteImportJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ImportJob importJob = ImportJob.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * ImportJob response = migrationCenterClient.updateImportJobAsync(importJob, updateMask).get();
+ * }
+ * }
+ *
+ * @param importJob Required. The resource being updated
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * `Asset` resource by the update. The values specified in the `update_mask` field are
+ * relative to the resource, not the full request. A field will be overwritten if it is in the
+ * mask. A single * value in the mask lets you to overwrite all fields.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateImportJobAsync(
+ ImportJob importJob, FieldMask updateMask) {
+ UpdateImportJobRequest request =
+ UpdateImportJobRequest.newBuilder()
+ .setImportJob(importJob)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateImportJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateImportJobRequest request =
+ * UpdateImportJobRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setImportJob(ImportJob.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ImportJob response = migrationCenterClient.updateImportJobAsync(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 updateImportJobAsync(
+ UpdateImportJobRequest request) {
+ return updateImportJobOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateImportJobRequest request =
+ * UpdateImportJobRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setImportJob(ImportJob.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.updateImportJobOperationCallable().futureCall(request);
+ * // Do something.
+ * ImportJob response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ updateImportJobOperationCallable() {
+ return stub.updateImportJobOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateImportJobRequest request =
+ * UpdateImportJobRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setImportJob(ImportJob.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.updateImportJobCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateImportJobCallable() {
+ return stub.updateImportJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Validates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+ * migrationCenterClient.validateImportJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the import job to validate.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture validateImportJobAsync(
+ ImportJobName name) {
+ ValidateImportJobRequest request =
+ ValidateImportJobRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return validateImportJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Validates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+ * migrationCenterClient.validateImportJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the import job to validate.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture validateImportJobAsync(String name) {
+ ValidateImportJobRequest request = ValidateImportJobRequest.newBuilder().setName(name).build();
+ return validateImportJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Validates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ValidateImportJobRequest request =
+ * ValidateImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * migrationCenterClient.validateImportJobAsync(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 validateImportJobAsync(
+ ValidateImportJobRequest request) {
+ return validateImportJobOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Validates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ValidateImportJobRequest request =
+ * ValidateImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.validateImportJobOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ validateImportJobOperationCallable() {
+ return stub.validateImportJobOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Validates an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ValidateImportJobRequest request =
+ * ValidateImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.validateImportJobCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable validateImportJobCallable() {
+ return stub.validateImportJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+ * migrationCenterClient.runImportJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the import job to run.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture runImportJobAsync(ImportJobName name) {
+ RunImportJobRequest request =
+ RunImportJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return runImportJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+ * migrationCenterClient.runImportJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the import job to run.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture runImportJobAsync(String name) {
+ RunImportJobRequest request = RunImportJobRequest.newBuilder().setName(name).build();
+ return runImportJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * RunImportJobRequest request =
+ * RunImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * migrationCenterClient.runImportJobAsync(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 runImportJobAsync(
+ RunImportJobRequest request) {
+ return runImportJobOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * RunImportJobRequest request =
+ * RunImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.runImportJobOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ runImportJobOperationCallable() {
+ return stub.runImportJobOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs an import job.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * RunImportJobRequest request =
+ * RunImportJobRequest.newBuilder()
+ * .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.runImportJobCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable runImportJobCallable() {
+ return stub.runImportJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ImportDataFileName name =
+ * ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]");
+ * ImportDataFile response = migrationCenterClient.getImportDataFile(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the ImportDataFile.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ImportDataFile getImportDataFile(ImportDataFileName name) {
+ GetImportDataFileRequest request =
+ GetImportDataFileRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getImportDataFile(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name =
+ * ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+ * .toString();
+ * ImportDataFile response = migrationCenterClient.getImportDataFile(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the ImportDataFile.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ImportDataFile getImportDataFile(String name) {
+ GetImportDataFileRequest request = GetImportDataFileRequest.newBuilder().setName(name).build();
+ return getImportDataFile(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetImportDataFileRequest request =
+ * GetImportDataFileRequest.newBuilder()
+ * .setName(
+ * ImportDataFileName.of(
+ * "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+ * .toString())
+ * .build();
+ * ImportDataFile response = migrationCenterClient.getImportDataFile(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 ImportDataFile getImportDataFile(GetImportDataFileRequest request) {
+ return getImportDataFileCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetImportDataFileRequest request =
+ * GetImportDataFileRequest.newBuilder()
+ * .setName(
+ * ImportDataFileName.of(
+ * "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.getImportDataFileCallable().futureCall(request);
+ * // Do something.
+ * ImportDataFile response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getImportDataFileCallable() {
+ return stub.getImportDataFileCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List import data files.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+ * for (ImportDataFile element :
+ * migrationCenterClient.listImportDataFiles(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Name of the parent of the `ImportDataFiles` resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListImportDataFilesPagedResponse listImportDataFiles(ImportJobName parent) {
+ ListImportDataFilesRequest request =
+ ListImportDataFilesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listImportDataFiles(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List import data files.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+ * for (ImportDataFile element :
+ * migrationCenterClient.listImportDataFiles(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Name of the parent of the `ImportDataFiles` resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListImportDataFilesPagedResponse listImportDataFiles(String parent) {
+ ListImportDataFilesRequest request =
+ ListImportDataFilesRequest.newBuilder().setParent(parent).build();
+ return listImportDataFiles(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List import data files.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListImportDataFilesRequest request =
+ * ListImportDataFilesRequest.newBuilder()
+ * .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (ImportDataFile element :
+ * migrationCenterClient.listImportDataFiles(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 ListImportDataFilesPagedResponse listImportDataFiles(
+ ListImportDataFilesRequest request) {
+ return listImportDataFilesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List import data files.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListImportDataFilesRequest request =
+ * ListImportDataFilesRequest.newBuilder()
+ * .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.listImportDataFilesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ImportDataFile element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listImportDataFilesPagedCallable() {
+ return stub.listImportDataFilesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List import data files.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListImportDataFilesRequest request =
+ * ListImportDataFilesRequest.newBuilder()
+ * .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListImportDataFilesResponse response =
+ * migrationCenterClient.listImportDataFilesCallable().call(request);
+ * for (ImportDataFile element : response.getImportDataFilesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listImportDataFilesCallable() {
+ return stub.listImportDataFilesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
+ * ImportDataFile importDataFile = ImportDataFile.newBuilder().build();
+ * String importDataFileId = "importDataFileId-1812510330";
+ * ImportDataFile response =
+ * migrationCenterClient
+ * .createImportDataFileAsync(parent, importDataFile, importDataFileId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. Name of the parent of the ImportDataFile.
+ * @param importDataFile Required. The resource being created.
+ * @param importDataFileId Required. The ID of the new data file.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createImportDataFileAsync(
+ ImportJobName parent, ImportDataFile importDataFile, String importDataFileId) {
+ CreateImportDataFileRequest request =
+ CreateImportDataFileRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setImportDataFile(importDataFile)
+ .setImportDataFileId(importDataFileId)
+ .build();
+ return createImportDataFileAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
+ * ImportDataFile importDataFile = ImportDataFile.newBuilder().build();
+ * String importDataFileId = "importDataFileId-1812510330";
+ * ImportDataFile response =
+ * migrationCenterClient
+ * .createImportDataFileAsync(parent, importDataFile, importDataFileId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. Name of the parent of the ImportDataFile.
+ * @param importDataFile Required. The resource being created.
+ * @param importDataFileId Required. The ID of the new data file.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createImportDataFileAsync(
+ String parent, ImportDataFile importDataFile, String importDataFileId) {
+ CreateImportDataFileRequest request =
+ CreateImportDataFileRequest.newBuilder()
+ .setParent(parent)
+ .setImportDataFile(importDataFile)
+ .setImportDataFileId(importDataFileId)
+ .build();
+ return createImportDataFileAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateImportDataFileRequest request =
+ * CreateImportDataFileRequest.newBuilder()
+ * .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setImportDataFileId("importDataFileId-1812510330")
+ * .setImportDataFile(ImportDataFile.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ImportDataFile response = migrationCenterClient.createImportDataFileAsync(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 createImportDataFileAsync(
+ CreateImportDataFileRequest request) {
+ return createImportDataFileOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateImportDataFileRequest request =
+ * CreateImportDataFileRequest.newBuilder()
+ * .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setImportDataFileId("importDataFileId-1812510330")
+ * .setImportDataFile(ImportDataFile.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.createImportDataFileOperationCallable().futureCall(request);
+ * // Do something.
+ * ImportDataFile response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createImportDataFileOperationCallable() {
+ return stub.createImportDataFileOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateImportDataFileRequest request =
+ * CreateImportDataFileRequest.newBuilder()
+ * .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
+ * .setImportDataFileId("importDataFileId-1812510330")
+ * .setImportDataFile(ImportDataFile.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.createImportDataFileCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ createImportDataFileCallable() {
+ return stub.createImportDataFileCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ImportDataFileName name =
+ * ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]");
+ * migrationCenterClient.deleteImportDataFileAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the ImportDataFile to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteImportDataFileAsync(
+ ImportDataFileName name) {
+ DeleteImportDataFileRequest request =
+ DeleteImportDataFileRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return deleteImportDataFileAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name =
+ * ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+ * .toString();
+ * migrationCenterClient.deleteImportDataFileAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the ImportDataFile to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteImportDataFileAsync(String name) {
+ DeleteImportDataFileRequest request =
+ DeleteImportDataFileRequest.newBuilder().setName(name).build();
+ return deleteImportDataFileAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteImportDataFileRequest request =
+ * DeleteImportDataFileRequest.newBuilder()
+ * .setName(
+ * ImportDataFileName.of(
+ * "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * migrationCenterClient.deleteImportDataFileAsync(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 deleteImportDataFileAsync(
+ DeleteImportDataFileRequest request) {
+ return deleteImportDataFileOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteImportDataFileRequest request =
+ * DeleteImportDataFileRequest.newBuilder()
+ * .setName(
+ * ImportDataFileName.of(
+ * "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.deleteImportDataFileOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteImportDataFileOperationCallable() {
+ return stub.deleteImportDataFileOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete an import data file.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteImportDataFileRequest request =
+ * DeleteImportDataFileRequest.newBuilder()
+ * .setName(
+ * ImportDataFileName.of(
+ * "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.deleteImportDataFileCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ deleteImportDataFileCallable() {
+ return stub.deleteImportDataFileCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all groups in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListGroupsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGroupsPagedResponse listGroups(LocationName parent) {
+ ListGroupsRequest request =
+ ListGroupsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all groups in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListGroupsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGroupsPagedResponse listGroups(String parent) {
+ ListGroupsRequest request = ListGroupsRequest.newBuilder().setParent(parent).build();
+ return listGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all groups in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListGroupsRequest request =
+ * ListGroupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Group element : migrationCenterClient.listGroups(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 ListGroupsPagedResponse listGroups(ListGroupsRequest request) {
+ return listGroupsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all groups in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListGroupsRequest request =
+ * ListGroupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future = migrationCenterClient.listGroupsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Group element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listGroupsPagedCallable() {
+ return stub.listGroupsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all groups in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListGroupsRequest request =
+ * ListGroupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListGroupsResponse response = migrationCenterClient.listGroupsCallable().call(request);
+ * for (Group element : response.getGroupsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listGroupsCallable() {
+ return stub.listGroupsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
+ * Group response = migrationCenterClient.getGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Group getGroup(GroupName name) {
+ GetGroupRequest request =
+ GetGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
+ * Group response = migrationCenterClient.getGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Group getGroup(String name) {
+ GetGroupRequest request = GetGroupRequest.newBuilder().setName(name).build();
+ return getGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetGroupRequest request =
+ * GetGroupRequest.newBuilder()
+ * .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .build();
+ * Group response = migrationCenterClient.getGroup(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 Group getGroup(GetGroupRequest request) {
+ return getGroupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetGroupRequest request =
+ * GetGroupRequest.newBuilder()
+ * .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .build();
+ * ApiFuture future = migrationCenterClient.getGroupCallable().futureCall(request);
+ * // Do something.
+ * Group response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getGroupCallable() {
+ return stub.getGroupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new group in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Group group = Group.newBuilder().build();
+ * String groupId = "groupId293428218";
+ * Group response = migrationCenterClient.createGroupAsync(parent, group, groupId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param group Required. The group resource being created.
+ * @param groupId Required. User specified ID for the group. It will become the last component of
+ * the group name. The ID must be unique within the project, must conform with RFC-1034, is
+ * restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must
+ * match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createGroupAsync(
+ LocationName parent, Group group, String groupId) {
+ CreateGroupRequest request =
+ CreateGroupRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setGroup(group)
+ .setGroupId(groupId)
+ .build();
+ return createGroupAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new group in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Group group = Group.newBuilder().build();
+ * String groupId = "groupId293428218";
+ * Group response = migrationCenterClient.createGroupAsync(parent, group, groupId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param group Required. The group resource being created.
+ * @param groupId Required. User specified ID for the group. It will become the last component of
+ * the group name. The ID must be unique within the project, must conform with RFC-1034, is
+ * restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must
+ * match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createGroupAsync(
+ String parent, Group group, String groupId) {
+ CreateGroupRequest request =
+ CreateGroupRequest.newBuilder()
+ .setParent(parent)
+ .setGroup(group)
+ .setGroupId(groupId)
+ .build();
+ return createGroupAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new group in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateGroupRequest request =
+ * CreateGroupRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setGroupId("groupId293428218")
+ * .setGroup(Group.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Group response = migrationCenterClient.createGroupAsync(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 createGroupAsync(
+ CreateGroupRequest request) {
+ return createGroupOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new group in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateGroupRequest request =
+ * CreateGroupRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setGroupId("groupId293428218")
+ * .setGroup(Group.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.createGroupOperationCallable().futureCall(request);
+ * // Do something.
+ * Group response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createGroupOperationCallable() {
+ return stub.createGroupOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new group in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateGroupRequest request =
+ * CreateGroupRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setGroupId("groupId293428218")
+ * .setGroup(Group.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = migrationCenterClient.createGroupCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createGroupCallable() {
+ return stub.createGroupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * Group group = Group.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Group response = migrationCenterClient.updateGroupAsync(group, updateMask).get();
+ * }
+ * }
+ *
+ * @param group Required. The group resource being updated.
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * `Group` resource by the update. The values specified in the `update_mask` are relative to
+ * the resource, not the full request. A field will be overwritten if it is in the mask. A
+ * single * value in the mask lets you to overwrite all fields.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateGroupAsync(
+ Group group, FieldMask updateMask) {
+ UpdateGroupRequest request =
+ UpdateGroupRequest.newBuilder().setGroup(group).setUpdateMask(updateMask).build();
+ return updateGroupAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateGroupRequest request =
+ * UpdateGroupRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setGroup(Group.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Group response = migrationCenterClient.updateGroupAsync(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 updateGroupAsync(
+ UpdateGroupRequest request) {
+ return updateGroupOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateGroupRequest request =
+ * UpdateGroupRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setGroup(Group.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.updateGroupOperationCallable().futureCall(request);
+ * // Do something.
+ * Group response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ updateGroupOperationCallable() {
+ return stub.updateGroupOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateGroupRequest request =
+ * UpdateGroupRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setGroup(Group.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = migrationCenterClient.updateGroupCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateGroupCallable() {
+ return stub.updateGroupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
+ * migrationCenterClient.deleteGroupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the group resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteGroupAsync(GroupName name) {
+ DeleteGroupRequest request =
+ DeleteGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteGroupAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
+ * migrationCenterClient.deleteGroupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the group resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteGroupAsync(String name) {
+ DeleteGroupRequest request = DeleteGroupRequest.newBuilder().setName(name).build();
+ return deleteGroupAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteGroupRequest request =
+ * DeleteGroupRequest.newBuilder()
+ * .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * migrationCenterClient.deleteGroupAsync(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 deleteGroupAsync(
+ DeleteGroupRequest request) {
+ return deleteGroupOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteGroupRequest request =
+ * DeleteGroupRequest.newBuilder()
+ * .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.deleteGroupOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteGroupOperationCallable() {
+ return stub.deleteGroupOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteGroupRequest request =
+ * DeleteGroupRequest.newBuilder()
+ * .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = migrationCenterClient.deleteGroupCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteGroupCallable() {
+ return stub.deleteGroupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds assets to a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
+ * Group response = migrationCenterClient.addAssetsToGroupAsync(group).get();
+ * }
+ * }
+ *
+ * @param group Required. Group reference.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture addAssetsToGroupAsync(GroupName group) {
+ AddAssetsToGroupRequest request =
+ AddAssetsToGroupRequest.newBuilder()
+ .setGroup(group == null ? null : group.toString())
+ .build();
+ return addAssetsToGroupAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds assets to a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
+ * Group response = migrationCenterClient.addAssetsToGroupAsync(group).get();
+ * }
+ * }
+ *
+ * @param group Required. Group reference.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture addAssetsToGroupAsync(String group) {
+ AddAssetsToGroupRequest request = AddAssetsToGroupRequest.newBuilder().setGroup(group).build();
+ return addAssetsToGroupAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds assets to a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * AddAssetsToGroupRequest request =
+ * AddAssetsToGroupRequest.newBuilder()
+ * .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .setAssets(AssetList.newBuilder().build())
+ * .setAllowExisting(true)
+ * .build();
+ * Group response = migrationCenterClient.addAssetsToGroupAsync(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 addAssetsToGroupAsync(
+ AddAssetsToGroupRequest request) {
+ return addAssetsToGroupOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds assets to a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * AddAssetsToGroupRequest request =
+ * AddAssetsToGroupRequest.newBuilder()
+ * .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .setAssets(AssetList.newBuilder().build())
+ * .setAllowExisting(true)
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.addAssetsToGroupOperationCallable().futureCall(request);
+ * // Do something.
+ * Group response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ addAssetsToGroupOperationCallable() {
+ return stub.addAssetsToGroupOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds assets to a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * AddAssetsToGroupRequest request =
+ * AddAssetsToGroupRequest.newBuilder()
+ * .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .setAssets(AssetList.newBuilder().build())
+ * .setAllowExisting(true)
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.addAssetsToGroupCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable addAssetsToGroupCallable() {
+ return stub.addAssetsToGroupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Removes assets from a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
+ * Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get();
+ * }
+ * }
+ *
+ * @param group Required. Group reference.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture removeAssetsFromGroupAsync(
+ GroupName group) {
+ RemoveAssetsFromGroupRequest request =
+ RemoveAssetsFromGroupRequest.newBuilder()
+ .setGroup(group == null ? null : group.toString())
+ .build();
+ return removeAssetsFromGroupAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Removes assets from a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
+ * Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get();
+ * }
+ * }
+ *
+ * @param group Required. Group reference.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture removeAssetsFromGroupAsync(String group) {
+ RemoveAssetsFromGroupRequest request =
+ RemoveAssetsFromGroupRequest.newBuilder().setGroup(group).build();
+ return removeAssetsFromGroupAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Removes assets from a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * RemoveAssetsFromGroupRequest request =
+ * RemoveAssetsFromGroupRequest.newBuilder()
+ * .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .setAssets(AssetList.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * Group response = migrationCenterClient.removeAssetsFromGroupAsync(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 removeAssetsFromGroupAsync(
+ RemoveAssetsFromGroupRequest request) {
+ return removeAssetsFromGroupOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Removes assets from a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * RemoveAssetsFromGroupRequest request =
+ * RemoveAssetsFromGroupRequest.newBuilder()
+ * .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .setAssets(AssetList.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.removeAssetsFromGroupOperationCallable().futureCall(request);
+ * // Do something.
+ * Group response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ removeAssetsFromGroupOperationCallable() {
+ return stub.removeAssetsFromGroupOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Removes assets from a group.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * RemoveAssetsFromGroupRequest request =
+ * RemoveAssetsFromGroupRequest.newBuilder()
+ * .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
+ * .setRequestId("requestId693933066")
+ * .setAssets(AssetList.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.removeAssetsFromGroupCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ removeAssetsFromGroupCallable() {
+ return stub.removeAssetsFromGroupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all error frames in a given source and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
+ * for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value (the source) for `ListErrorFramesRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListErrorFramesPagedResponse listErrorFrames(SourceName parent) {
+ ListErrorFramesRequest request =
+ ListErrorFramesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listErrorFrames(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all error frames in a given source and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
+ * for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value (the source) for `ListErrorFramesRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListErrorFramesPagedResponse listErrorFrames(String parent) {
+ ListErrorFramesRequest request = ListErrorFramesRequest.newBuilder().setParent(parent).build();
+ return listErrorFrames(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all error frames in a given source and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListErrorFramesRequest request =
+ * ListErrorFramesRequest.newBuilder()
+ * .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setView(ErrorFrameView.forNumber(0))
+ * .build();
+ * for (ErrorFrame element : migrationCenterClient.listErrorFrames(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 ListErrorFramesPagedResponse listErrorFrames(ListErrorFramesRequest request) {
+ return listErrorFramesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all error frames in a given source and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListErrorFramesRequest request =
+ * ListErrorFramesRequest.newBuilder()
+ * .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setView(ErrorFrameView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.listErrorFramesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ErrorFrame element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listErrorFramesPagedCallable() {
+ return stub.listErrorFramesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all error frames in a given source and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListErrorFramesRequest request =
+ * ListErrorFramesRequest.newBuilder()
+ * .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setView(ErrorFrameView.forNumber(0))
+ * .build();
+ * while (true) {
+ * ListErrorFramesResponse response =
+ * migrationCenterClient.listErrorFramesCallable().call(request);
+ * for (ErrorFrame element : response.getErrorFramesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listErrorFramesCallable() {
+ return stub.listErrorFramesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an error frame.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ErrorFrameName name =
+ * ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]");
+ * ErrorFrame response = migrationCenterClient.getErrorFrame(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the frame to retrieve. Format:
+ * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ErrorFrame getErrorFrame(ErrorFrameName name) {
+ GetErrorFrameRequest request =
+ GetErrorFrameRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getErrorFrame(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an error frame.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name =
+ * ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]").toString();
+ * ErrorFrame response = migrationCenterClient.getErrorFrame(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the frame to retrieve. Format:
+ * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ErrorFrame getErrorFrame(String name) {
+ GetErrorFrameRequest request = GetErrorFrameRequest.newBuilder().setName(name).build();
+ return getErrorFrame(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an error frame.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetErrorFrameRequest request =
+ * GetErrorFrameRequest.newBuilder()
+ * .setName(
+ * ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]")
+ * .toString())
+ * .setView(ErrorFrameView.forNumber(0))
+ * .build();
+ * ErrorFrame response = migrationCenterClient.getErrorFrame(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 ErrorFrame getErrorFrame(GetErrorFrameRequest request) {
+ return getErrorFrameCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of an error frame.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetErrorFrameRequest request =
+ * GetErrorFrameRequest.newBuilder()
+ * .setName(
+ * ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]")
+ * .toString())
+ * .setView(ErrorFrameView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.getErrorFrameCallable().futureCall(request);
+ * // Do something.
+ * ErrorFrame response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getErrorFrameCallable() {
+ return stub.getErrorFrameCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the sources in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Source element : migrationCenterClient.listSources(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListSourcesRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSourcesPagedResponse listSources(LocationName parent) {
+ ListSourcesRequest request =
+ ListSourcesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listSources(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the sources in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Source element : migrationCenterClient.listSources(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListSourcesRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSourcesPagedResponse listSources(String parent) {
+ ListSourcesRequest request = ListSourcesRequest.newBuilder().setParent(parent).build();
+ return listSources(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the sources in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListSourcesRequest request =
+ * ListSourcesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Source element : migrationCenterClient.listSources(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 ListSourcesPagedResponse listSources(ListSourcesRequest request) {
+ return listSourcesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the sources in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListSourcesRequest request =
+ * ListSourcesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.listSourcesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Source element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listSourcesPagedCallable() {
+ return stub.listSourcesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the sources in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListSourcesRequest request =
+ * ListSourcesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSourcesResponse response = migrationCenterClient.listSourcesCallable().call(request);
+ * for (Source element : response.getSourcesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listSourcesCallable() {
+ return stub.listSourcesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
+ * Source response = migrationCenterClient.getSource(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Source getSource(SourceName name) {
+ GetSourceRequest request =
+ GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSource(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
+ * Source response = migrationCenterClient.getSource(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Source getSource(String name) {
+ GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build();
+ return getSource(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetSourceRequest request =
+ * GetSourceRequest.newBuilder()
+ * .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .build();
+ * Source response = migrationCenterClient.getSource(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 Source getSource(GetSourceRequest request) {
+ return getSourceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetSourceRequest request =
+ * GetSourceRequest.newBuilder()
+ * .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .build();
+ * ApiFuture future = migrationCenterClient.getSourceCallable().futureCall(request);
+ * // Do something.
+ * Source response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getSourceCallable() {
+ return stub.getSourceCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new source in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Source source = Source.newBuilder().build();
+ * String sourceId = "sourceId1746327190";
+ * Source response = migrationCenterClient.createSourceAsync(parent, source, sourceId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param source Required. The resource being created.
+ * @param sourceId Required. User specified ID for the source. It will become the last component
+ * of the source name. The ID must be unique within the project, must conform with RFC-1034,
+ * is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID
+ * must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createSourceAsync(
+ LocationName parent, Source source, String sourceId) {
+ CreateSourceRequest request =
+ CreateSourceRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setSource(source)
+ .setSourceId(sourceId)
+ .build();
+ return createSourceAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new source in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Source source = Source.newBuilder().build();
+ * String sourceId = "sourceId1746327190";
+ * Source response = migrationCenterClient.createSourceAsync(parent, source, sourceId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param source Required. The resource being created.
+ * @param sourceId Required. User specified ID for the source. It will become the last component
+ * of the source name. The ID must be unique within the project, must conform with RFC-1034,
+ * is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID
+ * must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createSourceAsync(
+ String parent, Source source, String sourceId) {
+ CreateSourceRequest request =
+ CreateSourceRequest.newBuilder()
+ .setParent(parent)
+ .setSource(source)
+ .setSourceId(sourceId)
+ .build();
+ return createSourceAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new source in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateSourceRequest request =
+ * CreateSourceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSourceId("sourceId1746327190")
+ * .setSource(Source.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Source response = migrationCenterClient.createSourceAsync(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 createSourceAsync(
+ CreateSourceRequest request) {
+ return createSourceOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new source in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateSourceRequest request =
+ * CreateSourceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSourceId("sourceId1746327190")
+ * .setSource(Source.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.createSourceOperationCallable().futureCall(request);
+ * // Do something.
+ * Source response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createSourceOperationCallable() {
+ return stub.createSourceOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new source in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateSourceRequest request =
+ * CreateSourceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSourceId("sourceId1746327190")
+ * .setSource(Source.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.createSourceCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createSourceCallable() {
+ return stub.createSourceCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * Source source = Source.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Source response = migrationCenterClient.updateSourceAsync(source, updateMask).get();
+ * }
+ * }
+ *
+ * @param source Required. The resource being updated
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * `Source` resource by the update. The values specified in the `update_mask` field are
+ * relative to the resource, not the full request. A field will be overwritten if it is in the
+ * mask. A single * value in the mask lets you to overwrite all fields.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateSourceAsync(
+ Source source, FieldMask updateMask) {
+ UpdateSourceRequest request =
+ UpdateSourceRequest.newBuilder().setSource(source).setUpdateMask(updateMask).build();
+ return updateSourceAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateSourceRequest request =
+ * UpdateSourceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSource(Source.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Source response = migrationCenterClient.updateSourceAsync(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 updateSourceAsync(
+ UpdateSourceRequest request) {
+ return updateSourceOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateSourceRequest request =
+ * UpdateSourceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSource(Source.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.updateSourceOperationCallable().futureCall(request);
+ * // Do something.
+ * Source response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ updateSourceOperationCallable() {
+ return stub.updateSourceOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateSourceRequest request =
+ * UpdateSourceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSource(Source.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.updateSourceCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateSourceCallable() {
+ return stub.updateSourceCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
+ * migrationCenterClient.deleteSourceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteSourceAsync(SourceName name) {
+ DeleteSourceRequest request =
+ DeleteSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteSourceAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
+ * migrationCenterClient.deleteSourceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteSourceAsync(String name) {
+ DeleteSourceRequest request = DeleteSourceRequest.newBuilder().setName(name).build();
+ return deleteSourceAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteSourceRequest request =
+ * DeleteSourceRequest.newBuilder()
+ * .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * migrationCenterClient.deleteSourceAsync(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 deleteSourceAsync(
+ DeleteSourceRequest request) {
+ return deleteSourceOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteSourceRequest request =
+ * DeleteSourceRequest.newBuilder()
+ * .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.deleteSourceOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteSourceOperationCallable() {
+ return stub.deleteSourceOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a source.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteSourceRequest request =
+ * DeleteSourceRequest.newBuilder()
+ * .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.deleteSourceCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteSourceCallable() {
+ return stub.deleteSourceCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the preference sets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (PreferenceSet element : migrationCenterClient.listPreferenceSets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListPreferenceSetsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPreferenceSetsPagedResponse listPreferenceSets(LocationName parent) {
+ ListPreferenceSetsRequest request =
+ ListPreferenceSetsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listPreferenceSets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the preference sets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (PreferenceSet element : migrationCenterClient.listPreferenceSets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListPreferenceSetsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPreferenceSetsPagedResponse listPreferenceSets(String parent) {
+ ListPreferenceSetsRequest request =
+ ListPreferenceSetsRequest.newBuilder().setParent(parent).build();
+ return listPreferenceSets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the preference sets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListPreferenceSetsRequest request =
+ * ListPreferenceSetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (PreferenceSet element : migrationCenterClient.listPreferenceSets(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 ListPreferenceSetsPagedResponse listPreferenceSets(
+ ListPreferenceSetsRequest request) {
+ return listPreferenceSetsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the preference sets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListPreferenceSetsRequest request =
+ * ListPreferenceSetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.listPreferenceSetsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (PreferenceSet element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listPreferenceSetsPagedCallable() {
+ return stub.listPreferenceSetsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the preference sets in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListPreferenceSetsRequest request =
+ * ListPreferenceSetsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListPreferenceSetsResponse response =
+ * migrationCenterClient.listPreferenceSetsCallable().call(request);
+ * for (PreferenceSet element : response.getPreferenceSetsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listPreferenceSetsCallable() {
+ return stub.listPreferenceSetsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]");
+ * PreferenceSet response = migrationCenterClient.getPreferenceSet(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PreferenceSet getPreferenceSet(PreferenceSetName name) {
+ GetPreferenceSetRequest request =
+ GetPreferenceSetRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getPreferenceSet(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString();
+ * PreferenceSet response = migrationCenterClient.getPreferenceSet(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PreferenceSet getPreferenceSet(String name) {
+ GetPreferenceSetRequest request = GetPreferenceSetRequest.newBuilder().setName(name).build();
+ return getPreferenceSet(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetPreferenceSetRequest request =
+ * GetPreferenceSetRequest.newBuilder()
+ * .setName(
+ * PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+ * .build();
+ * PreferenceSet response = migrationCenterClient.getPreferenceSet(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 PreferenceSet getPreferenceSet(GetPreferenceSetRequest request) {
+ return getPreferenceSetCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetPreferenceSetRequest request =
+ * GetPreferenceSetRequest.newBuilder()
+ * .setName(
+ * PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.getPreferenceSetCallable().futureCall(request);
+ * // Do something.
+ * PreferenceSet response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getPreferenceSetCallable() {
+ return stub.getPreferenceSetCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new preference set in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * PreferenceSet preferenceSet = PreferenceSet.newBuilder().build();
+ * String preferenceSetId = "preferenceSetId-569419518";
+ * PreferenceSet response =
+ * migrationCenterClient
+ * .createPreferenceSetAsync(parent, preferenceSet, preferenceSetId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param preferenceSet Required. The preference set resource being created.
+ * @param preferenceSetId Required. User specified ID for the preference set. It will become the
+ * last component of the preference set name. The ID must be unique within the project, must
+ * conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63
+ * characters. The ID must match the regular expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createPreferenceSetAsync(
+ LocationName parent, PreferenceSet preferenceSet, String preferenceSetId) {
+ CreatePreferenceSetRequest request =
+ CreatePreferenceSetRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setPreferenceSet(preferenceSet)
+ .setPreferenceSetId(preferenceSetId)
+ .build();
+ return createPreferenceSetAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new preference set in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * PreferenceSet preferenceSet = PreferenceSet.newBuilder().build();
+ * String preferenceSetId = "preferenceSetId-569419518";
+ * PreferenceSet response =
+ * migrationCenterClient
+ * .createPreferenceSetAsync(parent, preferenceSet, preferenceSetId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param preferenceSet Required. The preference set resource being created.
+ * @param preferenceSetId Required. User specified ID for the preference set. It will become the
+ * last component of the preference set name. The ID must be unique within the project, must
+ * conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63
+ * characters. The ID must match the regular expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createPreferenceSetAsync(
+ String parent, PreferenceSet preferenceSet, String preferenceSetId) {
+ CreatePreferenceSetRequest request =
+ CreatePreferenceSetRequest.newBuilder()
+ .setParent(parent)
+ .setPreferenceSet(preferenceSet)
+ .setPreferenceSetId(preferenceSetId)
+ .build();
+ return createPreferenceSetAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new preference set in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreatePreferenceSetRequest request =
+ * CreatePreferenceSetRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPreferenceSetId("preferenceSetId-569419518")
+ * .setPreferenceSet(PreferenceSet.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * PreferenceSet response = migrationCenterClient.createPreferenceSetAsync(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 createPreferenceSetAsync(
+ CreatePreferenceSetRequest request) {
+ return createPreferenceSetOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new preference set in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreatePreferenceSetRequest request =
+ * CreatePreferenceSetRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPreferenceSetId("preferenceSetId-569419518")
+ * .setPreferenceSet(PreferenceSet.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.createPreferenceSetOperationCallable().futureCall(request);
+ * // Do something.
+ * PreferenceSet response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createPreferenceSetOperationCallable() {
+ return stub.createPreferenceSetOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new preference set in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreatePreferenceSetRequest request =
+ * CreatePreferenceSetRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPreferenceSetId("preferenceSetId-569419518")
+ * .setPreferenceSet(PreferenceSet.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.createPreferenceSetCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createPreferenceSetCallable() {
+ return stub.createPreferenceSetCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * PreferenceSet preferenceSet = PreferenceSet.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * PreferenceSet response =
+ * migrationCenterClient.updatePreferenceSetAsync(preferenceSet, updateMask).get();
+ * }
+ * }
+ *
+ * @param preferenceSet Required. The preference set resource being updated.
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * `PreferenceSet` resource by the update. The values specified in the `update_mask` field are
+ * relative to the resource, not the full request. A field will be overwritten if it is in the
+ * mask. A single * value in the mask lets you to overwrite all fields.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updatePreferenceSetAsync(
+ PreferenceSet preferenceSet, FieldMask updateMask) {
+ UpdatePreferenceSetRequest request =
+ UpdatePreferenceSetRequest.newBuilder()
+ .setPreferenceSet(preferenceSet)
+ .setUpdateMask(updateMask)
+ .build();
+ return updatePreferenceSetAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdatePreferenceSetRequest request =
+ * UpdatePreferenceSetRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setPreferenceSet(PreferenceSet.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * PreferenceSet response = migrationCenterClient.updatePreferenceSetAsync(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 updatePreferenceSetAsync(
+ UpdatePreferenceSetRequest request) {
+ return updatePreferenceSetOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdatePreferenceSetRequest request =
+ * UpdatePreferenceSetRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setPreferenceSet(PreferenceSet.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.updatePreferenceSetOperationCallable().futureCall(request);
+ * // Do something.
+ * PreferenceSet response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ updatePreferenceSetOperationCallable() {
+ return stub.updatePreferenceSetOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdatePreferenceSetRequest request =
+ * UpdatePreferenceSetRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setPreferenceSet(PreferenceSet.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.updatePreferenceSetCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updatePreferenceSetCallable() {
+ return stub.updatePreferenceSetCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]");
+ * migrationCenterClient.deletePreferenceSetAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the group resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deletePreferenceSetAsync(
+ PreferenceSetName name) {
+ DeletePreferenceSetRequest request =
+ DeletePreferenceSetRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return deletePreferenceSetAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString();
+ * migrationCenterClient.deletePreferenceSetAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the group resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deletePreferenceSetAsync(String name) {
+ DeletePreferenceSetRequest request =
+ DeletePreferenceSetRequest.newBuilder().setName(name).build();
+ return deletePreferenceSetAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeletePreferenceSetRequest request =
+ * DeletePreferenceSetRequest.newBuilder()
+ * .setName(
+ * PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * migrationCenterClient.deletePreferenceSetAsync(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 deletePreferenceSetAsync(
+ DeletePreferenceSetRequest request) {
+ return deletePreferenceSetOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeletePreferenceSetRequest request =
+ * DeletePreferenceSetRequest.newBuilder()
+ * .setName(
+ * PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.deletePreferenceSetOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deletePreferenceSetOperationCallable() {
+ return stub.deletePreferenceSetOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a preference set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeletePreferenceSetRequest request =
+ * DeletePreferenceSetRequest.newBuilder()
+ * .setName(
+ * PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.deletePreferenceSetCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deletePreferenceSetCallable() {
+ return stub.deletePreferenceSetCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of regional settings.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * SettingsName name = SettingsName.of("[PROJECT]", "[LOCATION]");
+ * Settings response = migrationCenterClient.getSettings(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Settings getSettings(SettingsName name) {
+ GetSettingsRequest request =
+ GetSettingsRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSettings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of regional settings.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = SettingsName.of("[PROJECT]", "[LOCATION]").toString();
+ * Settings response = migrationCenterClient.getSettings(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Settings getSettings(String name) {
+ GetSettingsRequest request = GetSettingsRequest.newBuilder().setName(name).build();
+ return getSettings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of regional settings.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetSettingsRequest request =
+ * GetSettingsRequest.newBuilder()
+ * .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * Settings response = migrationCenterClient.getSettings(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 Settings getSettings(GetSettingsRequest request) {
+ return getSettingsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of regional settings.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetSettingsRequest request =
+ * GetSettingsRequest.newBuilder()
+ * .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * ApiFuture future = migrationCenterClient.getSettingsCallable().futureCall(request);
+ * // Do something.
+ * Settings response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getSettingsCallable() {
+ return stub.getSettingsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the regional-level project settings.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * Settings settings = Settings.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Settings response = migrationCenterClient.updateSettingsAsync(settings, updateMask).get();
+ * }
+ * }
+ *
+ * @param settings Required. The project settings resource being updated.
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * `Settings` resource by the update. The values specified in the `update_mask` field are
+ * relative to the resource, not the full request. A field will be overwritten if it is in the
+ * mask. A single * value in the mask lets you to overwrite all fields.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateSettingsAsync(
+ Settings settings, FieldMask updateMask) {
+ UpdateSettingsRequest request =
+ UpdateSettingsRequest.newBuilder().setSettings(settings).setUpdateMask(updateMask).build();
+ return updateSettingsAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the regional-level project settings.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateSettingsRequest request =
+ * UpdateSettingsRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSettings(Settings.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Settings response = migrationCenterClient.updateSettingsAsync(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 updateSettingsAsync(
+ UpdateSettingsRequest request) {
+ return updateSettingsOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the regional-level project settings.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateSettingsRequest request =
+ * UpdateSettingsRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSettings(Settings.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.updateSettingsOperationCallable().futureCall(request);
+ * // Do something.
+ * Settings response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ updateSettingsOperationCallable() {
+ return stub.updateSettingsOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the regional-level project settings.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * UpdateSettingsRequest request =
+ * UpdateSettingsRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSettings(Settings.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.updateSettingsCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateSettingsCallable() {
+ return stub.updateSettingsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report configuration.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ReportConfig reportConfig = ReportConfig.newBuilder().build();
+ * String reportConfigId = "reportConfigId1951664465";
+ * ReportConfig response =
+ * migrationCenterClient.createReportConfigAsync(parent, reportConfig, reportConfigId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param reportConfig Required. The report config set resource being created.
+ * @param reportConfigId Required. User specified ID for the report config. It will become the
+ * last component of the report config name. The ID must be unique within the project, must
+ * conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63
+ * characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createReportConfigAsync(
+ LocationName parent, ReportConfig reportConfig, String reportConfigId) {
+ CreateReportConfigRequest request =
+ CreateReportConfigRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setReportConfig(reportConfig)
+ .setReportConfigId(reportConfigId)
+ .build();
+ return createReportConfigAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report configuration.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * ReportConfig reportConfig = ReportConfig.newBuilder().build();
+ * String reportConfigId = "reportConfigId1951664465";
+ * ReportConfig response =
+ * migrationCenterClient.createReportConfigAsync(parent, reportConfig, reportConfigId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param reportConfig Required. The report config set resource being created.
+ * @param reportConfigId Required. User specified ID for the report config. It will become the
+ * last component of the report config name. The ID must be unique within the project, must
+ * conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63
+ * characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createReportConfigAsync(
+ String parent, ReportConfig reportConfig, String reportConfigId) {
+ CreateReportConfigRequest request =
+ CreateReportConfigRequest.newBuilder()
+ .setParent(parent)
+ .setReportConfig(reportConfig)
+ .setReportConfigId(reportConfigId)
+ .build();
+ return createReportConfigAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report configuration.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateReportConfigRequest request =
+ * CreateReportConfigRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setReportConfigId("reportConfigId1951664465")
+ * .setReportConfig(ReportConfig.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ReportConfig response = migrationCenterClient.createReportConfigAsync(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 createReportConfigAsync(
+ CreateReportConfigRequest request) {
+ return createReportConfigOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report configuration.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateReportConfigRequest request =
+ * CreateReportConfigRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setReportConfigId("reportConfigId1951664465")
+ * .setReportConfig(ReportConfig.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.createReportConfigOperationCallable().futureCall(request);
+ * // Do something.
+ * ReportConfig response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createReportConfigOperationCallable() {
+ return stub.createReportConfigOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report configuration.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateReportConfigRequest request =
+ * CreateReportConfigRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setReportConfigId("reportConfigId1951664465")
+ * .setReportConfig(ReportConfig.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.createReportConfigCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createReportConfigCallable() {
+ return stub.createReportConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
+ * ReportConfig response = migrationCenterClient.getReportConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ReportConfig getReportConfig(ReportConfigName name) {
+ GetReportConfigRequest request =
+ GetReportConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getReportConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
+ * ReportConfig response = migrationCenterClient.getReportConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ReportConfig getReportConfig(String name) {
+ GetReportConfigRequest request = GetReportConfigRequest.newBuilder().setName(name).build();
+ return getReportConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetReportConfigRequest request =
+ * GetReportConfigRequest.newBuilder()
+ * .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .build();
+ * ReportConfig response = migrationCenterClient.getReportConfig(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 ReportConfig getReportConfig(GetReportConfigRequest request) {
+ return getReportConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetReportConfigRequest request =
+ * GetReportConfigRequest.newBuilder()
+ * .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.getReportConfigCallable().futureCall(request);
+ * // Do something.
+ * ReportConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getReportConfigCallable() {
+ return stub.getReportConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ReportConfigs in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (ReportConfig element : migrationCenterClient.listReportConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListReportConfigsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListReportConfigsPagedResponse listReportConfigs(LocationName parent) {
+ ListReportConfigsRequest request =
+ ListReportConfigsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listReportConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ReportConfigs in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (ReportConfig element : migrationCenterClient.listReportConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListReportConfigsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListReportConfigsPagedResponse listReportConfigs(String parent) {
+ ListReportConfigsRequest request =
+ ListReportConfigsRequest.newBuilder().setParent(parent).build();
+ return listReportConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ReportConfigs in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListReportConfigsRequest request =
+ * ListReportConfigsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (ReportConfig element : migrationCenterClient.listReportConfigs(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 ListReportConfigsPagedResponse listReportConfigs(ListReportConfigsRequest request) {
+ return listReportConfigsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ReportConfigs in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListReportConfigsRequest request =
+ * ListReportConfigsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.listReportConfigsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ReportConfig element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listReportConfigsPagedCallable() {
+ return stub.listReportConfigsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ReportConfigs in a given project and location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListReportConfigsRequest request =
+ * ListReportConfigsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListReportConfigsResponse response =
+ * migrationCenterClient.listReportConfigsCallable().call(request);
+ * for (ReportConfig element : response.getReportConfigsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listReportConfigsCallable() {
+ return stub.listReportConfigsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
+ * migrationCenterClient.deleteReportConfigAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteReportConfigAsync(
+ ReportConfigName name) {
+ DeleteReportConfigRequest request =
+ DeleteReportConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return deleteReportConfigAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
+ * migrationCenterClient.deleteReportConfigAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteReportConfigAsync(String name) {
+ DeleteReportConfigRequest request =
+ DeleteReportConfigRequest.newBuilder().setName(name).build();
+ return deleteReportConfigAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteReportConfigRequest request =
+ * DeleteReportConfigRequest.newBuilder()
+ * .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .setRequestId("requestId693933066")
+ * .setForce(true)
+ * .build();
+ * migrationCenterClient.deleteReportConfigAsync(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 deleteReportConfigAsync(
+ DeleteReportConfigRequest request) {
+ return deleteReportConfigOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteReportConfigRequest request =
+ * DeleteReportConfigRequest.newBuilder()
+ * .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .setRequestId("requestId693933066")
+ * .setForce(true)
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.deleteReportConfigOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteReportConfigOperationCallable() {
+ return stub.deleteReportConfigOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteReportConfigRequest request =
+ * DeleteReportConfigRequest.newBuilder()
+ * .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .setRequestId("requestId693933066")
+ * .setForce(true)
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.deleteReportConfigCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteReportConfigCallable() {
+ return stub.deleteReportConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
+ * Report report = Report.newBuilder().build();
+ * String reportId = "reportId-427040401";
+ * Report response = migrationCenterClient.createReportAsync(parent, report, reportId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param report Required. The report resource being created.
+ * @param reportId Required. User specified id for the report. It will become the last component
+ * of the report name. The id must be unique within the project, must conform with RFC-1034,
+ * is restricted to lower-cased letters, and has a maximum length of 63 characters. The id
+ * must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createReportAsync(
+ ReportConfigName parent, Report report, String reportId) {
+ CreateReportRequest request =
+ CreateReportRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setReport(report)
+ .setReportId(reportId)
+ .build();
+ return createReportAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
+ * Report report = Report.newBuilder().build();
+ * String reportId = "reportId-427040401";
+ * Report response = migrationCenterClient.createReportAsync(parent, report, reportId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param report Required. The report resource being created.
+ * @param reportId Required. User specified id for the report. It will become the last component
+ * of the report name. The id must be unique within the project, must conform with RFC-1034,
+ * is restricted to lower-cased letters, and has a maximum length of 63 characters. The id
+ * must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createReportAsync(
+ String parent, Report report, String reportId) {
+ CreateReportRequest request =
+ CreateReportRequest.newBuilder()
+ .setParent(parent)
+ .setReport(report)
+ .setReportId(reportId)
+ .build();
+ return createReportAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateReportRequest request =
+ * CreateReportRequest.newBuilder()
+ * .setParent(
+ * ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .setReportId("reportId-427040401")
+ * .setReport(Report.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Report response = migrationCenterClient.createReportAsync(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 createReportAsync(
+ CreateReportRequest request) {
+ return createReportOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateReportRequest request =
+ * CreateReportRequest.newBuilder()
+ * .setParent(
+ * ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .setReportId("reportId-427040401")
+ * .setReport(Report.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.createReportOperationCallable().futureCall(request);
+ * // Do something.
+ * Report response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createReportOperationCallable() {
+ return stub.createReportOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * CreateReportRequest request =
+ * CreateReportRequest.newBuilder()
+ * .setParent(
+ * ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .setReportId("reportId-427040401")
+ * .setReport(Report.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.createReportCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createReportCallable() {
+ return stub.createReportCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]");
+ * Report response = migrationCenterClient.getReport(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Report getReport(ReportName name) {
+ GetReportRequest request =
+ GetReportRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getReport(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name =
+ * ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString();
+ * Report response = migrationCenterClient.getReport(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Report getReport(String name) {
+ GetReportRequest request = GetReportRequest.newBuilder().setName(name).build();
+ return getReport(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetReportRequest request =
+ * GetReportRequest.newBuilder()
+ * .setName(
+ * ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+ * .toString())
+ * .setView(ReportView.forNumber(0))
+ * .build();
+ * Report response = migrationCenterClient.getReport(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 Report getReport(GetReportRequest request) {
+ return getReportCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetReportRequest request =
+ * GetReportRequest.newBuilder()
+ * .setName(
+ * ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+ * .toString())
+ * .setView(ReportView.forNumber(0))
+ * .build();
+ * ApiFuture future = migrationCenterClient.getReportCallable().futureCall(request);
+ * // Do something.
+ * Report response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getReportCallable() {
+ return stub.getReportCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Reports in a given ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
+ * for (Report element : migrationCenterClient.listReports(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListReportsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListReportsPagedResponse listReports(ReportConfigName parent) {
+ ListReportsRequest request =
+ ListReportsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listReports(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Reports in a given ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString();
+ * for (Report element : migrationCenterClient.listReports(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for `ListReportsRequest`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListReportsPagedResponse listReports(String parent) {
+ ListReportsRequest request = ListReportsRequest.newBuilder().setParent(parent).build();
+ return listReports(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Reports in a given ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListReportsRequest request =
+ * ListReportsRequest.newBuilder()
+ * .setParent(
+ * ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setView(ReportView.forNumber(0))
+ * .build();
+ * for (Report element : migrationCenterClient.listReports(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 ListReportsPagedResponse listReports(ListReportsRequest request) {
+ return listReportsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Reports in a given ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListReportsRequest request =
+ * ListReportsRequest.newBuilder()
+ * .setParent(
+ * ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setView(ReportView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.listReportsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Report element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listReportsPagedCallable() {
+ return stub.listReportsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Reports in a given ReportConfig.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListReportsRequest request =
+ * ListReportsRequest.newBuilder()
+ * .setParent(
+ * ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setView(ReportView.forNumber(0))
+ * .build();
+ * while (true) {
+ * ListReportsResponse response = migrationCenterClient.listReportsCallable().call(request);
+ * for (Report element : response.getReportsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listReportsCallable() {
+ return stub.listReportsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a Report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]");
+ * migrationCenterClient.deleteReportAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteReportAsync(ReportName name) {
+ DeleteReportRequest request =
+ DeleteReportRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteReportAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a Report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * String name =
+ * ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString();
+ * migrationCenterClient.deleteReportAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteReportAsync(String name) {
+ DeleteReportRequest request = DeleteReportRequest.newBuilder().setName(name).build();
+ return deleteReportAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a Report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteReportRequest request =
+ * DeleteReportRequest.newBuilder()
+ * .setName(
+ * ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * migrationCenterClient.deleteReportAsync(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 deleteReportAsync(
+ DeleteReportRequest request) {
+ return deleteReportOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a Report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteReportRequest request =
+ * DeleteReportRequest.newBuilder()
+ * .setName(
+ * ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * migrationCenterClient.deleteReportOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteReportOperationCallable() {
+ return stub.deleteReportOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a Report.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * DeleteReportRequest request =
+ * DeleteReportRequest.newBuilder()
+ * .setName(
+ * ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.deleteReportCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteReportCallable() {
+ return stub.deleteReportCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : migrationCenterClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * migrationCenterClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * migrationCenterClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = migrationCenterClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = migrationCenterClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }