diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
new file mode 100644
index 00000000..ba57534a
--- /dev/null
+++ b/.github/.OwlBot.lock.yaml
@@ -0,0 +1,3 @@
+docker:
+ digest: sha256:689e998ca8b33117d8607b1c3df12b9cfebd68b621ba5ab6ce17be8715506203
+ image: gcr.io/repo-automation-bots/owlbot-java:latest
diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml
new file mode 100644
index 00000000..f629806f
--- /dev/null
+++ b/.github/.OwlBot.yaml
@@ -0,0 +1,29 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+docker:
+ image: "gcr.io/repo-automation-bots/owlbot-java:latest"
+
+deep-remove-regex:
+- "/grpc-google-.*/src"
+- "/proto-google-.*/src"
+- "/google-.*/src"
+
+deep-copy-regex:
+- source: "/google/cloud/domains/(v.*)/.*-java/proto-google-.*/src"
+ dest: "/owl-bot-staging/$1/proto-google-cloud-domains-$1/src"
+- source: "/google/cloud/domains/(v.*)/.*-java/grpc-google-.*/src"
+ dest: "/owl-bot-staging/$1/grpc-google-cloud-domains-$1/src"
+- source: "/google/cloud/domains/(v.*)/.*-java/gapic-google-.*/src"
+ dest: "/owl-bot-staging/$1/google-cloud-domains/src"
diff --git a/google-cloud-domains-bom/pom.xml b/google-cloud-domains-bom/pom.xml
index ac2b5ae9..95648d88 100644
--- a/google-cloud-domains-bom/pom.xml
+++ b/google-cloud-domains-bom/pom.xml
@@ -1,4 +1,4 @@
-
+
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); + * String query = "query107944136"; + * SearchDomainsResponse response = domainsClient.searchDomains(location, query); + * } + * }+ * + *
Note: close() needs to be called on the DomainsClient 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: + * + *
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 DomainsSettings to create(). + * For example: + * + *
To customize credentials: + * + *
{@code + * DomainsSettings domainsSettings = + * DomainsSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * DomainsClient domainsClient = DomainsClient.create(domainsSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * DomainsSettings domainsSettings = DomainsSettings.newBuilder().setEndpoint(myEndpoint).build(); + * DomainsClient domainsClient = DomainsClient.create(domainsSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class DomainsClient implements BackgroundResource { + private final DomainsSettings settings; + private final DomainsStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DomainsClient with default settings. */ + public static final DomainsClient create() throws IOException { + return create(DomainsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DomainsClient, 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 DomainsClient create(DomainsSettings settings) throws IOException { + return new DomainsClient(settings); + } + + /** + * Constructs an instance of DomainsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(DomainsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DomainsClient create(DomainsStub stub) { + return new DomainsClient(stub); + } + + /** + * Constructs an instance of DomainsClient, 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 DomainsClient(DomainsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DomainsStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected DomainsClient(DomainsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DomainsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DomainsStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches for available domain names similar to the provided query. + * + *
Availability results from this method are approximate; call `RetrieveRegisterParameters` on + * a domain before registering to confirm availability. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); + * String query = "query107944136"; + * SearchDomainsResponse response = domainsClient.searchDomains(location, query); + * } + * }+ * + * @param location Required. The location. Must be in the format `projects/*/locations/*`. + * @param query Required. String used to search for available domain names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchDomainsResponse searchDomains(LocationName location, String query) { + SearchDomainsRequest request = + SearchDomainsRequest.newBuilder() + .setLocation(location == null ? null : location.toString()) + .setQuery(query) + .build(); + return searchDomains(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches for available domain names similar to the provided query. + * + *
Availability results from this method are approximate; call `RetrieveRegisterParameters` on + * a domain before registering to confirm availability. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * String location = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * String query = "query107944136"; + * SearchDomainsResponse response = domainsClient.searchDomains(location, query); + * } + * }+ * + * @param location Required. The location. Must be in the format `projects/*/locations/*`. + * @param query Required. String used to search for available domain names. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchDomainsResponse searchDomains(String location, String query) { + SearchDomainsRequest request = + SearchDomainsRequest.newBuilder().setLocation(location).setQuery(query).build(); + return searchDomains(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches for available domain names similar to the provided query. + * + *
Availability results from this method are approximate; call `RetrieveRegisterParameters` on + * a domain before registering to confirm availability. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * SearchDomainsRequest request = + * SearchDomainsRequest.newBuilder() + * .setQuery("query107944136") + * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .build(); + * SearchDomainsResponse response = domainsClient.searchDomains(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 SearchDomainsResponse searchDomains(SearchDomainsRequest request) { + return searchDomainsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches for available domain names similar to the provided query. + * + *
Availability results from this method are approximate; call `RetrieveRegisterParameters` on + * a domain before registering to confirm availability. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * SearchDomainsRequest request = + * SearchDomainsRequest.newBuilder() + * .setQuery("query107944136") + * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * domainsClient.searchDomainsCallable().futureCall(request); + * // Do something. + * SearchDomainsResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); + * String domainName = "domainName-1244085905"; + * RetrieveRegisterParametersResponse response = + * domainsClient.retrieveRegisterParameters(location, domainName); + * } + * }+ * + * @param location Required. The location. Must be in the format `projects/*/locations/*`. + * @param domainName Required. The domain name. Unicode domain names must be expressed in Punycode + * format. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RetrieveRegisterParametersResponse retrieveRegisterParameters( + LocationName location, String domainName) { + RetrieveRegisterParametersRequest request = + RetrieveRegisterParametersRequest.newBuilder() + .setLocation(location == null ? null : location.toString()) + .setDomainName(domainName) + .build(); + return retrieveRegisterParameters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets parameters needed to register a new domain name, including price and up-to-date + * availability. Use the returned values to call `RegisterDomain`. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * String location = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * String domainName = "domainName-1244085905"; + * RetrieveRegisterParametersResponse response = + * domainsClient.retrieveRegisterParameters(location, domainName); + * } + * }+ * + * @param location Required. The location. Must be in the format `projects/*/locations/*`. + * @param domainName Required. The domain name. Unicode domain names must be expressed in Punycode + * format. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RetrieveRegisterParametersResponse retrieveRegisterParameters( + String location, String domainName) { + RetrieveRegisterParametersRequest request = + RetrieveRegisterParametersRequest.newBuilder() + .setLocation(location) + .setDomainName(domainName) + .build(); + return retrieveRegisterParameters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets parameters needed to register a new domain name, including price and up-to-date + * availability. Use the returned values to call `RegisterDomain`. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * RetrieveRegisterParametersRequest request = + * RetrieveRegisterParametersRequest.newBuilder() + * .setDomainName("domainName-1244085905") + * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .build(); + * RetrieveRegisterParametersResponse response = + * domainsClient.retrieveRegisterParameters(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 RetrieveRegisterParametersResponse retrieveRegisterParameters( + RetrieveRegisterParametersRequest request) { + return retrieveRegisterParametersCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets parameters needed to register a new domain name, including price and up-to-date + * availability. Use the returned values to call `RegisterDomain`. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * RetrieveRegisterParametersRequest request = + * RetrieveRegisterParametersRequest.newBuilder() + * .setDomainName("domainName-1244085905") + * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * domainsClient.retrieveRegisterParametersCallable().futureCall(request); + * // Do something. + * RetrieveRegisterParametersResponse response = future.get(); + * } + * }
Call `RetrieveRegisterParameters` first to check availability of the domain name and + * determine parameters like price that are needed to build a call to this method. + * + *
A successful call creates a `Registration` resource in state `REGISTRATION_PENDING`, which + * resolves to `ACTIVE` within 1-2 minutes, indicating that the domain was successfully + * registered. If the resource ends up in state `REGISTRATION_FAILED`, it indicates that the + * domain was not registered successfully, and you can safely delete the resource and retry + * registration. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * Registration registration = Registration.newBuilder().build(); + * Money yearlyPrice = Money.newBuilder().build(); + * Registration response = + * domainsClient.registerDomainAsync(parent, registration, yearlyPrice).get(); + * } + * }+ * + * @param parent Required. The parent resource of the `Registration`. Must be in the format + * `projects/*/locations/*`. + * @param registration Required. The complete `Registration` resource to be created. + * @param yearlyPrice Required. Yearly price to register or renew the domain. The value that + * should be put here can be obtained from RetrieveRegisterParameters or SearchDomains calls. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Call `RetrieveRegisterParameters` first to check availability of the domain name and + * determine parameters like price that are needed to build a call to this method. + * + *
A successful call creates a `Registration` resource in state `REGISTRATION_PENDING`, which + * resolves to `ACTIVE` within 1-2 minutes, indicating that the domain was successfully + * registered. If the resource ends up in state `REGISTRATION_FAILED`, it indicates that the + * domain was not registered successfully, and you can safely delete the resource and retry + * registration. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * Registration registration = Registration.newBuilder().build(); + * Money yearlyPrice = Money.newBuilder().build(); + * Registration response = + * domainsClient.registerDomainAsync(parent, registration, yearlyPrice).get(); + * } + * }+ * + * @param parent Required. The parent resource of the `Registration`. Must be in the format + * `projects/*/locations/*`. + * @param registration Required. The complete `Registration` resource to be created. + * @param yearlyPrice Required. Yearly price to register or renew the domain. The value that + * should be put here can be obtained from RetrieveRegisterParameters or SearchDomains calls. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Call `RetrieveRegisterParameters` first to check availability of the domain name and + * determine parameters like price that are needed to build a call to this method. + * + *
A successful call creates a `Registration` resource in state `REGISTRATION_PENDING`, which + * resolves to `ACTIVE` within 1-2 minutes, indicating that the domain was successfully + * registered. If the resource ends up in state `REGISTRATION_FAILED`, it indicates that the + * domain was not registered successfully, and you can safely delete the resource and retry + * registration. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * RegisterDomainRequest request = + * RegisterDomainRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setRegistration(Registration.newBuilder().build()) + * .addAllDomainNotices(new ArrayList+ * + * @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()) + * .addAllContactNotices(new ArrayList ()) + * .setYearlyPrice(Money.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * Registration response = domainsClient.registerDomainAsync(request).get(); + * } + * }
Call `RetrieveRegisterParameters` first to check availability of the domain name and + * determine parameters like price that are needed to build a call to this method. + * + *
A successful call creates a `Registration` resource in state `REGISTRATION_PENDING`, which + * resolves to `ACTIVE` within 1-2 minutes, indicating that the domain was successfully + * registered. If the resource ends up in state `REGISTRATION_FAILED`, it indicates that the + * domain was not registered successfully, and you can safely delete the resource and retry + * registration. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * RegisterDomainRequest request = + * RegisterDomainRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setRegistration(Registration.newBuilder().build()) + * .addAllDomainNotices(new ArrayList+ */ + public final OperationCallable()) + * .addAllContactNotices(new ArrayList ()) + * .setYearlyPrice(Money.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * OperationFuture future = + * domainsClient.registerDomainOperationCallable().futureCall(request); + * // Do something. + * Registration response = future.get(); + * } + * }
Call `RetrieveRegisterParameters` first to check availability of the domain name and + * determine parameters like price that are needed to build a call to this method. + * + *
A successful call creates a `Registration` resource in state `REGISTRATION_PENDING`, which + * resolves to `ACTIVE` within 1-2 minutes, indicating that the domain was successfully + * registered. If the resource ends up in state `REGISTRATION_FAILED`, it indicates that the + * domain was not registered successfully, and you can safely delete the resource and retry + * registration. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * RegisterDomainRequest request = + * RegisterDomainRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setRegistration(Registration.newBuilder().build()) + * .addAllDomainNotices(new ArrayList+ */ + public final UnaryCallable()) + * .addAllContactNotices(new ArrayList ()) + * .setYearlyPrice(Money.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * ApiFuture future = domainsClient.registerDomainCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Registration element : domainsClient.listRegistrations(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The project and location from which to list `Registration`s, specified + * in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRegistrationsPagedResponse listRegistrations(LocationName parent) { + ListRegistrationsRequest request = + ListRegistrationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRegistrations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `Registration` resources in a project. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (Registration element : domainsClient.listRegistrations(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The project and location from which to list `Registration`s, specified + * in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRegistrationsPagedResponse listRegistrations(String parent) { + ListRegistrationsRequest request = + ListRegistrationsRequest.newBuilder().setParent(parent).build(); + return listRegistrations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `Registration` resources in a project. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * ListRegistrationsRequest request = + * ListRegistrationsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * for (Registration element : domainsClient.listRegistrations(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 ListRegistrationsPagedResponse listRegistrations(ListRegistrationsRequest request) { + return listRegistrationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `Registration` resources in a project. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * ListRegistrationsRequest request = + * ListRegistrationsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * domainsClient.listRegistrationsPagedCallable().futureCall(request); + * // Do something. + * for (Registration element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * ListRegistrationsRequest request = + * ListRegistrationsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * while (true) { + * ListRegistrationsResponse response = + * domainsClient.listRegistrationsCallable().call(request); + * for (Registration element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * RegistrationName name = RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]"); + * Registration response = domainsClient.getRegistration(name); + * } + * }+ * + * @param name Required. The name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Registration getRegistration(RegistrationName name) { + GetRegistrationRequest request = + GetRegistrationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRegistration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a `Registration` resource. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * String name = RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString(); + * Registration response = domainsClient.getRegistration(name); + * } + * }+ * + * @param name Required. The name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Registration getRegistration(String name) { + GetRegistrationRequest request = GetRegistrationRequest.newBuilder().setName(name).build(); + return getRegistration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a `Registration` resource. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * GetRegistrationRequest request = + * GetRegistrationRequest.newBuilder() + * .setName(RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString()) + * .build(); + * Registration response = domainsClient.getRegistration(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 Registration getRegistration(GetRegistrationRequest request) { + return getRegistrationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a `Registration` resource. + * + *
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * GetRegistrationRequest request = + * GetRegistrationRequest.newBuilder() + * .setName(RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = domainsClient.getRegistrationCallable().futureCall(request); + * // Do something. + * Registration response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * Registration registration = Registration.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Registration response = domainsClient.updateRegistrationAsync(registration, updateMask).get(); + * } + * }+ * + * @param registration Fields of the `Registration` to update. + * @param updateMask Required. The field mask describing which fields to update as a + * comma-separated list. For example, if only the labels are being updated, the `update_mask` + * would be `"labels"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * UpdateRegistrationRequest request = + * UpdateRegistrationRequest.newBuilder() + * .setRegistration(Registration.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Registration response = domainsClient.updateRegistrationAsync(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
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * UpdateRegistrationRequest request = + * UpdateRegistrationRequest.newBuilder() + * .setRegistration(Registration.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * domainsClient.updateRegistrationOperationCallable().futureCall(request); + * // Do something. + * Registration response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * UpdateRegistrationRequest request = + * UpdateRegistrationRequest.newBuilder() + * .setRegistration(Registration.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = domainsClient.updateRegistrationCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * RegistrationName registration = + * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]"); + * ManagementSettings managementSettings = ManagementSettings.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Registration response = + * domainsClient + * .configureManagementSettingsAsync(registration, managementSettings, updateMask) + * .get(); + * } + * }+ * + * @param registration Required. The name of the `Registration` whose management settings are + * being updated, in the format `projects/*/locations/*/registrations/*`. + * @param managementSettings Fields of the `ManagementSettings` to update. + * @param updateMask Required. The field mask describing which fields to update as a + * comma-separated list. For example, if only the transfer lock is being updated, the + * `update_mask` would be `"transfer_lock_state"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * String registration = + * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString(); + * ManagementSettings managementSettings = ManagementSettings.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Registration response = + * domainsClient + * .configureManagementSettingsAsync(registration, managementSettings, updateMask) + * .get(); + * } + * }+ * + * @param registration Required. The name of the `Registration` whose management settings are + * being updated, in the format `projects/*/locations/*/registrations/*`. + * @param managementSettings Fields of the `ManagementSettings` to update. + * @param updateMask Required. The field mask describing which fields to update as a + * comma-separated list. For example, if only the transfer lock is being updated, the + * `update_mask` would be `"transfer_lock_state"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * ConfigureManagementSettingsRequest request = + * ConfigureManagementSettingsRequest.newBuilder() + * .setRegistration( + * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString()) + * .setManagementSettings(ManagementSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Registration response = domainsClient.configureManagementSettingsAsync(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
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * ConfigureManagementSettingsRequest request = + * ConfigureManagementSettingsRequest.newBuilder() + * .setRegistration( + * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString()) + * .setManagementSettings(ManagementSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallable< + ConfigureManagementSettingsRequest, Registration, OperationMetadata> + configureManagementSettingsOperationCallable() { + return stub.configureManagementSettingsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a `Registration`'s management settings. + * + *future = + * domainsClient.configureManagementSettingsOperationCallable().futureCall(request); + * // Do something. + * Registration response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * ConfigureManagementSettingsRequest request = + * ConfigureManagementSettingsRequest.newBuilder() + * .setRegistration( + * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString()) + * .setManagementSettings(ManagementSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * domainsClient.configureManagementSettingsCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (DomainsClient domainsClient = DomainsClient.create()) { + * RegistrationName registration = + * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]"); + * DnsSettings dnsSettings = DnsSettings.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Registration response = + * domainsClient.configureDnsSettingsAsync(registration, dnsSettings, updateMask).get(); + * } + * }+ * + * @param registration Required. The name of the `Registration` whose DNS settings are being + * updated, in the format `projects/*/locations/*/registrations/*`. + * @param dnsSettings Fields of the `DnsSettings` to update. + * @param updateMask Required. The field mask describing which fields to update as a + * comma-separated list. For example, if only the name servers are being updated for an + * existing Custom DNS configuration, the `update_mask` would be `"custom_dns.name_servers"`. + *
When changing the DNS provider from one type to another, pass the new provider's field
+ * name as part of the field mask. For example, when changing from a Google Domains DNS
+ * configuration to a Custom DNS configuration, the `update_mask` would be `"custom_dns"`. //
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * When changing the DNS provider from one type to another, pass the new provider's field
+ * name as part of the field mask. For example, when changing from a Google Domains DNS
+ * configuration to a Custom DNS configuration, the `update_mask` would be `"custom_dns"`. //
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the export is successful:
+ *
+ * Sample code:
+ *
+ * If the export is successful:
+ *
+ * Sample code:
+ *
+ * If the export is successful:
+ *
+ * Sample code:
+ *
+ * If the export is successful:
+ *
+ * Sample code:
+ *
+ * If the export is successful:
+ *
+ * Sample code:
+ *
+ * This method only works on resources in one of the following states:
+ *
+ * Sample code:
+ *
+ * This method only works on resources in one of the following states:
+ *
+ * Sample code:
+ *
+ * This method only works on resources in one of the following states:
+ *
+ * Sample code:
+ *
+ * This method only works on resources in one of the following states:
+ *
+ * Sample code:
+ *
+ * This method only works on resources in one of the following states:
+ *
+ * Sample code:
+ *
+ * You can call this method only after 60 days have elapsed since the initial domain
+ * registration.
+ *
+ * Sample code:
+ *
+ * You can call this method only after 60 days have elapsed since the initial domain
+ * registration.
+ *
+ * Sample code:
+ *
+ * You can call this method only after 60 days have elapsed since the initial domain
+ * registration.
+ *
+ * Sample code:
+ *
+ * You can call this method only after 60 days have elapsed since the initial domain
+ * registration.
+ *
+ * Sample code:
+ *
+ * You can call this method only after 60 days have elapsed since the initial domain
+ * registration.
+ *
+ * Sample code:
+ *
+ * You can call this method only after 60 days have elapsed since the initial domain
+ * registration.
+ *
+ * Sample code:
+ *
+ * You can call this method only after 60 days have elapsed since the initial domain
+ * registration.
+ *
+ * Sample code:
+ *
+ * You can call this method only after 60 days have elapsed since the initial domain
+ * registration.
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of searchDomains to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction ======================= DomainsClient =======================
+ *
+ * Service Description: The Cloud Domains API enables management and configuration of domain
+ * names.
+ *
+ * Sample for DomainsClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public abstract class DomainsStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ }
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of searchDomains to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcDomainsCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcDomainsStub extends DomainsStub {
+ private static final MethodDescriptor{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * String registration =
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString();
+ * DnsSettings dnsSettings = DnsSettings.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Registration response =
+ * domainsClient.configureDnsSettingsAsync(registration, dnsSettings, updateMask).get();
+ * }
+ * }
+ *
+ * @param registration Required. The name of the `Registration` whose DNS settings are being
+ * updated, in the format `projects/*/locations/*/registrations/*`.
+ * @param dnsSettings Fields of the `DnsSettings` to update.
+ * @param updateMask Required. The field mask describing which fields to update as a
+ * comma-separated list. For example, if only the name servers are being updated for an
+ * existing Custom DNS configuration, the `update_mask` would be `"custom_dns.name_servers"`.
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ConfigureDnsSettingsRequest request =
+ * ConfigureDnsSettingsRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .setDnsSettings(DnsSettings.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * Registration response = domainsClient.configureDnsSettingsAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ConfigureDnsSettingsRequest request =
+ * ConfigureDnsSettingsRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .setDnsSettings(DnsSettings.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ConfigureDnsSettingsRequest request =
+ * ConfigureDnsSettingsRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .setDnsSettings(DnsSettings.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * RegistrationName registration =
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]");
+ * ContactSettings contactSettings = ContactSettings.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Registration response =
+ * domainsClient
+ * .configureContactSettingsAsync(registration, contactSettings, updateMask)
+ * .get();
+ * }
+ * }
+ *
+ * @param registration Required. The name of the `Registration` whose contact settings are being
+ * updated, in the format `projects/*/locations/*/registrations/*`.
+ * @param contactSettings Fields of the `ContactSettings` to update.
+ * @param updateMask Required. The field mask describing which fields to update as a
+ * comma-separated list. For example, if only the registrant contact is being updated, the
+ * `update_mask` would be `"registrant_contact"`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * String registration =
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString();
+ * ContactSettings contactSettings = ContactSettings.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Registration response =
+ * domainsClient
+ * .configureContactSettingsAsync(registration, contactSettings, updateMask)
+ * .get();
+ * }
+ * }
+ *
+ * @param registration Required. The name of the `Registration` whose contact settings are being
+ * updated, in the format `projects/*/locations/*/registrations/*`.
+ * @param contactSettings Fields of the `ContactSettings` to update.
+ * @param updateMask Required. The field mask describing which fields to update as a
+ * comma-separated list. For example, if only the registrant contact is being updated, the
+ * `update_mask` would be `"registrant_contact"`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ConfigureContactSettingsRequest request =
+ * ConfigureContactSettingsRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .setContactSettings(ContactSettings.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .addAllContactNotices(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ConfigureContactSettingsRequest request =
+ * ConfigureContactSettingsRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .setContactSettings(ContactSettings.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .addAllContactNotices(new ArrayList
+ */
+ public final OperationCallable{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ConfigureContactSettingsRequest request =
+ * ConfigureContactSettingsRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .setContactSettings(ContactSettings.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .addAllContactNotices(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * RegistrationName name = RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]");
+ * Registration response = domainsClient.exportRegistrationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Registration` to export, in the format
+ * `projects/*/locations/*/registrations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * String name = RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString();
+ * Registration response = domainsClient.exportRegistrationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Registration` to export, in the format
+ * `projects/*/locations/*/registrations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ExportRegistrationRequest request =
+ * ExportRegistrationRequest.newBuilder()
+ * .setName(RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * Registration response = domainsClient.exportRegistrationAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ExportRegistrationRequest request =
+ * ExportRegistrationRequest.newBuilder()
+ * .setName(RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ExportRegistrationRequest request =
+ * ExportRegistrationRequest.newBuilder()
+ * .setName(RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * RegistrationName name = RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]");
+ * domainsClient.deleteRegistrationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Registration` to delete, in the format
+ * `projects/*/locations/*/registrations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * String name = RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString();
+ * domainsClient.deleteRegistrationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Registration` to delete, in the format
+ * `projects/*/locations/*/registrations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * DeleteRegistrationRequest request =
+ * DeleteRegistrationRequest.newBuilder()
+ * .setName(RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * domainsClient.deleteRegistrationAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * DeleteRegistrationRequest request =
+ * DeleteRegistrationRequest.newBuilder()
+ * .setName(RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable
+ *
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * DeleteRegistrationRequest request =
+ * DeleteRegistrationRequest.newBuilder()
+ * .setName(RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * RegistrationName registration =
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]");
+ * AuthorizationCode response = domainsClient.retrieveAuthorizationCode(registration);
+ * }
+ * }
+ *
+ * @param registration Required. The name of the `Registration` whose authorization code is being
+ * retrieved, in the format `projects/*/locations/*/registrations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuthorizationCode retrieveAuthorizationCode(RegistrationName registration) {
+ RetrieveAuthorizationCodeRequest request =
+ RetrieveAuthorizationCodeRequest.newBuilder()
+ .setRegistration(registration == null ? null : registration.toString())
+ .build();
+ return retrieveAuthorizationCode(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the authorization code of the `Registration` for the purpose of transferring the domain to
+ * another registrar.
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * String registration =
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString();
+ * AuthorizationCode response = domainsClient.retrieveAuthorizationCode(registration);
+ * }
+ * }
+ *
+ * @param registration Required. The name of the `Registration` whose authorization code is being
+ * retrieved, in the format `projects/*/locations/*/registrations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuthorizationCode retrieveAuthorizationCode(String registration) {
+ RetrieveAuthorizationCodeRequest request =
+ RetrieveAuthorizationCodeRequest.newBuilder().setRegistration(registration).build();
+ return retrieveAuthorizationCode(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the authorization code of the `Registration` for the purpose of transferring the domain to
+ * another registrar.
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * RetrieveAuthorizationCodeRequest request =
+ * RetrieveAuthorizationCodeRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * AuthorizationCode response = domainsClient.retrieveAuthorizationCode(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 AuthorizationCode retrieveAuthorizationCode(
+ RetrieveAuthorizationCodeRequest request) {
+ return retrieveAuthorizationCodeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the authorization code of the `Registration` for the purpose of transferring the domain to
+ * another registrar.
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * RetrieveAuthorizationCodeRequest request =
+ * RetrieveAuthorizationCodeRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * RegistrationName registration =
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]");
+ * AuthorizationCode response = domainsClient.resetAuthorizationCode(registration);
+ * }
+ * }
+ *
+ * @param registration Required. The name of the `Registration` whose authorization code is being
+ * reset, in the format `projects/*/locations/*/registrations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuthorizationCode resetAuthorizationCode(RegistrationName registration) {
+ ResetAuthorizationCodeRequest request =
+ ResetAuthorizationCodeRequest.newBuilder()
+ .setRegistration(registration == null ? null : registration.toString())
+ .build();
+ return resetAuthorizationCode(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resets the authorization code of the `Registration` to a new random string.
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * String registration =
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString();
+ * AuthorizationCode response = domainsClient.resetAuthorizationCode(registration);
+ * }
+ * }
+ *
+ * @param registration Required. The name of the `Registration` whose authorization code is being
+ * reset, in the format `projects/*/locations/*/registrations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuthorizationCode resetAuthorizationCode(String registration) {
+ ResetAuthorizationCodeRequest request =
+ ResetAuthorizationCodeRequest.newBuilder().setRegistration(registration).build();
+ return resetAuthorizationCode(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resets the authorization code of the `Registration` to a new random string.
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ResetAuthorizationCodeRequest request =
+ * ResetAuthorizationCodeRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * AuthorizationCode response = domainsClient.resetAuthorizationCode(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 AuthorizationCode resetAuthorizationCode(ResetAuthorizationCodeRequest request) {
+ return resetAuthorizationCodeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resets the authorization code of the `Registration` to a new random string.
+ *
+ * {@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * ResetAuthorizationCodeRequest request =
+ * ResetAuthorizationCodeRequest.newBuilder()
+ * .setRegistration(
+ * RegistrationName.of("[PROJECT]", "[LOCATION]", "[REGISTRATION]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * DomainsSettings.Builder domainsSettingsBuilder = DomainsSettings.newBuilder();
+ * domainsSettingsBuilder
+ * .searchDomainsSettings()
+ * .setRetrySettings(
+ * domainsSettingsBuilder
+ * .searchDomainsSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DomainsSettings domainsSettings = domainsSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class DomainsSettings extends ClientSettings{@code
+ * try (DomainsClient domainsClient = DomainsClient.create()) {
+ * LocationName location = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String query = "query107944136";
+ * SearchDomainsResponse response = domainsClient.searchDomains(location, query);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.domains.v1alpha2;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-domains/src/main/java/com/google/cloud/domains/v1alpha2/stub/DomainsStub.java b/google-cloud-domains/src/main/java/com/google/cloud/domains/v1alpha2/stub/DomainsStub.java
new file mode 100644
index 00000000..24fbb72f
--- /dev/null
+++ b/google-cloud-domains/src/main/java/com/google/cloud/domains/v1alpha2/stub/DomainsStub.java
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.domains.v1alpha2.stub;
+
+import static com.google.cloud.domains.v1alpha2.DomainsClient.ListRegistrationsPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.domains.v1alpha2.AuthorizationCode;
+import com.google.cloud.domains.v1alpha2.ConfigureContactSettingsRequest;
+import com.google.cloud.domains.v1alpha2.ConfigureDnsSettingsRequest;
+import com.google.cloud.domains.v1alpha2.ConfigureManagementSettingsRequest;
+import com.google.cloud.domains.v1alpha2.DeleteRegistrationRequest;
+import com.google.cloud.domains.v1alpha2.ExportRegistrationRequest;
+import com.google.cloud.domains.v1alpha2.GetRegistrationRequest;
+import com.google.cloud.domains.v1alpha2.ListRegistrationsRequest;
+import com.google.cloud.domains.v1alpha2.ListRegistrationsResponse;
+import com.google.cloud.domains.v1alpha2.OperationMetadata;
+import com.google.cloud.domains.v1alpha2.RegisterDomainRequest;
+import com.google.cloud.domains.v1alpha2.Registration;
+import com.google.cloud.domains.v1alpha2.ResetAuthorizationCodeRequest;
+import com.google.cloud.domains.v1alpha2.RetrieveAuthorizationCodeRequest;
+import com.google.cloud.domains.v1alpha2.RetrieveRegisterParametersRequest;
+import com.google.cloud.domains.v1alpha2.RetrieveRegisterParametersResponse;
+import com.google.cloud.domains.v1alpha2.SearchDomainsRequest;
+import com.google.cloud.domains.v1alpha2.SearchDomainsResponse;
+import com.google.cloud.domains.v1alpha2.UpdateRegistrationRequest;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the Domains service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * DomainsStubSettings.Builder domainsSettingsBuilder = DomainsStubSettings.newBuilder();
+ * domainsSettingsBuilder
+ * .searchDomainsSettings()
+ * .setRetrySettings(
+ * domainsSettingsBuilder
+ * .searchDomainsSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DomainsStubSettings domainsSettings = domainsSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class DomainsStubSettings extends StubSettings