diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
new file mode 100644
index 00000000..b28d9107
--- /dev/null
+++ b/.github/.OwlBot.lock.yaml
@@ -0,0 +1,3 @@
+docker:
+ digest: sha256:d63f88abaa7cefc60021d1a86b6a2fb7c02948f8d6448142df4e3012a52308a2
+ 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..42cda440
--- /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/main/java/com/google/cloud/resourcemanager/(v.*)"
+
+deep-copy-regex:
+- source: "/google/cloud/resourcemanager/(v.*)/.*-java/proto-google-.*/src"
+ dest: "/proto-google-cloud-resourcemanager-$1/src"
+- source: "/google/cloud/resourcemanager/(v.*)/.*-java/grpc-google-.*/src"
+ dest: "/grpc-google-cloud-resourcemanager-$1/src"
+- source: "/google/cloud/resourcemanager/v.*/.*-java/gapic-google-.*/src"
+ dest: "/google-cloud-resourcemanager/src"
diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata
index 43d0f4f4..4d4ffd73 100644
--- a/.github/readme/synth.metadata/synth.metadata
+++ b/.github/readme/synth.metadata/synth.metadata
@@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-resourcemanager.git",
- "sha": "ff9f8195f06b87d257c5a552ac783cd5245e2369"
+ "sha": "2f806b2aa380722ab972cb7f92fababb8c554847"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "2e7bd5cc66a3f0b90ce1c150eb35c89eeb9872d6"
+ "sha": "bb854b6c048619e3be4e8b8ce8ed10aa74ea78ef"
}
}
]
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index 157051e6..aa46fc4a 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -79,6 +79,11 @@ samples)
if [[ -f ${SAMPLES_DIR}/pom.xml ]]
then
+ for FILE in ${KOKORO_GFILE_DIR}/secret_manager/*-samples-secrets; do
+ [[ -f "$FILE" ]] || continue
+ source "$FILE"
+ done
+
pushd ${SAMPLES_DIR}
mvn -B \
-Penable-samples \
diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh
index 2a460ac1..083c1a08 100755
--- a/.kokoro/release/publish_javadoc.sh
+++ b/.kokoro/release/publish_javadoc.sh
@@ -24,11 +24,6 @@ if [[ -z "${STAGING_BUCKET}" ]]; then
exit 1
fi
-if [[ -z "${STAGING_BUCKET_V2}" ]]; then
- echo "Need to set STAGING_BUCKET_V2 environment variable"
- exit 1
-fi
-
# work from the git root directory
pushd $(dirname "$0")/../../
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c47bb2cc..9224d230 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## [0.119.0](https://www.github.com/googleapis/java-resourcemanager/compare/v0.118.12...v0.119.0) (2021-04-09)
+
+
+### Features
+
+* add v3 client ([#423](https://www.github.com/googleapis/java-resourcemanager/issues/423)) ([159d6c5](https://www.github.com/googleapis/java-resourcemanager/commit/159d6c53bceea0d2c3ca5c3776e4d3a8983275f3))
+* introduce bom artifact and make this a multi-module project ([#419](https://www.github.com/googleapis/java-resourcemanager/issues/419)) ([ad4309e](https://www.github.com/googleapis/java-resourcemanager/commit/ad4309ec44a1dad107a6977c5e4aedac871f408f))
+
+
+### Dependencies
+
+* update dependency com.google.apis:google-api-services-cloudresourcemanager to v1-rev20210328-1.31.0 ([#411](https://www.github.com/googleapis/java-resourcemanager/issues/411)) ([aa484e0](https://www.github.com/googleapis/java-resourcemanager/commit/aa484e06ed40f40c27696c955a957fbf41b294b9))
+* update dependency com.google.errorprone:error_prone_annotations to v2.6.0 ([#417](https://www.github.com/googleapis/java-resourcemanager/issues/417)) ([3e53aa1](https://www.github.com/googleapis/java-resourcemanager/commit/3e53aa1f2dec56732d8e6515880878b37131c03f))
+
### [0.118.12](https://www.github.com/googleapis/java-resourcemanager/compare/v0.118.11...v0.118.12) (2021-03-15)
diff --git a/README.md b/README.md
index 5b2d85d3..17877240 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
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 (FoldersClient foldersClient = FoldersClient.create()) {
+ * FolderName name = FolderName.of("[FOLDER]");
+ * Folder response = foldersClient.getFolder(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the FoldersClient 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 FoldersSettings to create(). + * For example: + * + *
To customize credentials: + * + *
{@code
+ * FoldersSettings foldersSettings =
+ * FoldersSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * FoldersClient foldersClient = FoldersClient.create(foldersSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@code
+ * FoldersSettings foldersSettings = FoldersSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * FoldersClient foldersClient = FoldersClient.create(foldersSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class FoldersClient implements BackgroundResource { + private final FoldersSettings settings; + private final FoldersStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of FoldersClient with default settings. */ + public static final FoldersClient create() throws IOException { + return create(FoldersSettings.newBuilder().build()); + } + + /** + * Constructs an instance of FoldersClient, 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 FoldersClient create(FoldersSettings settings) throws IOException { + return new FoldersClient(settings); + } + + /** + * Constructs an instance of FoldersClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(FoldersSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final FoldersClient create(FoldersStub stub) { + return new FoldersClient(stub); + } + + /** + * Constructs an instance of FoldersClient, 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 FoldersClient(FoldersSettings settings) throws IOException { + this.settings = settings; + this.stub = ((FoldersStubSettings) 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 FoldersClient(FoldersStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final FoldersSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public FoldersStub 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. + /** + * Retrieves a folder identified by the supplied resource name. Valid folder resource names have + * the format `folders/{folder_id}` (for example, `folders/1234`). The caller must have + * `resourcemanager.folders.get` permission on the identified folder. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * FolderName name = FolderName.of("[FOLDER]");
+ * Folder response = foldersClient.getFolder(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the folder to retrieve. Must be of the form
+ * `folders/{folder_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Folder getFolder(FolderName name) {
+ GetFolderRequest request =
+ GetFolderRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getFolder(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a folder identified by the supplied resource name. Valid folder resource names have
+ * the format `folders/{folder_id}` (for example, `folders/1234`). The caller must have
+ * `resourcemanager.folders.get` permission on the identified folder.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String name = FolderName.of("[FOLDER]").toString();
+ * Folder response = foldersClient.getFolder(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the folder to retrieve. Must be of the form
+ * `folders/{folder_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Folder getFolder(String name) {
+ GetFolderRequest request = GetFolderRequest.newBuilder().setName(name).build();
+ return getFolder(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a folder identified by the supplied resource name. Valid folder resource names have
+ * the format `folders/{folder_id}` (for example, `folders/1234`). The caller must have
+ * `resourcemanager.folders.get` permission on the identified folder.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * GetFolderRequest request =
+ * GetFolderRequest.newBuilder().setName(FolderName.of("[FOLDER]").toString()).build();
+ * Folder response = foldersClient.getFolder(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 Folder getFolder(GetFolderRequest request) {
+ return getFolderCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a folder identified by the supplied resource name. Valid folder resource names have
+ * the format `folders/{folder_id}` (for example, `folders/1234`). The caller must have
+ * `resourcemanager.folders.get` permission on the identified folder.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * GetFolderRequest request =
+ * GetFolderRequest.newBuilder().setName(FolderName.of("[FOLDER]").toString()).build();
+ * ApiFuture future = foldersClient.getFolderCallable().futureCall(request);
+ * // Do something.
+ * Folder response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * ResourceName parent = TagValueName.of("[TAG_VALUE]");
+ * for (Folder element : foldersClient.listFolders(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the organization or folder whose folders are being
+ * listed. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. Access to
+ * this method is controlled by checking the `resourcemanager.folders.list` permission on the
+ * `parent`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListFoldersPagedResponse listFolders(ResourceName parent) {
+ ListFoldersRequest request =
+ ListFoldersRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listFolders(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the folders that are direct descendants of supplied parent resource. `list()` provides a
+ * strongly consistent view of the folders underneath the specified parent resource. `list()`
+ * returns folders sorted based upon the (ascending) lexical ordering of their display_name. The
+ * caller must have `resourcemanager.folders.list` permission on the identified parent.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String parent = TagValueName.of("[TAG_VALUE]").toString();
+ * for (Folder element : foldersClient.listFolders(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the organization or folder whose folders are being
+ * listed. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. Access to
+ * this method is controlled by checking the `resourcemanager.folders.list` permission on the
+ * `parent`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListFoldersPagedResponse listFolders(String parent) {
+ ListFoldersRequest request = ListFoldersRequest.newBuilder().setParent(parent).build();
+ return listFolders(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the folders that are direct descendants of supplied parent resource. `list()` provides a
+ * strongly consistent view of the folders underneath the specified parent resource. `list()`
+ * returns folders sorted based upon the (ascending) lexical ordering of their display_name. The
+ * caller must have `resourcemanager.folders.list` permission on the identified parent.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * ListFoldersRequest request =
+ * ListFoldersRequest.newBuilder()
+ * .setParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * for (Folder element : foldersClient.listFolders(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 ListFoldersPagedResponse listFolders(ListFoldersRequest request) {
+ return listFoldersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the folders that are direct descendants of supplied parent resource. `list()` provides a
+ * strongly consistent view of the folders underneath the specified parent resource. `list()`
+ * returns folders sorted based upon the (ascending) lexical ordering of their display_name. The
+ * caller must have `resourcemanager.folders.list` permission on the identified parent.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * ListFoldersRequest request =
+ * ListFoldersRequest.newBuilder()
+ * .setParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * ApiFuture future = foldersClient.listFoldersPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Folder element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * ListFoldersRequest request =
+ * ListFoldersRequest.newBuilder()
+ * .setParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * while (true) {
+ * ListFoldersResponse response = foldersClient.listFoldersCallable().call(request);
+ * for (Folder element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableThis will only return folders on which the caller has the permission + * `resourcemanager.folders.get`. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String query = "query107944136";
+ * for (Folder element : foldersClient.searchFolders(query).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param query Optional. Search criteria used to select the folders to return. If no search
+ * criteria is specified then all accessible folders will be returned.
+ * Query expressions can be used to restrict results based upon displayName, state and + * parent, where the operators `=` (`:`) `NOT`, `AND` and `OR` can be used along with the + * suffix wildcard symbol `*`. + *
The `displayName` field in a query expression should use escaped quotes for values that + * include whitespace to prevent unexpected behavior. + *
| Field | Description | + * |-------------------------|----------------------------------------| | displayName | + * Filters by displayName. | | parent | Filters by parent (for example: folders/123). | | + * state, lifecycleState | Filters by state. | + *
Some example queries are: + *
This will only return folders on which the caller has the permission + * `resourcemanager.folders.get`. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * SearchFoldersRequest request =
+ * SearchFoldersRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setQuery("query107944136")
+ * .build();
+ * for (Folder element : foldersClient.searchFolders(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 SearchFoldersPagedResponse searchFolders(SearchFoldersRequest request) {
+ return searchFoldersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Search for folders that match specific filter criteria. `search()` provides an eventually
+ * consistent view of the folders a user has access to which meet the specified filter criteria.
+ *
+ * This will only return folders on which the caller has the permission + * `resourcemanager.folders.get`. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * SearchFoldersRequest request =
+ * SearchFoldersRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setQuery("query107944136")
+ * .build();
+ * ApiFuture future = foldersClient.searchFoldersPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Folder element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableThis will only return folders on which the caller has the permission + * `resourcemanager.folders.get`. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * SearchFoldersRequest request =
+ * SearchFoldersRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setQuery("query107944136")
+ * .build();
+ * while (true) {
+ * SearchFoldersResponse response = foldersClient.searchFoldersCallable().call(request);
+ * for (Folder element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableIn order to succeed, the addition of this new folder must not violate the folder naming, + * height, or fanout constraints. + * + *
+ The folder's `display_name` must be distinct from all other folders that share its parent. + * + The addition of the folder must not cause the active folder hierarchy to exceed a height of + * 10. Note, the full active + deleted folder hierarchy is allowed to reach a height of 20; this + * provides additional headroom when moving folders that contain deleted folders. + The addition + * of the folder must not cause the total number of folders under its parent to exceed 300. + * + *
If the operation fails due to a folder constraint violation, some errors may be returned by + * the `CreateFolder` request, with status code `FAILED_PRECONDITION` and an error description. + * Other folder constraint violations will be communicated in the `Operation`, with the specific + * `PreconditionFailure` returned in the details list in the `Operation.error` field. + * + *
The caller must have `resourcemanager.folders.create` permission on the identified parent. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * Folder folder = Folder.newBuilder().build();
+ * Folder response = foldersClient.createFolderAsync(folder).get();
+ * }
+ * }
+ *
+ * @param folder Required. The folder being created, only the display name and parent will be
+ * consulted. All other fields will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureIn order to succeed, the addition of this new folder must not violate the folder naming, + * height, or fanout constraints. + * + *
+ The folder's `display_name` must be distinct from all other folders that share its parent. + * + The addition of the folder must not cause the active folder hierarchy to exceed a height of + * 10. Note, the full active + deleted folder hierarchy is allowed to reach a height of 20; this + * provides additional headroom when moving folders that contain deleted folders. + The addition + * of the folder must not cause the total number of folders under its parent to exceed 300. + * + *
If the operation fails due to a folder constraint violation, some errors may be returned by + * the `CreateFolder` request, with status code `FAILED_PRECONDITION` and an error description. + * Other folder constraint violations will be communicated in the `Operation`, with the specific + * `PreconditionFailure` returned in the details list in the `Operation.error` field. + * + *
The caller must have `resourcemanager.folders.create` permission on the identified parent. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * CreateFolderRequest request =
+ * CreateFolderRequest.newBuilder().setFolder(Folder.newBuilder().build()).build();
+ * Folder response = foldersClient.createFolderAsync(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 OperationFutureIn order to succeed, the addition of this new folder must not violate the folder naming, + * height, or fanout constraints. + * + *
+ The folder's `display_name` must be distinct from all other folders that share its parent. + * + The addition of the folder must not cause the active folder hierarchy to exceed a height of + * 10. Note, the full active + deleted folder hierarchy is allowed to reach a height of 20; this + * provides additional headroom when moving folders that contain deleted folders. + The addition + * of the folder must not cause the total number of folders under its parent to exceed 300. + * + *
If the operation fails due to a folder constraint violation, some errors may be returned by + * the `CreateFolder` request, with status code `FAILED_PRECONDITION` and an error description. + * Other folder constraint violations will be communicated in the `Operation`, with the specific + * `PreconditionFailure` returned in the details list in the `Operation.error` field. + * + *
The caller must have `resourcemanager.folders.create` permission on the identified parent. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * CreateFolderRequest request =
+ * CreateFolderRequest.newBuilder().setFolder(Folder.newBuilder().build()).build();
+ * OperationFuture future =
+ * foldersClient.createFolderOperationCallable().futureCall(request);
+ * // Do something.
+ * Folder response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableIn order to succeed, the addition of this new folder must not violate the folder naming, + * height, or fanout constraints. + * + *
+ The folder's `display_name` must be distinct from all other folders that share its parent. + * + The addition of the folder must not cause the active folder hierarchy to exceed a height of + * 10. Note, the full active + deleted folder hierarchy is allowed to reach a height of 20; this + * provides additional headroom when moving folders that contain deleted folders. + The addition + * of the folder must not cause the total number of folders under its parent to exceed 300. + * + *
If the operation fails due to a folder constraint violation, some errors may be returned by + * the `CreateFolder` request, with status code `FAILED_PRECONDITION` and an error description. + * Other folder constraint violations will be communicated in the `Operation`, with the specific + * `PreconditionFailure` returned in the details list in the `Operation.error` field. + * + *
The caller must have `resourcemanager.folders.create` permission on the identified parent. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * CreateFolderRequest request =
+ * CreateFolderRequest.newBuilder().setFolder(Folder.newBuilder().build()).build();
+ * ApiFuture future = foldersClient.createFolderCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe folder's `display_name` must start and end with a letter or digit, may contain letters, + * digits, spaces, hyphens and underscores and can be between 3 and 30 characters. This is + * captured by the regular expression: `[\\p{L}\\p{N}][\\p{L}\\p{N}_- ]{1,28}[\\p{L}\\p{N}]`. The + * caller must have `resourcemanager.folders.update` permission on the identified folder. + * + *
If the update fails due to the unique name constraint then a `PreconditionFailure` + * explaining this violation will be returned in the Status.details field. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * Folder folder = Folder.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Folder response = foldersClient.updateFolderAsync(folder, updateMask).get();
+ * }
+ * }
+ *
+ * @param folder Required. The new definition of the Folder. It must include the `name` field,
+ * which cannot be changed.
+ * @param updateMask Required. Fields to be updated. Only the `display_name` can be updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureThe folder's `display_name` must start and end with a letter or digit, may contain letters, + * digits, spaces, hyphens and underscores and can be between 3 and 30 characters. This is + * captured by the regular expression: `[\\p{L}\\p{N}][\\p{L}\\p{N}_- ]{1,28}[\\p{L}\\p{N}]`. The + * caller must have `resourcemanager.folders.update` permission on the identified folder. + * + *
If the update fails due to the unique name constraint then a `PreconditionFailure` + * explaining this violation will be returned in the Status.details field. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * UpdateFolderRequest request =
+ * UpdateFolderRequest.newBuilder()
+ * .setFolder(Folder.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Folder response = foldersClient.updateFolderAsync(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 OperationFutureThe folder's `display_name` must start and end with a letter or digit, may contain letters, + * digits, spaces, hyphens and underscores and can be between 3 and 30 characters. This is + * captured by the regular expression: `[\\p{L}\\p{N}][\\p{L}\\p{N}_- ]{1,28}[\\p{L}\\p{N}]`. The + * caller must have `resourcemanager.folders.update` permission on the identified folder. + * + *
If the update fails due to the unique name constraint then a `PreconditionFailure` + * explaining this violation will be returned in the Status.details field. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * UpdateFolderRequest request =
+ * UpdateFolderRequest.newBuilder()
+ * .setFolder(Folder.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * foldersClient.updateFolderOperationCallable().futureCall(request);
+ * // Do something.
+ * Folder response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableThe folder's `display_name` must start and end with a letter or digit, may contain letters, + * digits, spaces, hyphens and underscores and can be between 3 and 30 characters. This is + * captured by the regular expression: `[\\p{L}\\p{N}][\\p{L}\\p{N}_- ]{1,28}[\\p{L}\\p{N}]`. The + * caller must have `resourcemanager.folders.update` permission on the identified folder. + * + *
If the update fails due to the unique name constraint then a `PreconditionFailure` + * explaining this violation will be returned in the Status.details field. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * UpdateFolderRequest request =
+ * UpdateFolderRequest.newBuilder()
+ * .setFolder(Folder.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = foldersClient.updateFolderCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * FolderName name = FolderName.of("[FOLDER]");
+ * ResourceName destinationParent = TagValueName.of("[TAG_VALUE]");
+ * Folder response = foldersClient.moveFolderAsync(name, destinationParent).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Folder to move. Must be of the form
+ * folders/{folder_id}
+ * @param destinationParent Required. The resource name of the folder or organization which should
+ * be the folder's new parent. Must be of the form `folders/{folder_id}` or
+ * `organizations/{org_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * FolderName name = FolderName.of("[FOLDER]");
+ * String destinationParent = TagValueName.of("[TAG_VALUE]").toString();
+ * Folder response = foldersClient.moveFolderAsync(name, destinationParent).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Folder to move. Must be of the form
+ * folders/{folder_id}
+ * @param destinationParent Required. The resource name of the folder or organization which should
+ * be the folder's new parent. Must be of the form `folders/{folder_id}` or
+ * `organizations/{org_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String name = FolderName.of("[FOLDER]").toString();
+ * ResourceName destinationParent = TagValueName.of("[TAG_VALUE]");
+ * Folder response = foldersClient.moveFolderAsync(name, destinationParent).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Folder to move. Must be of the form
+ * folders/{folder_id}
+ * @param destinationParent Required. The resource name of the folder or organization which should
+ * be the folder's new parent. Must be of the form `folders/{folder_id}` or
+ * `organizations/{org_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String name = FolderName.of("[FOLDER]").toString();
+ * String destinationParent = TagValueName.of("[TAG_VALUE]").toString();
+ * Folder response = foldersClient.moveFolderAsync(name, destinationParent).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Folder to move. Must be of the form
+ * folders/{folder_id}
+ * @param destinationParent Required. The resource name of the folder or organization which should
+ * be the folder's new parent. Must be of the form `folders/{folder_id}` or
+ * `organizations/{org_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * MoveFolderRequest request =
+ * MoveFolderRequest.newBuilder()
+ * .setName(FolderName.of("[FOLDER]").toString())
+ * .setDestinationParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .build();
+ * Folder response = foldersClient.moveFolderAsync(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 OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * MoveFolderRequest request =
+ * MoveFolderRequest.newBuilder()
+ * .setName(FolderName.of("[FOLDER]").toString())
+ * .setDestinationParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .build();
+ * OperationFuture future =
+ * foldersClient.moveFolderOperationCallable().futureCall(request);
+ * // Do something.
+ * Folder response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * MoveFolderRequest request =
+ * MoveFolderRequest.newBuilder()
+ * .setName(FolderName.of("[FOLDER]").toString())
+ * .setDestinationParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .build();
+ * ApiFuture future = foldersClient.moveFolderCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * FolderName name = FolderName.of("[FOLDER]");
+ * Folder response = foldersClient.deleteFolderAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the folder to be deleted. Must be of the form
+ * `folders/{folder_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String name = FolderName.of("[FOLDER]").toString();
+ * Folder response = foldersClient.deleteFolderAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the folder to be deleted. Must be of the form
+ * `folders/{folder_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * DeleteFolderRequest request =
+ * DeleteFolderRequest.newBuilder().setName(FolderName.of("[FOLDER]").toString()).build();
+ * Folder response = foldersClient.deleteFolderAsync(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 OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * DeleteFolderRequest request =
+ * DeleteFolderRequest.newBuilder().setName(FolderName.of("[FOLDER]").toString()).build();
+ * OperationFuture future =
+ * foldersClient.deleteFolderOperationCallable().futureCall(request);
+ * // Do something.
+ * Folder response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * DeleteFolderRequest request =
+ * DeleteFolderRequest.newBuilder().setName(FolderName.of("[FOLDER]").toString()).build();
+ * ApiFuture future = foldersClient.deleteFolderCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * FolderName name = FolderName.of("[FOLDER]");
+ * Folder response = foldersClient.undeleteFolderAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the folder to undelete. Must be of the form
+ * `folders/{folder_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String name = FolderName.of("[FOLDER]").toString();
+ * Folder response = foldersClient.undeleteFolderAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the folder to undelete. Must be of the form
+ * `folders/{folder_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * UndeleteFolderRequest request =
+ * UndeleteFolderRequest.newBuilder().setName(FolderName.of("[FOLDER]").toString()).build();
+ * Folder response = foldersClient.undeleteFolderAsync(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 OperationFutureSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * UndeleteFolderRequest request =
+ * UndeleteFolderRequest.newBuilder().setName(FolderName.of("[FOLDER]").toString()).build();
+ * OperationFuture future =
+ * foldersClient.undeleteFolderOperationCallable().futureCall(request);
+ * // Do something.
+ * Folder response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * UndeleteFolderRequest request =
+ * UndeleteFolderRequest.newBuilder().setName(FolderName.of("[FOLDER]").toString()).build();
+ * ApiFuture future = foldersClient.undeleteFolderCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * ResourceName resource = TagValueName.of("[TAG_VALUE]");
+ * Policy response = foldersClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(ResourceName resource) {
+ GetIamPolicyRequest request =
+ GetIamPolicyRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a folder. The returned policy may be empty if no such policy
+ * or resource exists. The `resource` field should be the folder's resource name, for example:
+ * "folders/1234". The caller must have `resourcemanager.folders.getIamPolicy` permission on the
+ * identified folder.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String resource = TagValueName.of("[TAG_VALUE]").toString();
+ * Policy response = foldersClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String resource) {
+ GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a folder. The returned policy may be empty if no such policy
+ * or resource exists. The `resource` field should be the folder's resource name, for example:
+ * "folders/1234". The caller must have `resourcemanager.folders.getIamPolicy` permission on the
+ * identified folder.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = foldersClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a folder. The returned policy may be empty if no such policy
+ * or resource exists. The `resource` field should be the folder's resource name, for example:
+ * "folders/1234". The caller must have `resourcemanager.folders.getIamPolicy` permission on the
+ * identified folder.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = foldersClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * ResourceName resource = TagValueName.of("[TAG_VALUE]");
+ * Policy policy = Policy.newBuilder().build();
+ * Policy response = foldersClient.setIamPolicy(resource, policy);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being specified. See the
+ * operation documentation for the appropriate value for this field.
+ * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
+ * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
+ * Platform services (such as Projects) might reject them.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
+ SetIamPolicyRequest request =
+ SetIamPolicyRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .setPolicy(policy)
+ .build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on a folder, replacing any existing policy. The `resource` field
+ * should be the folder's resource name, for example: "folders/1234". The caller must have
+ * `resourcemanager.folders.setIamPolicy` permission on the identified folder.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String resource = TagValueName.of("[TAG_VALUE]").toString();
+ * Policy policy = Policy.newBuilder().build();
+ * Policy response = foldersClient.setIamPolicy(resource, policy);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being specified. See the
+ * operation documentation for the appropriate value for this field.
+ * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
+ * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
+ * Platform services (such as Projects) might reject them.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(String resource, Policy policy) {
+ SetIamPolicyRequest request =
+ SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on a folder, replacing any existing policy. The `resource` field
+ * should be the folder's resource name, for example: "folders/1234". The caller must have
+ * `resourcemanager.folders.setIamPolicy` permission on the identified folder.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * Policy response = foldersClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on a folder, replacing any existing policy. The `resource` field
+ * should be the folder's resource name, for example: "folders/1234". The caller must have
+ * `resourcemanager.folders.setIamPolicy` permission on the identified folder.
+ *
+ * Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * ApiFuture future = foldersClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThere are no permissions required for making this API call. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * ResourceName resource = TagValueName.of("[TAG_VALUE]");
+ * List permissions = new ArrayList<>();
+ * TestIamPermissionsResponse response = foldersClient.testIamPermissions(resource, permissions);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @param permissions The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestIamPermissionsResponse testIamPermissions(
+ ResourceName resource, ListThere are no permissions required for making this API call. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * String resource = TagValueName.of("[TAG_VALUE]").toString();
+ * List permissions = new ArrayList<>();
+ * TestIamPermissionsResponse response = foldersClient.testIamPermissions(resource, permissions);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @param permissions The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestIamPermissionsResponse testIamPermissions(
+ String resource, ListThere are no permissions required for making this API call. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = foldersClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified folder. The `resource` field should be
+ * the folder's resource name, for example: "folders/1234".
+ *
+ * There are no permissions required for making this API call. + * + *
Sample code: + * + *
{@code
+ * try (FoldersClient foldersClient = FoldersClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * foldersClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe 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 getFolder to 30 seconds: + * + *
{@code
+ * FoldersSettings.Builder foldersSettingsBuilder = FoldersSettings.newBuilder();
+ * foldersSettingsBuilder
+ * .getFolderSettings()
+ * .setRetrySettings(
+ * foldersSettingsBuilder
+ * .getFolderSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * FoldersSettings foldersSettings = foldersSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class FoldersSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the OrganizationsClient 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 OrganizationsSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class OrganizationsClient implements BackgroundResource {
+ private final OrganizationsSettings settings;
+ private final OrganizationsStub stub;
+
+ /** Constructs an instance of OrganizationsClient with default settings. */
+ public static final OrganizationsClient create() throws IOException {
+ return create(OrganizationsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of OrganizationsClient, 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 OrganizationsClient create(OrganizationsSettings settings)
+ throws IOException {
+ return new OrganizationsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of OrganizationsClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(OrganizationsSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final OrganizationsClient create(OrganizationsStub stub) {
+ return new OrganizationsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of OrganizationsClient, 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 OrganizationsClient(OrganizationsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((OrganizationsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected OrganizationsClient(OrganizationsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final OrganizationsSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public OrganizationsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches an organization resource identified by the specified resource name.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Search will only return organizations on which the user has the permission
+ * `resourcemanager.organizations.get`
+ *
+ * Sample code:
+ *
+ * | Field | Description |
+ * |------------------|--------------------------------------------| | directoryCustomerId,
+ * owner.directoryCustomerId | Filters by directory customer id. | | domain | Filters by
+ * domain. |
+ * Organizations may be queried by `directoryCustomerId` or by `domain`, where the domain
+ * is a G Suite domain, for example:
+ * Search will only return organizations on which the user has the permission
+ * `resourcemanager.organizations.get`
+ *
+ * Sample code:
+ *
+ * Search will only return organizations on which the user has the permission
+ * `resourcemanager.organizations.get`
+ *
+ * Sample code:
+ *
+ * Search will only return organizations on which the user has the permission
+ * `resourcemanager.organizations.get`
+ *
+ * Sample code:
+ *
+ * Authorization requires the IAM permission `resourcemanager.organizations.getIamPolicy` on
+ * the specified organization.
+ *
+ * Sample code:
+ *
+ * Authorization requires the IAM permission `resourcemanager.organizations.getIamPolicy` on
+ * the specified organization.
+ *
+ * Sample code:
+ *
+ * Authorization requires the IAM permission `resourcemanager.organizations.getIamPolicy` on
+ * the specified organization.
+ *
+ * Sample code:
+ *
+ * Authorization requires the IAM permission `resourcemanager.organizations.getIamPolicy` on
+ * the specified organization.
+ *
+ * Sample code:
+ *
+ * Authorization requires the IAM permission `resourcemanager.organizations.setIamPolicy` on
+ * the specified organization.
+ *
+ * Sample code:
+ *
+ * Authorization requires the IAM permission `resourcemanager.organizations.setIamPolicy` on
+ * the specified organization.
+ *
+ * Sample code:
+ *
+ * Authorization requires the IAM permission `resourcemanager.organizations.setIamPolicy` on
+ * the specified organization.
+ *
+ * Sample code:
+ *
+ * Authorization requires the IAM permission `resourcemanager.organizations.setIamPolicy` on
+ * the specified organization.
+ *
+ * Sample code:
+ *
+ * There are no permissions required for making this API call.
+ *
+ * Sample code:
+ *
+ * There are no permissions required for making this API call.
+ *
+ * Sample code:
+ *
+ * There are no permissions required for making this API call.
+ *
+ * Sample code:
+ *
+ * There are no permissions required for making this API call.
+ *
+ * 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 getOrganization to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the ProjectsClient 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 ProjectsSettings to create().
+ * For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class ProjectsClient implements BackgroundResource {
+ private final ProjectsSettings settings;
+ private final ProjectsStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of ProjectsClient with default settings. */
+ public static final ProjectsClient create() throws IOException {
+ return create(ProjectsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ProjectsClient, 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 ProjectsClient create(ProjectsSettings settings) throws IOException {
+ return new ProjectsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ProjectsClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(ProjectsSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final ProjectsClient create(ProjectsStub stub) {
+ return new ProjectsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ProjectsClient, 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 ProjectsClient(ProjectsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ProjectsStubSettings) 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 ProjectsClient(ProjectsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final ProjectsSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public ProjectsStub 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.
+ /**
+ * Retrieves the project identified by the specified `name` (for example,
+ * `projects/415104041262`).
+ *
+ * The caller must have `resourcemanager.projects.get` permission for this project.
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.get` permission for this project.
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.get` permission for this project.
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.get` permission for this project.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * For example, setting this field to 'folders/1234' would list all projects directly under
+ * that folder.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProjectsPagedResponse listProjects(ResourceName parent) {
+ ListProjectsRequest request =
+ ListProjectsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listProjects(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists projects that are direct children of the specified folder or organization resource.
+ * `list()` provides a strongly consistent view of the projects underneath the specified parent
+ * resource. `list()` returns projects sorted based upon the (ascending) lexical ordering of their
+ * `display_name`. The caller must have `resourcemanager.projects.list` permission on the
+ * identified parent.
+ *
+ * Sample code:
+ *
+ * For example, setting this field to 'folders/1234' would list all projects directly under
+ * that folder.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProjectsPagedResponse listProjects(String parent) {
+ ListProjectsRequest request = ListProjectsRequest.newBuilder().setParent(parent).build();
+ return listProjects(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists projects that are direct children of the specified folder or organization resource.
+ * `list()` provides a strongly consistent view of the projects underneath the specified parent
+ * resource. `list()` returns projects sorted based upon the (ascending) lexical ordering of their
+ * `display_name`. The caller must have `resourcemanager.projects.list` permission on the
+ * identified parent.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This method returns projects in an unspecified order.
+ *
+ * This method is eventually consistent with project mutations; this means that a newly created
+ * project may not appear in the results or recent updates to an existing project may not be
+ * reflected in the results. To retrieve the latest state of a project, use the
+ * [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.
+ *
+ * Sample code:
+ *
+ * | Field | Description |
+ * |-------------------------|----------------------------------------------| | displayName,
+ * name | Filters by displayName. | | parent | Project's parent. (for example: folders/123,
+ * organizations/*) Prefer parent field over parent.type and parent.id. | | parent.type |
+ * Parent's type: `folder` or `organization`. | | parent.id | Parent's id number (for example:
+ * 123) | | id, projectId | Filters by projectId. | | state, lifecycleState | Filters by
+ * state. | | labels | Filters by label name or value. | | labels.<key> (where
+ * *key* is the name of a label) | Filters by label name. |
+ * Search expressions are case insensitive.
+ * Some examples queries:
+ * | Query | Description |
+ * |------------------|-----------------------------------------------------| | name:how*
+ * | The project's name starts with "how". | | name:Howl | The project's name is `Howl` or
+ * `howl`. | | name:HOWL | Equivalent to above. | | NAME:howl | Equivalent to above. | |
+ * labels.color:* | The project has the label `color`. | | labels.color:red | The
+ * project's label `color` has the value `red`. | | labels.color:red labels.size:big
+ * | The project's label `color` has the value `red` and its label `size` has the value `big`.
+ * |
+ * If no query is specified, the call will return projects for which the user has the
+ * `resourcemanager.projects.get` permission.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchProjectsPagedResponse searchProjects(String query) {
+ SearchProjectsRequest request = SearchProjectsRequest.newBuilder().setQuery(query).build();
+ return searchProjects(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Search for projects that the caller has both `resourcemanager.projects.get` permission on, and
+ * also satisfy the specified query.
+ *
+ * This method returns projects in an unspecified order.
+ *
+ * This method is eventually consistent with project mutations; this means that a newly created
+ * project may not appear in the results or recent updates to an existing project may not be
+ * reflected in the results. To retrieve the latest state of a project, use the
+ * [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.
+ *
+ * Sample code:
+ *
+ * This method returns projects in an unspecified order.
+ *
+ * This method is eventually consistent with project mutations; this means that a newly created
+ * project may not appear in the results or recent updates to an existing project may not be
+ * reflected in the results. To retrieve the latest state of a project, use the
+ * [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.
+ *
+ * Sample code:
+ *
+ * This method returns projects in an unspecified order.
+ *
+ * This method is eventually consistent with project mutations; this means that a newly created
+ * project may not appear in the results or recent updates to an existing project may not be
+ * reflected in the results. To retrieve the latest state of a project, use the
+ * [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Project ID is required. If the requested ID is unavailable, the request fails.
+ * If the `parent` field is set, the `resourcemanager.projects.create` permission is
+ * checked on the parent resource. If no parent is set and the authorization credentials
+ * belong to an Organziation, the parent will be set to that Organization.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.update` permission for this project.
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.update` permission for this project.
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.update` permission for this project.
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.update` permission for this project.
+ *
+ * Sample code:
+ *
+ * Returns an operation which can be used to track the process of the project move workflow.
+ * Upon success, the `Operation.response` field will be populated with the moved project.
+ *
+ * The caller must have `resourcemanager.projects.update` permission on the project and have
+ * `resourcemanager.projects.move` permission on the project's current and proposed new parent.
+ *
+ * Sample code:
+ *
+ * Returns an operation which can be used to track the process of the project move workflow.
+ * Upon success, the `Operation.response` field will be populated with the moved project.
+ *
+ * The caller must have `resourcemanager.projects.update` permission on the project and have
+ * `resourcemanager.projects.move` permission on the project's current and proposed new parent.
+ *
+ * Sample code:
+ *
+ * Returns an operation which can be used to track the process of the project move workflow.
+ * Upon success, the `Operation.response` field will be populated with the moved project.
+ *
+ * The caller must have `resourcemanager.projects.update` permission on the project and have
+ * `resourcemanager.projects.move` permission on the project's current and proposed new parent.
+ *
+ * Sample code:
+ *
+ * Returns an operation which can be used to track the process of the project move workflow.
+ * Upon success, the `Operation.response` field will be populated with the moved project.
+ *
+ * The caller must have `resourcemanager.projects.update` permission on the project and have
+ * `resourcemanager.projects.move` permission on the project's current and proposed new parent.
+ *
+ * Sample code:
+ *
+ * Returns an operation which can be used to track the process of the project move workflow.
+ * Upon success, the `Operation.response` field will be populated with the moved project.
+ *
+ * The caller must have `resourcemanager.projects.update` permission on the project and have
+ * `resourcemanager.projects.move` permission on the project's current and proposed new parent.
+ *
+ * Sample code:
+ *
+ * Returns an operation which can be used to track the process of the project move workflow.
+ * Upon success, the `Operation.response` field will be populated with the moved project.
+ *
+ * The caller must have `resourcemanager.projects.update` permission on the project and have
+ * `resourcemanager.projects.move` permission on the project's current and proposed new parent.
+ *
+ * Sample code:
+ *
+ * Returns an operation which can be used to track the process of the project move workflow.
+ * Upon success, the `Operation.response` field will be populated with the moved project.
+ *
+ * The caller must have `resourcemanager.projects.update` permission on the project and have
+ * `resourcemanager.projects.move` permission on the project's current and proposed new parent.
+ *
+ * Sample code:
+ *
+ * This method will only affect the project if it has a lifecycle state of
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].
+ *
+ * This method changes the Project's lifecycle state from
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to
+ * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The
+ * deletion starts at an unspecified time, at which point the Project is no longer accessible.
+ *
+ * Until the deletion completes, you can check the lifecycle state checked by retrieving the
+ * project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the
+ * project remains visible to [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the
+ * project.
+ *
+ * After the deletion completes, the project is not retrievable by the [GetProject]
+ * [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects], and
+ * [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods.
+ *
+ * This method behaves idempotently, such that deleting a `DELETE_REQUESTED` project will not
+ * cause an error, but also won't do anything.
+ *
+ * The caller must have `resourcemanager.projects.delete` permissions for this project.
+ *
+ * Sample code:
+ *
+ * This method will only affect the project if it has a lifecycle state of
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].
+ *
+ * This method changes the Project's lifecycle state from
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to
+ * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The
+ * deletion starts at an unspecified time, at which point the Project is no longer accessible.
+ *
+ * Until the deletion completes, you can check the lifecycle state checked by retrieving the
+ * project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the
+ * project remains visible to [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the
+ * project.
+ *
+ * After the deletion completes, the project is not retrievable by the [GetProject]
+ * [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects], and
+ * [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods.
+ *
+ * This method behaves idempotently, such that deleting a `DELETE_REQUESTED` project will not
+ * cause an error, but also won't do anything.
+ *
+ * The caller must have `resourcemanager.projects.delete` permissions for this project.
+ *
+ * Sample code:
+ *
+ * This method will only affect the project if it has a lifecycle state of
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].
+ *
+ * This method changes the Project's lifecycle state from
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to
+ * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The
+ * deletion starts at an unspecified time, at which point the Project is no longer accessible.
+ *
+ * Until the deletion completes, you can check the lifecycle state checked by retrieving the
+ * project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the
+ * project remains visible to [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the
+ * project.
+ *
+ * After the deletion completes, the project is not retrievable by the [GetProject]
+ * [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects], and
+ * [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods.
+ *
+ * This method behaves idempotently, such that deleting a `DELETE_REQUESTED` project will not
+ * cause an error, but also won't do anything.
+ *
+ * The caller must have `resourcemanager.projects.delete` permissions for this project.
+ *
+ * Sample code:
+ *
+ * This method will only affect the project if it has a lifecycle state of
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].
+ *
+ * This method changes the Project's lifecycle state from
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to
+ * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The
+ * deletion starts at an unspecified time, at which point the Project is no longer accessible.
+ *
+ * Until the deletion completes, you can check the lifecycle state checked by retrieving the
+ * project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the
+ * project remains visible to [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the
+ * project.
+ *
+ * After the deletion completes, the project is not retrievable by the [GetProject]
+ * [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects], and
+ * [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods.
+ *
+ * This method behaves idempotently, such that deleting a `DELETE_REQUESTED` project will not
+ * cause an error, but also won't do anything.
+ *
+ * The caller must have `resourcemanager.projects.delete` permissions for this project.
+ *
+ * Sample code:
+ *
+ * This method will only affect the project if it has a lifecycle state of
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].
+ *
+ * This method changes the Project's lifecycle state from
+ * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to
+ * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The
+ * deletion starts at an unspecified time, at which point the Project is no longer accessible.
+ *
+ * Until the deletion completes, you can check the lifecycle state checked by retrieving the
+ * project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the
+ * project remains visible to [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the
+ * project.
+ *
+ * After the deletion completes, the project is not retrievable by the [GetProject]
+ * [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects]
+ * [google.cloud.resourcemanager.v3.Projects.ListProjects], and
+ * [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods.
+ *
+ * This method behaves idempotently, such that deleting a `DELETE_REQUESTED` project will not
+ * cause an error, but also won't do anything.
+ *
+ * The caller must have `resourcemanager.projects.delete` permissions for this project.
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.undelete` permission for this project.
+ *
+ * Sample code:
+ *
+ * Required.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture The caller must have `resourcemanager.projects.undelete` permission for this project.
+ *
+ * Sample code:
+ *
+ * Required.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture The caller must have `resourcemanager.projects.undelete` permission for this project.
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.undelete` permission for this project.
+ *
+ * Sample code:
+ *
+ * The caller must have `resourcemanager.projects.undelete` permission for this project.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * CAUTION: This method will replace the existing policy, and cannot be used to append
+ * additional IAM settings.
+ *
+ * Note: Removing service accounts from policies or changing their roles can render services
+ * completely inoperable. It is important to understand how the service account is being used
+ * before removing or updating its roles.
+ *
+ * The following constraints apply when using `setIamPolicy()`:
+ *
+ * + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a
+ * `Binding` of a `Policy`.
+ *
+ * + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an
+ * organization. For example, group{@literal @}myownpersonaldomain.com could be added as an owner
+ * to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com
+ * organization.
+ *
+ * + Service accounts can be made owners of a project directly without any restrictions.
+ * However, to be added as an owner, a user must be invited using the Cloud Platform console and
+ * must accept the invitation.
+ *
+ * + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted
+ * the owner role using the Cloud Platform Console and must explicitly accept the invitation.
+ *
+ * + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be
+ * sent only using the Cloud Platform Console.
+ *
+ * + Membership changes that leave the project without any owners that have accepted the Terms
+ * of Service (ToS) will be rejected.
+ *
+ * + If the project is not part of an organization, there must be at least one owner who has
+ * accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove
+ * the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy
+ * projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be
+ * rejected until the lack of a ToS-accepting owner is rectified.
+ *
+ * + Calling this method requires enabling the App Engine Admin API.
+ *
+ * Sample code:
+ *
+ * CAUTION: This method will replace the existing policy, and cannot be used to append
+ * additional IAM settings.
+ *
+ * Note: Removing service accounts from policies or changing their roles can render services
+ * completely inoperable. It is important to understand how the service account is being used
+ * before removing or updating its roles.
+ *
+ * The following constraints apply when using `setIamPolicy()`:
+ *
+ * + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a
+ * `Binding` of a `Policy`.
+ *
+ * + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an
+ * organization. For example, group{@literal @}myownpersonaldomain.com could be added as an owner
+ * to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com
+ * organization.
+ *
+ * + Service accounts can be made owners of a project directly without any restrictions.
+ * However, to be added as an owner, a user must be invited using the Cloud Platform console and
+ * must accept the invitation.
+ *
+ * + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted
+ * the owner role using the Cloud Platform Console and must explicitly accept the invitation.
+ *
+ * + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be
+ * sent only using the Cloud Platform Console.
+ *
+ * + Membership changes that leave the project without any owners that have accepted the Terms
+ * of Service (ToS) will be rejected.
+ *
+ * + If the project is not part of an organization, there must be at least one owner who has
+ * accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove
+ * the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy
+ * projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be
+ * rejected until the lack of a ToS-accepting owner is rectified.
+ *
+ * + Calling this method requires enabling the App Engine Admin API.
+ *
+ * Sample code:
+ *
+ * CAUTION: This method will replace the existing policy, and cannot be used to append
+ * additional IAM settings.
+ *
+ * Note: Removing service accounts from policies or changing their roles can render services
+ * completely inoperable. It is important to understand how the service account is being used
+ * before removing or updating its roles.
+ *
+ * The following constraints apply when using `setIamPolicy()`:
+ *
+ * + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a
+ * `Binding` of a `Policy`.
+ *
+ * + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an
+ * organization. For example, group{@literal @}myownpersonaldomain.com could be added as an owner
+ * to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com
+ * organization.
+ *
+ * + Service accounts can be made owners of a project directly without any restrictions.
+ * However, to be added as an owner, a user must be invited using the Cloud Platform console and
+ * must accept the invitation.
+ *
+ * + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted
+ * the owner role using the Cloud Platform Console and must explicitly accept the invitation.
+ *
+ * + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be
+ * sent only using the Cloud Platform Console.
+ *
+ * + Membership changes that leave the project without any owners that have accepted the Terms
+ * of Service (ToS) will be rejected.
+ *
+ * + If the project is not part of an organization, there must be at least one owner who has
+ * accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove
+ * the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy
+ * projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be
+ * rejected until the lack of a ToS-accepting owner is rectified.
+ *
+ * + Calling this method requires enabling the App Engine Admin API.
+ *
+ * Sample code:
+ *
+ * CAUTION: This method will replace the existing policy, and cannot be used to append
+ * additional IAM settings.
+ *
+ * Note: Removing service accounts from policies or changing their roles can render services
+ * completely inoperable. It is important to understand how the service account is being used
+ * before removing or updating its roles.
+ *
+ * The following constraints apply when using `setIamPolicy()`:
+ *
+ * + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a
+ * `Binding` of a `Policy`.
+ *
+ * + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an
+ * organization. For example, group{@literal @}myownpersonaldomain.com could be added as an owner
+ * to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com
+ * organization.
+ *
+ * + Service accounts can be made owners of a project directly without any restrictions.
+ * However, to be added as an owner, a user must be invited using the Cloud Platform console and
+ * must accept the invitation.
+ *
+ * + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted
+ * the owner role using the Cloud Platform Console and must explicitly accept the invitation.
+ *
+ * + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be
+ * sent only using the Cloud Platform Console.
+ *
+ * + Membership changes that leave the project without any owners that have accepted the Terms
+ * of Service (ToS) will be rejected.
+ *
+ * + If the project is not part of an organization, there must be at least one owner who has
+ * accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove
+ * the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy
+ * projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be
+ * rejected until the lack of a ToS-accepting owner is rectified.
+ *
+ * + Calling this method requires enabling the App Engine Admin API.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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 getProject to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the TagBindingsClient 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 TagBindingsSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class TagBindingsClient implements BackgroundResource {
+ private final TagBindingsSettings settings;
+ private final TagBindingsStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of TagBindingsClient with default settings. */
+ public static final TagBindingsClient create() throws IOException {
+ return create(TagBindingsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of TagBindingsClient, 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 TagBindingsClient create(TagBindingsSettings settings) throws IOException {
+ return new TagBindingsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of TagBindingsClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(TagBindingsSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final TagBindingsClient create(TagBindingsStub stub) {
+ return new TagBindingsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of TagBindingsClient, 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 TagBindingsClient(TagBindingsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((TagBindingsStubSettings) 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 TagBindingsClient(TagBindingsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final TagBindingsSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public TagBindingsStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the TagBindings for the given cloud resource, as specified with `parent`.
+ *
+ * NOTE: The `parent` field is expected to be a full resource name:
+ * https://cloud.google.com/apis/design/resource_names#full_resource_name
+ *
+ * Sample code:
+ *
+ * NOTE: The `parent` field is expected to be a full resource name:
+ * https://cloud.google.com/apis/design/resource_names#full_resource_name
+ *
+ * Sample code:
+ *
+ * NOTE: The `parent` field is expected to be a full resource name:
+ * https://cloud.google.com/apis/design/resource_names#full_resource_name
+ *
+ * Sample code:
+ *
+ * NOTE: The `parent` field is expected to be a full resource name:
+ * https://cloud.google.com/apis/design/resource_names#full_resource_name
+ *
+ * Sample code:
+ *
+ * NOTE: The `parent` field is expected to be a full resource name:
+ * https://cloud.google.com/apis/design/resource_names#full_resource_name
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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 listTagBindings to 30 seconds:
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * OrganizationName name = OrganizationName.of("[ORGANIZATION]");
+ * Organization response = organizationsClient.getOrganization(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * OrganizationsSettings organizationsSettings =
+ * OrganizationsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * OrganizationsClient organizationsClient = OrganizationsClient.create(organizationsSettings);
+ * }
+ *
+ * {@code
+ * OrganizationsSettings organizationsSettings =
+ * OrganizationsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * OrganizationsClient organizationsClient = OrganizationsClient.create(organizationsSettings);
+ * }
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * OrganizationName name = OrganizationName.of("[ORGANIZATION]");
+ * Organization response = organizationsClient.getOrganization(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Organization to fetch. This is the
+ * organization's relative path in the API, formatted as "organizations/[organizationId]". For
+ * example, "organizations/1234".
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Organization getOrganization(OrganizationName name) {
+ GetOrganizationRequest request =
+ GetOrganizationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getOrganization(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches an organization resource identified by the specified resource name.
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * String name = OrganizationName.of("[ORGANIZATION]").toString();
+ * Organization response = organizationsClient.getOrganization(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Organization to fetch. This is the
+ * organization's relative path in the API, formatted as "organizations/[organizationId]". For
+ * example, "organizations/1234".
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Organization getOrganization(String name) {
+ GetOrganizationRequest request = GetOrganizationRequest.newBuilder().setName(name).build();
+ return getOrganization(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches an organization resource identified by the specified resource name.
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * GetOrganizationRequest request =
+ * GetOrganizationRequest.newBuilder()
+ * .setName(OrganizationName.of("[ORGANIZATION]").toString())
+ * .build();
+ * Organization response = organizationsClient.getOrganization(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 Organization getOrganization(GetOrganizationRequest request) {
+ return getOrganizationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches an organization resource identified by the specified resource name.
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * GetOrganizationRequest request =
+ * GetOrganizationRequest.newBuilder()
+ * .setName(OrganizationName.of("[ORGANIZATION]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * String query = "query107944136";
+ * for (Organization element : organizationsClient.searchOrganizations(query).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param query Optional. An optional query string used to filter the Organizations to return in
+ * the response. Query rules are case-insensitive.
+ *
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchOrganizationsPagedResponse searchOrganizations(String query) {
+ SearchOrganizationsRequest request =
+ SearchOrganizationsRequest.newBuilder().setQuery(query).build();
+ return searchOrganizations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches organization resources that are visible to the user and satisfy the specified filter.
+ * This method returns organizations in an unspecified order. New organizations do not necessarily
+ * appear at the end of the results, and may take a small amount of time to appear.
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * SearchOrganizationsRequest request =
+ * SearchOrganizationsRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setQuery("query107944136")
+ * .build();
+ * for (Organization element : organizationsClient.searchOrganizations(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 SearchOrganizationsPagedResponse searchOrganizations(
+ SearchOrganizationsRequest request) {
+ return searchOrganizationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches organization resources that are visible to the user and satisfy the specified filter.
+ * This method returns organizations in an unspecified order. New organizations do not necessarily
+ * appear at the end of the results, and may take a small amount of time to appear.
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * SearchOrganizationsRequest request =
+ * SearchOrganizationsRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setQuery("query107944136")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * SearchOrganizationsRequest request =
+ * SearchOrganizationsRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setQuery("query107944136")
+ * .build();
+ * while (true) {
+ * SearchOrganizationsResponse response =
+ * organizationsClient.searchOrganizationsCallable().call(request);
+ * for (Organization element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * ResourceName resource = TagValueName.of("[TAG_VALUE]");
+ * Policy response = organizationsClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(ResourceName resource) {
+ GetIamPolicyRequest request =
+ GetIamPolicyRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for an organization resource. The policy may be empty if no such
+ * policy or resource exists. The `resource` field should be the organization's resource name, for
+ * example: "organizations/123".
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * String resource = TagValueName.of("[TAG_VALUE]").toString();
+ * Policy response = organizationsClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String resource) {
+ GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for an organization resource. The policy may be empty if no such
+ * policy or resource exists. The `resource` field should be the organization's resource name, for
+ * example: "organizations/123".
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = organizationsClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for an organization resource. The policy may be empty if no such
+ * policy or resource exists. The `resource` field should be the organization's resource name, for
+ * example: "organizations/123".
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * ResourceName resource = TagValueName.of("[TAG_VALUE]");
+ * Policy response = organizationsClient.setIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being specified. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(ResourceName resource) {
+ SetIamPolicyRequest request =
+ SetIamPolicyRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on an organization resource. Replaces any existing policy. The
+ * `resource` field should be the organization's resource name, for example: "organizations/123".
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * String resource = TagValueName.of("[TAG_VALUE]").toString();
+ * Policy response = organizationsClient.setIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being specified. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(String resource) {
+ SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder().setResource(resource).build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on an organization resource. Replaces any existing policy. The
+ * `resource` field should be the organization's resource name, for example: "organizations/123".
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * Policy response = organizationsClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on an organization resource. Replaces any existing policy. The
+ * `resource` field should be the organization's resource name, for example: "organizations/123".
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * ResourceName resource = TagValueName.of("[TAG_VALUE]");
+ * List
+ *
+ * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @param permissions The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestIamPermissionsResponse testIamPermissions(
+ ResourceName resource, List{@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * String resource = TagValueName.of("[TAG_VALUE]").toString();
+ * List
+ *
+ * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @param permissions The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestIamPermissionsResponse testIamPermissions(
+ String resource, List{@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .addAllPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the permissions that a caller has on the specified organization. The `resource` field
+ * should be the organization's resource name, for example: "organizations/123".
+ *
+ * {@code
+ * try (OrganizationsClient organizationsClient = OrganizationsClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .addAllPermissions(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * OrganizationsSettings.Builder organizationsSettingsBuilder = OrganizationsSettings.newBuilder();
+ * organizationsSettingsBuilder
+ * .getOrganizationSettings()
+ * .setRetrySettings(
+ * organizationsSettingsBuilder
+ * .getOrganizationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * OrganizationsSettings organizationsSettings = organizationsSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class OrganizationsSettings extends ClientSettings{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ProjectName name = ProjectName.of("[PROJECT]");
+ * Project response = projectsClient.getProject(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * ProjectsSettings projectsSettings =
+ * ProjectsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ProjectsClient projectsClient = ProjectsClient.create(projectsSettings);
+ * }
+ *
+ * {@code
+ * ProjectsSettings projectsSettings =
+ * ProjectsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ProjectsClient projectsClient = ProjectsClient.create(projectsSettings);
+ * }
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ProjectName name = ProjectName.of("[PROJECT]");
+ * Project response = projectsClient.getProject(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the project (for example, `projects/415104041262`).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Project getProject(ProjectName name) {
+ GetProjectRequest request =
+ GetProjectRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getProject(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the project identified by the specified `name` (for example,
+ * `projects/415104041262`).
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String name = ProjectName.of("[PROJECT]").toString();
+ * Project response = projectsClient.getProject(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the project (for example, `projects/415104041262`).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Project getProject(String name) {
+ GetProjectRequest request = GetProjectRequest.newBuilder().setName(name).build();
+ return getProject(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the project identified by the specified `name` (for example,
+ * `projects/415104041262`).
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * GetProjectRequest request =
+ * GetProjectRequest.newBuilder().setName(ProjectName.of("[PROJECT]").toString()).build();
+ * Project response = projectsClient.getProject(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 Project getProject(GetProjectRequest request) {
+ return getProjectCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the project identified by the specified `name` (for example,
+ * `projects/415104041262`).
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * GetProjectRequest request =
+ * GetProjectRequest.newBuilder().setName(ProjectName.of("[PROJECT]").toString()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ResourceName parent = TagValueName.of("[TAG_VALUE]");
+ * for (Project element : projectsClient.listProjects(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource to list projects under.
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String parent = TagValueName.of("[TAG_VALUE]").toString();
+ * for (Project element : projectsClient.listProjects(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource to list projects under.
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ListProjectsRequest request =
+ * ListProjectsRequest.newBuilder()
+ * .setParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .setShowDeleted(true)
+ * .build();
+ * for (Project element : projectsClient.listProjects(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 ListProjectsPagedResponse listProjects(ListProjectsRequest request) {
+ return listProjectsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists projects that are direct children of the specified folder or organization resource.
+ * `list()` provides a strongly consistent view of the projects underneath the specified parent
+ * resource. `list()` returns projects sorted based upon the (ascending) lexical ordering of their
+ * `display_name`. The caller must have `resourcemanager.projects.list` permission on the
+ * identified parent.
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ListProjectsRequest request =
+ * ListProjectsRequest.newBuilder()
+ * .setParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .setShowDeleted(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ListProjectsRequest request =
+ * ListProjectsRequest.newBuilder()
+ * .setParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .setShowDeleted(true)
+ * .build();
+ * while (true) {
+ * ListProjectsResponse response = projectsClient.listProjectsCallable().call(request);
+ * for (Project element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String query = "query107944136";
+ * for (Project element : projectsClient.searchProjects(query).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param query Optional. A query string for searching for projects that the caller has
+ * `resourcemanager.projects.get` permission to. If multiple fields are included in the query,
+ * the it will return results that match any of the fields. Some eligible fields are:
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * SearchProjectsRequest request =
+ * SearchProjectsRequest.newBuilder()
+ * .setQuery("query107944136")
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .build();
+ * for (Project element : projectsClient.searchProjects(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 SearchProjectsPagedResponse searchProjects(SearchProjectsRequest request) {
+ return searchProjectsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Search for projects that the caller has both `resourcemanager.projects.get` permission on, and
+ * also satisfy the specified query.
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * SearchProjectsRequest request =
+ * SearchProjectsRequest.newBuilder()
+ * .setQuery("query107944136")
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * SearchProjectsRequest request =
+ * SearchProjectsRequest.newBuilder()
+ * .setQuery("query107944136")
+ * .setPageToken("pageToken873572522")
+ * .setPageSize(883849137)
+ * .build();
+ * while (true) {
+ * SearchProjectsResponse response = projectsClient.searchProjectsCallable().call(request);
+ * for (Project element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * Project project = Project.newBuilder().build();
+ * Project response = projectsClient.createProjectAsync(project).get();
+ * }
+ * }
+ *
+ * @param project Required. The Project to create.
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * CreateProjectRequest request =
+ * CreateProjectRequest.newBuilder().setProject(Project.newBuilder().build()).build();
+ * Project response = projectsClient.createProjectAsync(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 (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * CreateProjectRequest request =
+ * CreateProjectRequest.newBuilder().setProject(Project.newBuilder().build()).build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * CreateProjectRequest request =
+ * CreateProjectRequest.newBuilder().setProject(Project.newBuilder().build()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * Project project = Project.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Project response = projectsClient.updateProjectAsync(project, updateMask).get();
+ * }
+ * }
+ *
+ * @param project Required. The new definition of the project.
+ * @param updateMask Optional. An update mask to selectively update fields.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * UpdateProjectRequest request =
+ * UpdateProjectRequest.newBuilder()
+ * .setProject(Project.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Project response = projectsClient.updateProjectAsync(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 (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * UpdateProjectRequest request =
+ * UpdateProjectRequest.newBuilder()
+ * .setProject(Project.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * UpdateProjectRequest request =
+ * UpdateProjectRequest.newBuilder()
+ * .setProject(Project.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ProjectName name = ProjectName.of("[PROJECT]");
+ * ResourceName destinationParent = TagValueName.of("[TAG_VALUE]");
+ * Project response = projectsClient.moveProjectAsync(name, destinationParent).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the project to move.
+ * @param destinationParent Required. The new parent to move the Project under.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ProjectName name = ProjectName.of("[PROJECT]");
+ * String destinationParent = TagValueName.of("[TAG_VALUE]").toString();
+ * Project response = projectsClient.moveProjectAsync(name, destinationParent).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the project to move.
+ * @param destinationParent Required. The new parent to move the Project under.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String name = ProjectName.of("[PROJECT]").toString();
+ * ResourceName destinationParent = TagValueName.of("[TAG_VALUE]");
+ * Project response = projectsClient.moveProjectAsync(name, destinationParent).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the project to move.
+ * @param destinationParent Required. The new parent to move the Project under.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String name = ProjectName.of("[PROJECT]").toString();
+ * String destinationParent = TagValueName.of("[TAG_VALUE]").toString();
+ * Project response = projectsClient.moveProjectAsync(name, destinationParent).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the project to move.
+ * @param destinationParent Required. The new parent to move the Project under.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * MoveProjectRequest request =
+ * MoveProjectRequest.newBuilder()
+ * .setName(ProjectName.of("[PROJECT]").toString())
+ * .setDestinationParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .build();
+ * Project response = projectsClient.moveProjectAsync(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 (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * MoveProjectRequest request =
+ * MoveProjectRequest.newBuilder()
+ * .setName(ProjectName.of("[PROJECT]").toString())
+ * .setDestinationParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * MoveProjectRequest request =
+ * MoveProjectRequest.newBuilder()
+ * .setName(ProjectName.of("[PROJECT]").toString())
+ * .setDestinationParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ProjectName name = ProjectName.of("[PROJECT]");
+ * Project response = projectsClient.deleteProjectAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Project (for example, `projects/415104041262`).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String name = ProjectName.of("[PROJECT]").toString();
+ * Project response = projectsClient.deleteProjectAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Project (for example, `projects/415104041262`).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * DeleteProjectRequest request =
+ * DeleteProjectRequest.newBuilder().setName(ProjectName.of("[PROJECT]").toString()).build();
+ * Project response = projectsClient.deleteProjectAsync(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 (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * DeleteProjectRequest request =
+ * DeleteProjectRequest.newBuilder().setName(ProjectName.of("[PROJECT]").toString()).build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * DeleteProjectRequest request =
+ * DeleteProjectRequest.newBuilder().setName(ProjectName.of("[PROJECT]").toString()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ProjectName name = ProjectName.of("[PROJECT]");
+ * Project response = projectsClient.undeleteProjectAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the project (for example, `projects/415104041262`).
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String name = ProjectName.of("[PROJECT]").toString();
+ * Project response = projectsClient.undeleteProjectAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the project (for example, `projects/415104041262`).
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * UndeleteProjectRequest request =
+ * UndeleteProjectRequest.newBuilder()
+ * .setName(ProjectName.of("[PROJECT]").toString())
+ * .build();
+ * Project response = projectsClient.undeleteProjectAsync(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 (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * UndeleteProjectRequest request =
+ * UndeleteProjectRequest.newBuilder()
+ * .setName(ProjectName.of("[PROJECT]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * UndeleteProjectRequest request =
+ * UndeleteProjectRequest.newBuilder()
+ * .setName(ProjectName.of("[PROJECT]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ResourceName resource = TagValueName.of("[TAG_VALUE]");
+ * Policy response = projectsClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(ResourceName resource) {
+ GetIamPolicyRequest request =
+ GetIamPolicyRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the IAM access control policy for the specified project. Permission is denied if the
+ * policy or the resource do not exist.
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String resource = TagValueName.of("[TAG_VALUE]").toString();
+ * Policy response = projectsClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String resource) {
+ GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the IAM access control policy for the specified project. Permission is denied if the
+ * policy or the resource do not exist.
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = projectsClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the IAM access control policy for the specified project. Permission is denied if the
+ * policy or the resource do not exist.
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ResourceName resource = TagValueName.of("[TAG_VALUE]");
+ * Policy policy = Policy.newBuilder().build();
+ * Policy response = projectsClient.setIamPolicy(resource, policy);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being specified. See the
+ * operation documentation for the appropriate value for this field.
+ * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
+ * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
+ * Platform services (such as Projects) might reject them.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
+ SetIamPolicyRequest request =
+ SetIamPolicyRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .setPolicy(policy)
+ .build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the IAM access control policy for the specified project.
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String resource = TagValueName.of("[TAG_VALUE]").toString();
+ * Policy policy = Policy.newBuilder().build();
+ * Policy response = projectsClient.setIamPolicy(resource, policy);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being specified. See the
+ * operation documentation for the appropriate value for this field.
+ * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
+ * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
+ * Platform services (such as Projects) might reject them.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(String resource, Policy policy) {
+ SetIamPolicyRequest request =
+ SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the IAM access control policy for the specified project.
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * Policy response = projectsClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the IAM access control policy for the specified project.
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * ResourceName resource = TagValueName.of("[TAG_VALUE]");
+ * List
+ *
+ * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @param permissions The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestIamPermissionsResponse testIamPermissions(
+ ResourceName resource, List{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * String resource = TagValueName.of("[TAG_VALUE]").toString();
+ * List
+ *
+ * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @param permissions The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestIamPermissionsResponse testIamPermissions(
+ String resource, List{@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .addAllPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified project.
+ *
+ * {@code
+ * try (ProjectsClient projectsClient = ProjectsClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TagValueName.of("[TAG_VALUE]").toString())
+ * .addAllPermissions(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * ProjectsSettings.Builder projectsSettingsBuilder = ProjectsSettings.newBuilder();
+ * projectsSettingsBuilder
+ * .getProjectSettings()
+ * .setRetrySettings(
+ * projectsSettingsBuilder
+ * .getProjectSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ProjectsSettings projectsSettings = projectsSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ProjectsSettings extends ClientSettings{@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * ResourceName parent = TagValueName.of("[TAG_VALUE]");
+ * for (TagBinding element : tagBindingsClient.listTagBindings(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * TagBindingsSettings tagBindingsSettings =
+ * TagBindingsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * TagBindingsClient tagBindingsClient = TagBindingsClient.create(tagBindingsSettings);
+ * }
+ *
+ * {@code
+ * TagBindingsSettings tagBindingsSettings =
+ * TagBindingsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TagBindingsClient tagBindingsClient = TagBindingsClient.create(tagBindingsSettings);
+ * }
+ *
+ * {@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * ResourceName parent = TagValueName.of("[TAG_VALUE]");
+ * for (TagBinding element : tagBindingsClient.listTagBindings(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The full resource name of a resource for which you want to list
+ * existing TagBindings. E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTagBindingsPagedResponse listTagBindings(ResourceName parent) {
+ ListTagBindingsRequest request =
+ ListTagBindingsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listTagBindings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the TagBindings for the given cloud resource, as specified with `parent`.
+ *
+ * {@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * String parent = TagValueName.of("[TAG_VALUE]").toString();
+ * for (TagBinding element : tagBindingsClient.listTagBindings(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The full resource name of a resource for which you want to list
+ * existing TagBindings. E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTagBindingsPagedResponse listTagBindings(String parent) {
+ ListTagBindingsRequest request = ListTagBindingsRequest.newBuilder().setParent(parent).build();
+ return listTagBindings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the TagBindings for the given cloud resource, as specified with `parent`.
+ *
+ * {@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * ListTagBindingsRequest request =
+ * ListTagBindingsRequest.newBuilder()
+ * .setParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (TagBinding element : tagBindingsClient.listTagBindings(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 ListTagBindingsPagedResponse listTagBindings(ListTagBindingsRequest request) {
+ return listTagBindingsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the TagBindings for the given cloud resource, as specified with `parent`.
+ *
+ * {@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * ListTagBindingsRequest request =
+ * ListTagBindingsRequest.newBuilder()
+ * .setParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * ListTagBindingsRequest request =
+ * ListTagBindingsRequest.newBuilder()
+ * .setParent(TagValueName.of("[TAG_VALUE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListTagBindingsResponse response =
+ * tagBindingsClient.listTagBindingsCallable().call(request);
+ * for (TagBinding element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * TagBinding tagBinding = TagBinding.newBuilder().build();
+ * TagBinding response = tagBindingsClient.createTagBindingAsync(tagBinding).get();
+ * }
+ * }
+ *
+ * @param tagBinding Required. The TagBinding to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * CreateTagBindingRequest request =
+ * CreateTagBindingRequest.newBuilder()
+ * .setTagBinding(TagBinding.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * TagBinding response = tagBindingsClient.createTagBindingAsync(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 (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * CreateTagBindingRequest request =
+ * CreateTagBindingRequest.newBuilder()
+ * .setTagBinding(TagBinding.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * CreateTagBindingRequest request =
+ * CreateTagBindingRequest.newBuilder()
+ * .setTagBinding(TagBinding.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * TagBindingName name = TagBindingName.of("[TAG_BINDING]");
+ * tagBindingsClient.deleteTagBindingAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the TagBinding. This is a String of the form:
+ * `tagBindings/{id}` (e.g.
+ * `tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456`).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * String name = TagBindingName.of("[TAG_BINDING]").toString();
+ * tagBindingsClient.deleteTagBindingAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the TagBinding. This is a String of the form:
+ * `tagBindings/{id}` (e.g.
+ * `tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456`).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * DeleteTagBindingRequest request =
+ * DeleteTagBindingRequest.newBuilder()
+ * .setName(TagBindingName.of("[TAG_BINDING]").toString())
+ * .build();
+ * tagBindingsClient.deleteTagBindingAsync(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 (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * DeleteTagBindingRequest request =
+ * DeleteTagBindingRequest.newBuilder()
+ * .setName(TagBindingName.of("[TAG_BINDING]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+ * DeleteTagBindingRequest request =
+ * DeleteTagBindingRequest.newBuilder()
+ * .setName(TagBindingName.of("[TAG_BINDING]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * TagBindingsSettings.Builder tagBindingsSettingsBuilder = TagBindingsSettings.newBuilder();
+ * tagBindingsSettingsBuilder
+ * .listTagBindingsSettings()
+ * .setRetrySettings(
+ * tagBindingsSettingsBuilder
+ * .listTagBindingsSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * TagBindingsSettings tagBindingsSettings = tagBindingsSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class TagBindingsSettings extends ClientSettings