diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml
index 2c6e2f024636..29c8b963751d 100644
--- a/gapic-libraries-bom/pom.xml
+++ b/gapic-libraries-bom/pom.xml
@@ -1528,6 +1528,13 @@
pomimport
+
+ com.google.cloud
+ google-cloud-workloadidentity-bom
+ 0.1.0-SNAPSHOT
+ pom
+ import
+ com.google.cloudgoogle-cloud-workloadmanager-bom
diff --git a/java-workloadidentity/.repo-metadata.json b/java-workloadidentity/.repo-metadata.json
new file mode 100644
index 000000000000..60cd874d2cfd
--- /dev/null
+++ b/java-workloadidentity/.repo-metadata.json
@@ -0,0 +1,15 @@
+{
+ "api_shortname": "workloadidentity",
+ "name_pretty": "Workload Identity",
+ "product_documentation": "https://cloud.google.com/iam/",
+ "api_description": "",
+ "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-workloadidentity/latest/overview",
+ "release_level": "preview",
+ "transport": "grpc+rest",
+ "language": "java",
+ "repo": "googleapis/google-cloud-java",
+ "repo_short": "java-workloadidentity",
+ "distribution_name": "com.google.cloud:google-cloud-workloadidentity",
+ "api_id": "workloadidentity.googleapis.com",
+ "library_type": "GAPIC_AUTO"
+}
\ No newline at end of file
diff --git a/java-workloadidentity/README.md b/java-workloadidentity/README.md
new file mode 100644
index 000000000000..82dcc1b0d9e3
--- /dev/null
+++ b/java-workloadidentity/README.md
@@ -0,0 +1,210 @@
+# Google Workload Identity Client for Java
+
+Java idiomatic client for [Workload Identity][product-docs].
+
+[![Maven][maven-version-image]][maven-version-link]
+![Stability][stability-image]
+
+- [Product Documentation][product-docs]
+- [Client Library Documentation][javadocs]
+
+> Note: This client is a work-in-progress, and may occasionally
+> make backwards-incompatible changes.
+
+
+## Quickstart
+
+If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
+
+```xml
+
+
+
+ com.google.cloud
+ libraries-bom
+ 26.86.0
+ pom
+ import
+
+
+
+
+
+
+ com.google.cloud
+ google-cloud-workloadidentity
+
+
+```
+
+If you are using Maven without the BOM, add this to your dependencies:
+
+
+```xml
+
+ com.google.cloud
+ google-cloud-workloadidentity
+ 0.0.0
+
+```
+
+If you are using Gradle 5.x or later, add this to your dependencies:
+
+```Groovy
+implementation platform('com.google.cloud:libraries-bom:26.86.0')
+
+implementation 'com.google.cloud:google-cloud-workloadidentity'
+```
+
+If you are using Gradle without BOM, add this to your dependencies:
+
+```Groovy
+implementation 'com.google.cloud:google-cloud-workloadidentity:0.0.0'
+```
+
+If you are using SBT, add this to your dependencies:
+
+```Scala
+libraryDependencies += "com.google.cloud" % "google-cloud-workloadidentity" % "0.0.0"
+```
+
+## Authentication
+
+See the [Authentication][authentication] section in the base directory's README.
+
+## Authorization
+
+The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Workload Identity APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Workload Identity API calls.
+
+## Getting Started
+
+### Prerequisites
+
+You will need a [Google Cloud Platform Console][developer-console] project with the Workload Identity [API enabled][enable-api].
+You will need to [enable billing][enable-billing] to use Google Workload Identity.
+[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
+[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:
+`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
+
+### Installation and setup
+
+You'll need to obtain the `google-cloud-workloadidentity` library. See the [Quickstart](#quickstart) section
+to add `google-cloud-workloadidentity` as a dependency in your code.
+
+## About Workload Identity
+
+
+[Workload Identity][product-docs]
+
+See the [Workload Identity client library docs][javadocs] to learn how to
+use this Workload Identity Client Library.
+
+
+
+
+
+
+## Troubleshooting
+
+To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].
+
+## Transport
+
+Workload Identity uses both gRPC and HTTP/JSON for the transport layer.
+
+## Supported Java Versions
+
+Java 8 or above is required for using this client.
+
+Google's Java client libraries,
+[Google Cloud Client Libraries][cloudlibs]
+and
+[Google Cloud API Libraries][apilibs],
+follow the
+[Oracle Java SE support roadmap][oracle]
+(see the Oracle Java SE Product Releases section).
+
+### For new development
+
+In general, new feature development occurs with support for the lowest Java
+LTS version covered by Oracle's Premier Support (which typically lasts 5 years
+from initial General Availability). If the minimum required JVM for a given
+library is changed, it is accompanied by a [semver][semver] major release.
+
+Java 11 and (in September 2021) Java 17 are the best choices for new
+development.
+
+### Keeping production systems current
+
+Google tests its client libraries with all current LTS versions covered by
+Oracle's Extended Support (which typically lasts 8 years from initial
+General Availability).
+
+#### Legacy support
+
+Google's client libraries support legacy versions of Java runtimes with long
+term stable libraries that don't receive feature updates on a best efforts basis
+as it may not be possible to backport all patches.
+
+Google provides updates on a best efforts basis to apps that continue to use
+Java 7, though apps might need to upgrade to current versions of the library
+that supports their JVM.
+
+#### Where to find specific information
+
+The latest versions and the supported Java versions are identified on
+the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME`
+and on [google-cloud-java][g-c-j].
+
+## Versioning
+This library follows [Semantic Versioning](http://semver.org/).
+
+
+It is currently in major version zero (``0.y.z``), which means that anything may change at any time
+and the public API should not be considered stable.
+
+
+## Contributing
+
+
+Contributions to this library are always welcome and highly encouraged.
+
+See [CONTRIBUTING][contributing] for more information how to get started.
+
+Please note that this project is released with a Contributor Code of Conduct. By participating in
+this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more
+information.
+
+
+## License
+
+Apache 2.0 - See [LICENSE][license] for more information.
+
+Java is a registered trademark of Oracle and/or its affiliates.
+
+[product-docs]: https://cloud.google.com/iam/
+[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-workloadidentity/latest/overview
+[stability-image]: https://img.shields.io/badge/stability-preview-yellow
+[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-workloadidentity.svg
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-workloadidentity/0.0.0
+[authentication]: https://github.com/googleapis/google-cloud-java#authentication
+[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
+[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
+[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy
+[developer-console]: https://console.developers.google.com/
+[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
+[cloud-cli]: https://cloud.google.com/cli
+[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md
+[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
+[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
+[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
+[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
+[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=workloadidentity.googleapis.com
+[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
+[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
+
+[semver]: https://semver.org/
+[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained
+[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries
+[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html
+[g-c-j]: http://github.com/googleapis/google-cloud-java
diff --git a/java-workloadidentity/google-cloud-workloadidentity-bom/pom.xml b/java-workloadidentity/google-cloud-workloadidentity-bom/pom.xml
new file mode 100644
index 000000000000..3ee79a9d4906
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity-bom/pom.xml
@@ -0,0 +1,45 @@
+
+
+ 4.0.0
+ com.google.cloud
+ google-cloud-workloadidentity-bom
+ 0.1.0-SNAPSHOT
+ pom
+
+ com.google.cloud
+ google-cloud-pom-parent
+ 1.90.0-SNAPSHOT
+ ../../google-cloud-pom-parent/pom.xml
+
+
+ Google Workload Identity BOM
+
+ BOM for Workload Identity
+
+
+
+ true
+
+
+
+
+
+
+ com.google.cloud
+ google-cloud-workloadidentity
+ 0.1.0-SNAPSHOT
+
+
+ com.google.api.grpc
+ grpc-google-cloud-workloadidentity-v1
+ 0.1.0-SNAPSHOT
+
+
+ com.google.api.grpc
+ proto-google-cloud-workloadidentity-v1
+ 0.1.0-SNAPSHOT
+
+
+
+
+
\ No newline at end of file
diff --git a/java-workloadidentity/google-cloud-workloadidentity/pom.xml b/java-workloadidentity/google-cloud-workloadidentity/pom.xml
new file mode 100644
index 000000000000..1a95890a5813
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/pom.xml
@@ -0,0 +1,117 @@
+
+
+ 4.0.0
+ com.google.cloud
+ google-cloud-workloadidentity
+ 0.1.0-SNAPSHOT
+ jar
+ Google Workload Identity
+ Workload Identity
+
+ com.google.cloud
+ google-cloud-workloadidentity-parent
+ 0.1.0-SNAPSHOT
+
+
+ google-cloud-workloadidentity
+
+
+
+ io.grpc
+ grpc-api
+
+
+ io.grpc
+ grpc-stub
+
+
+ io.grpc
+ grpc-protobuf
+
+
+ com.google.api
+ api-common
+
+
+ com.google.protobuf
+ protobuf-java
+
+
+ com.google.api.grpc
+ proto-google-common-protos
+
+
+
+ com.google.api.grpc
+ proto-google-cloud-workloadidentity-v1
+
+
+
+ com.google.guava
+ guava
+
+
+ com.google.api
+ gax
+
+
+ com.google.api
+ gax-grpc
+
+
+ com.google.api
+ gax-httpjson
+
+
+ com.google.api.grpc
+ proto-google-iam-v1
+
+
+ org.threeten
+ threetenbp
+
+
+
+
+ com.google.api.grpc
+ grpc-google-common-protos
+ test
+
+
+ com.google.api.grpc
+ grpc-google-iam-v1
+ test
+
+
+ junit
+ junit
+ test
+
+
+
+ com.google.api.grpc
+ grpc-google-cloud-workloadidentity-v1
+ test
+
+
+
+
+ com.google.api
+ gax
+ testlib
+ test
+
+
+ com.google.api
+ gax-grpc
+ testlib
+ test
+
+
+ com.google.api
+ gax-httpjson
+ testlib
+ test
+
+
+
\ No newline at end of file
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/WorkloadIdentityClient.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/WorkloadIdentityClient.java
new file mode 100644
index 000000000000..e01e3bddf1f4
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/WorkloadIdentityClient.java
@@ -0,0 +1,732 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workloadidentity.v1;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.workloadidentity.v1.stub.WorkloadIdentityStub;
+import com.google.cloud.workloadidentity.v1.stub.WorkloadIdentityStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.longrunning.Operation;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: Service describing handlers for resources
+ *
+ *
This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = workloadIdentityClient.getLocation(request);
+ * }
+ * }
+ *
+ *
Note: close() needs to be called on the WorkloadIdentityClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ *
+ *
Methods
+ *
+ *
Method
+ *
Description
+ *
Method Variants
+ *
+ *
+ *
GenerateServiceAgents
+ *
Creates all service agents for a given resource, location and service producer.
+ *
+ *
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ *
generateServiceAgentsOperationCallable()
+ *
generateServiceAgentsCallable()
+ *
+ *
+ *
+ *
+ *
ListLocations
+ *
Lists information about the supported locations for this service.
+ *
This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
+ *
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
+ *
+ *
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ *
listLocations(ListLocationsRequest request)
+ *
+ *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ *
listLocationsPagedCallable()
+ *
listLocationsCallable()
+ *
+ *
+ *
+ *
+ *
GetLocation
+ *
Gets information about a location.
+ *
+ *
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ *
getLocation(GetLocationRequest request)
+ *
+ *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ *
getLocationCallable()
+ *
+ *
+ *
+ *
+ *
+ *
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 WorkloadIdentitySettings to
+ * create(). For example:
+ *
+ *
To customize credentials:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WorkloadIdentitySettings workloadIdentitySettings =
+ * WorkloadIdentitySettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * WorkloadIdentityClient workloadIdentityClient =
+ * WorkloadIdentityClient.create(workloadIdentitySettings);
+ * }
+ *
+ *
To customize the endpoint:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WorkloadIdentitySettings workloadIdentitySettings =
+ * WorkloadIdentitySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * WorkloadIdentityClient workloadIdentityClient =
+ * WorkloadIdentityClient.create(workloadIdentitySettings);
+ * }
+ *
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WorkloadIdentitySettings workloadIdentitySettings =
+ * WorkloadIdentitySettings.newHttpJsonBuilder().build();
+ * WorkloadIdentityClient workloadIdentityClient =
+ * WorkloadIdentityClient.create(workloadIdentitySettings);
+ * }
+ *
+ *
Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class WorkloadIdentityClient implements BackgroundResource {
+ private final @Nullable WorkloadIdentitySettings settings;
+ private final WorkloadIdentityStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of WorkloadIdentityClient with default settings. */
+ public static final WorkloadIdentityClient create() throws IOException {
+ return create(WorkloadIdentitySettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of WorkloadIdentityClient, 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 WorkloadIdentityClient create(WorkloadIdentitySettings settings)
+ throws IOException {
+ return new WorkloadIdentityClient(settings);
+ }
+
+ /**
+ * Constructs an instance of WorkloadIdentityClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(WorkloadIdentitySettings).
+ */
+ public static final WorkloadIdentityClient create(WorkloadIdentityStub stub) {
+ return new WorkloadIdentityClient(stub);
+ }
+
+ /**
+ * Constructs an instance of WorkloadIdentityClient, 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 WorkloadIdentityClient(WorkloadIdentitySettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((WorkloadIdentityStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected WorkloadIdentityClient(WorkloadIdentityStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ public final @Nullable WorkloadIdentitySettings getSettings() {
+ return settings;
+ }
+
+ public WorkloadIdentityStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates all service agents for a given resource, location and service producer.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * ServiceProducerName parent =
+ * ServiceProducerName.ofProjectLocationServiceProducerName(
+ * "[PROJECT]", "[LOCATION]", "[SERVICE_PRODUCER]");
+ * GenerateServiceAgentsResponse response =
+ * workloadIdentityClient.generateServiceAgentsAsync(parent).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource. The `location` for the parent resource must be
+ * `global`.
+ *
Examples:
+ *
- projects/1234/locations/global/serviceProducers/bigquery.googleapis.com -
+ * folders/2344/locations/global/serviceProducers/vertexai.googleapis.com -
+ * organizations/3344/locations/global/serviceProducers/iam.googleapis.com
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ generateServiceAgentsAsync(@Nullable ServiceProducerName parent) {
+ GenerateServiceAgentsRequest request =
+ GenerateServiceAgentsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return generateServiceAgentsAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates all service agents for a given resource, location and service producer.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * String parent =
+ * ServiceProducerName.ofProjectLocationServiceProducerName(
+ * "[PROJECT]", "[LOCATION]", "[SERVICE_PRODUCER]")
+ * .toString();
+ * GenerateServiceAgentsResponse response =
+ * workloadIdentityClient.generateServiceAgentsAsync(parent).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource. The `location` for the parent resource must be
+ * `global`.
+ *
Examples:
+ *
- projects/1234/locations/global/serviceProducers/bigquery.googleapis.com -
+ * folders/2344/locations/global/serviceProducers/vertexai.googleapis.com -
+ * organizations/3344/locations/global/serviceProducers/iam.googleapis.com
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ generateServiceAgentsAsync(String parent) {
+ GenerateServiceAgentsRequest request =
+ GenerateServiceAgentsRequest.newBuilder().setParent(parent).build();
+ return generateServiceAgentsAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates all service agents for a given resource, location and service producer.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * GenerateServiceAgentsRequest request =
+ * GenerateServiceAgentsRequest.newBuilder()
+ * .setParent(
+ * ServiceProducerName.ofProjectLocationServiceProducerName(
+ * "[PROJECT]", "[LOCATION]", "[SERVICE_PRODUCER]")
+ * .toString())
+ * .build();
+ * GenerateServiceAgentsResponse response =
+ * workloadIdentityClient.generateServiceAgentsAsync(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
+ generateServiceAgentsAsync(GenerateServiceAgentsRequest request) {
+ return generateServiceAgentsOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates all service agents for a given resource, location and service producer.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * GenerateServiceAgentsRequest request =
+ * GenerateServiceAgentsRequest.newBuilder()
+ * .setParent(
+ * ServiceProducerName.ofProjectLocationServiceProducerName(
+ * "[PROJECT]", "[LOCATION]", "[SERVICE_PRODUCER]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * workloadIdentityClient.generateServiceAgentsOperationCallable().futureCall(request);
+ * // Do something.
+ * GenerateServiceAgentsResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationCallable() {
+ return stub.generateServiceAgentsOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates all service agents for a given resource, location and service producer.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * GenerateServiceAgentsRequest request =
+ * GenerateServiceAgentsRequest.newBuilder()
+ * .setParent(
+ * ServiceProducerName.ofProjectLocationServiceProducerName(
+ * "[PROJECT]", "[LOCATION]", "[SERVICE_PRODUCER]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * workloadIdentityClient.generateServiceAgentsCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ generateServiceAgentsCallable() {
+ return stub.generateServiceAgentsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
This method lists locations based on the resource scope provided inthe
+ * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field:
+ * ***Global locations**: If `name` is empty, the method lists thepublic
+ * locations available to all projects. * **Project-specificlocations**: If
+ * `name` follows the format`projects/{project}`, the method lists locations visible to
+ * thatspecific project. This includes public, private, or otherproject-specific locations enabled
+ * for the project.
+ *
+ *
For gRPC and client library implementations, the resource name ispassed as the `name` field.
+ * For direct service calls, the resourcename isincorporated into the request path based on the
+ * specific serviceimplementation and version.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : workloadIdentityClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
This method lists locations based on the resource scope provided inthe
+ * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field:
+ * ***Global locations**: If `name` is empty, the method lists thepublic
+ * locations available to all projects. * **Project-specificlocations**: If
+ * `name` follows the format`projects/{project}`, the method lists locations visible to
+ * thatspecific project. This includes public, private, or otherproject-specific locations enabled
+ * for the project.
+ *
+ *
For gRPC and client library implementations, the resource name ispassed as the `name` field.
+ * For direct service calls, the resourcename isincorporated into the request path based on the
+ * specific serviceimplementation and version.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * workloadIdentityClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
This method lists locations based on the resource scope provided inthe
+ * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field:
+ * ***Global locations**: If `name` is empty, the method lists thepublic
+ * locations available to all projects. * **Project-specificlocations**: If
+ * `name` follows the format`projects/{project}`, the method lists locations visible to
+ * thatspecific project. This includes public, private, or otherproject-specific locations enabled
+ * for the project.
+ *
+ *
For gRPC and client library implementations, the resource name ispassed as the `name` field.
+ * For direct service calls, the resourcename isincorporated into the request path based on the
+ * specific serviceimplementation and version.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * workloadIdentityClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = workloadIdentityClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = workloadIdentityClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListLocationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListLocationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListLocationsPagedResponse(ListLocationsPage page) {
+ super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListLocationsPage
+ extends AbstractPage<
+ ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
+
+ private ListLocationsPage(
+ @Nullable PageContext context,
+ @Nullable ListLocationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListLocationsPage createEmptyPage() {
+ return new ListLocationsPage(null, null);
+ }
+
+ @Override
+ protected ListLocationsPage createPage(
+ @Nullable PageContext context,
+ @Nullable ListLocationsResponse response) {
+ return new ListLocationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ @Nullable PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListLocationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ private ListLocationsFixedSizeCollection(
+ @Nullable List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListLocationsFixedSizeCollection createEmptyCollection() {
+ return new ListLocationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListLocationsFixedSizeCollection createCollection(
+ @Nullable List pages, int collectionSize) {
+ return new ListLocationsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+}
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/WorkloadIdentitySettings.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/WorkloadIdentitySettings.java
new file mode 100644
index 000000000000..6b2f18cd72e9
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/WorkloadIdentitySettings.java
@@ -0,0 +1,294 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workloadidentity.v1;
+
+import static com.google.cloud.workloadidentity.v1.WorkloadIdentityClient.ListLocationsPagedResponse;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientSettings;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.workloadidentity.v1.stub.WorkloadIdentityStubSettings;
+import com.google.longrunning.Operation;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link WorkloadIdentityClient}.
+ *
+ *
The default instance has everything set to sensible defaults:
+ *
+ *
+ *
The default service address (workloadidentity.googleapis.com) and default port (443) are
+ * used.
+ *
Credentials are acquired automatically through Application Default Credentials.
+ *
Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ *
The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ *
For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getLocation:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WorkloadIdentitySettings.Builder workloadIdentitySettingsBuilder =
+ * WorkloadIdentitySettings.newBuilder();
+ * workloadIdentitySettingsBuilder
+ * .getLocationSettings()
+ * .setRetrySettings(
+ * workloadIdentitySettingsBuilder
+ * .getLocationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * WorkloadIdentitySettings workloadIdentitySettings = workloadIdentitySettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ *
To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for generateServiceAgents:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WorkloadIdentitySettings.Builder workloadIdentitySettingsBuilder =
+ * WorkloadIdentitySettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * workloadIdentitySettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class WorkloadIdentitySettings extends ClientSettings {
+
+ /** Returns the object with the settings used for calls to generateServiceAgents. */
+ public UnaryCallSettings
+ generateServiceAgentsSettings() {
+ return ((WorkloadIdentityStubSettings) getStubSettings()).generateServiceAgentsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to generateServiceAgents. */
+ public OperationCallSettings<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationSettings() {
+ return ((WorkloadIdentityStubSettings) getStubSettings())
+ .generateServiceAgentsOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return ((WorkloadIdentityStubSettings) getStubSettings()).listLocationsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return ((WorkloadIdentityStubSettings) getStubSettings()).getLocationSettings();
+ }
+
+ public static final WorkloadIdentitySettings create(WorkloadIdentityStubSettings stub)
+ throws IOException {
+ return new WorkloadIdentitySettings.Builder(stub.toBuilder()).build();
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return WorkloadIdentityStubSettings.defaultExecutorProviderBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return WorkloadIdentityStubSettings.getDefaultEndpoint();
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return WorkloadIdentityStubSettings.getDefaultServiceScopes();
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return WorkloadIdentityStubSettings.defaultCredentialsProviderBuilder();
+ }
+
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return WorkloadIdentityStubSettings.defaultGrpcTransportProviderBuilder();
+ }
+
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return WorkloadIdentityStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return WorkloadIdentityStubSettings.defaultTransportChannelProvider();
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return WorkloadIdentityStubSettings.defaultApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(@Nullable ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected WorkloadIdentitySettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+ }
+
+ /** Builder for WorkloadIdentitySettings. */
+ public static class Builder extends ClientSettings.Builder {
+
+ protected Builder() throws IOException {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(@Nullable ClientContext clientContext) {
+ super(WorkloadIdentityStubSettings.newBuilder(clientContext));
+ }
+
+ protected Builder(WorkloadIdentitySettings settings) {
+ super(settings.getStubSettings().toBuilder());
+ }
+
+ protected Builder(WorkloadIdentityStubSettings.Builder stubSettings) {
+ super(stubSettings);
+ }
+
+ private static Builder createDefault() {
+ return new Builder(WorkloadIdentityStubSettings.newBuilder());
+ }
+
+ private static Builder createHttpJsonDefault() {
+ return new Builder(WorkloadIdentityStubSettings.newHttpJsonBuilder());
+ }
+
+ public WorkloadIdentityStubSettings.Builder getStubSettingsBuilder() {
+ return ((WorkloadIdentityStubSettings.Builder) getStubSettings());
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ *
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(
+ getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
+ return this;
+ }
+
+ /** Returns the builder for the settings used for calls to generateServiceAgents. */
+ public UnaryCallSettings.Builder
+ generateServiceAgentsSettings() {
+ return getStubSettingsBuilder().generateServiceAgentsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to generateServiceAgents. */
+ public OperationCallSettings.Builder<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationSettings() {
+ return getStubSettingsBuilder().generateServiceAgentsOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return getStubSettingsBuilder().listLocationsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getStubSettingsBuilder().getLocationSettings();
+ }
+
+ @Override
+ public WorkloadIdentitySettings build() throws IOException {
+ return new WorkloadIdentitySettings(this);
+ }
+ }
+}
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/gapic_metadata.json b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/gapic_metadata.json
new file mode 100644
index 000000000000..c4d40b324a33
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/gapic_metadata.json
@@ -0,0 +1,27 @@
+{
+ "schema": "1.0",
+ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
+ "language": "java",
+ "protoPackage": "google.cloud.workloadidentity.v1",
+ "libraryPackage": "com.google.cloud.workloadidentity.v1",
+ "services": {
+ "WorkloadIdentity": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "WorkloadIdentityClient",
+ "rpcs": {
+ "GenerateServiceAgents": {
+ "methods": ["generateServiceAgentsAsync", "generateServiceAgentsAsync", "generateServiceAgentsAsync", "generateServiceAgentsOperationCallable", "generateServiceAgentsCallable"]
+ },
+ "GetLocation": {
+ "methods": ["getLocation", "getLocationCallable"]
+ },
+ "ListLocations": {
+ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/package-info.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/package-info.java
new file mode 100644
index 000000000000..a0f74e32be1a
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/package-info.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * A client to Workload Identity API
+ *
+ *
The interfaces provided are listed below, along with usage samples.
+ *
+ *
Service Description: Service describing handlers for resources
+ *
+ *
Sample for WorkloadIdentityClient:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WorkloadIdentityClient workloadIdentityClient = WorkloadIdentityClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = workloadIdentityClient.getLocation(request);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.workloadidentity.v1;
+
+import javax.annotation.Generated;
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/GrpcWorkloadIdentityCallableFactory.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/GrpcWorkloadIdentityCallableFactory.java
new file mode 100644
index 000000000000..0f6f2ce8f16f
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/GrpcWorkloadIdentityCallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workloadidentity.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the WorkloadIdentity service API.
+ *
+ *
This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcWorkloadIdentityCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ GrpcCallSettings grpcCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ GrpcCallSettings grpcCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ GrpcCallSettings grpcCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBatchingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ GrpcCallSettings grpcCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ return GrpcCallableFactory.createOperationCallable(
+ grpcCallSettings, callSettings, clientContext, operationsStub);
+ }
+
+ @Override
+ public
+ BidiStreamingCallable createBidiStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBidiStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createServerStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ClientStreamingCallable createClientStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createClientStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/GrpcWorkloadIdentityStub.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/GrpcWorkloadIdentityStub.java
new file mode 100644
index 000000000000..63a557e087a1
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/GrpcWorkloadIdentityStub.java
@@ -0,0 +1,266 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workloadidentity.v1.stub;
+
+import static com.google.cloud.workloadidentity.v1.WorkloadIdentityClient.ListLocationsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.RequestParamsBuilder;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.workloadidentity.v1.GenerateServiceAgentsRequest;
+import com.google.cloud.workloadidentity.v1.GenerateServiceAgentsResponse;
+import com.google.cloud.workloadidentity.v1.OperationMetadata;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.GrpcOperationsStub;
+import io.grpc.MethodDescriptor;
+import io.grpc.protobuf.ProtoUtils;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC stub implementation for the WorkloadIdentity service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcWorkloadIdentityStub extends WorkloadIdentityStub {
+ private static final MethodDescriptor
+ generateServiceAgentsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.workloadidentity.v1.WorkloadIdentity/GenerateServiceAgents")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GenerateServiceAgentsRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ listLocationsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/ListLocations")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor getLocationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/GetLocation")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private final UnaryCallable
+ generateServiceAgentsCallable;
+ private final OperationCallable<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationCallable;
+ private final UnaryCallable listLocationsCallable;
+ private final UnaryCallable
+ listLocationsPagedCallable;
+ private final UnaryCallable getLocationCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final GrpcOperationsStub operationsStub;
+ private final GrpcStubCallableFactory callableFactory;
+
+ public static final GrpcWorkloadIdentityStub create(WorkloadIdentityStubSettings settings)
+ throws IOException {
+ return new GrpcWorkloadIdentityStub(settings, ClientContext.create(settings));
+ }
+
+ public static final GrpcWorkloadIdentityStub create(ClientContext clientContext)
+ throws IOException {
+ return new GrpcWorkloadIdentityStub(
+ WorkloadIdentityStubSettings.newBuilder().build(), clientContext);
+ }
+
+ public static final GrpcWorkloadIdentityStub create(
+ ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
+ return new GrpcWorkloadIdentityStub(
+ WorkloadIdentityStubSettings.newBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of GrpcWorkloadIdentityStub, 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 GrpcWorkloadIdentityStub(
+ WorkloadIdentityStubSettings settings, ClientContext clientContext) throws IOException {
+ this(settings, clientContext, new GrpcWorkloadIdentityCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of GrpcWorkloadIdentityStub, 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 GrpcWorkloadIdentityStub(
+ WorkloadIdentityStubSettings settings,
+ ClientContext clientContext,
+ GrpcStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+
+ GrpcCallSettings
+ generateServiceAgentsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(generateServiceAgentsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getParent())
+ .build();
+ GrpcCallSettings listLocationsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listLocationsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getLocationTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getLocationMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+
+ this.generateServiceAgentsCallable =
+ callableFactory.createUnaryCallable(
+ generateServiceAgentsTransportSettings,
+ settings.generateServiceAgentsSettings(),
+ clientContext);
+ this.generateServiceAgentsOperationCallable =
+ callableFactory.createOperationCallable(
+ generateServiceAgentsTransportSettings,
+ settings.generateServiceAgentsOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.listLocationsCallable =
+ callableFactory.createUnaryCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.listLocationsPagedCallable =
+ callableFactory.createPagedCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.getLocationCallable =
+ callableFactory.createUnaryCallable(
+ getLocationTransportSettings, settings.getLocationSettings(), clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ public GrpcOperationsStub getOperationsStub() {
+ return operationsStub;
+ }
+
+ @Override
+ public UnaryCallable generateServiceAgentsCallable() {
+ return generateServiceAgentsCallable;
+ }
+
+ @Override
+ public OperationCallable<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationCallable() {
+ return generateServiceAgentsOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable listLocationsCallable() {
+ return listLocationsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ return listLocationsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getLocationCallable() {
+ return getLocationCallable;
+ }
+
+ @Override
+ public final void close() {
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
+ }
+
+ @Override
+ public void shutdown() {
+ backgroundResources.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return backgroundResources.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return backgroundResources.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ backgroundResources.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return backgroundResources.awaitTermination(duration, unit);
+ }
+}
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/HttpJsonWorkloadIdentityCallableFactory.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/HttpJsonWorkloadIdentityCallableFactory.java
new file mode 100644
index 000000000000..26b9faa22645
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/HttpJsonWorkloadIdentityCallableFactory.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workloadidentity.v1.stub;
+
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonCallableFactory;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST callable factory implementation for the WorkloadIdentity service API.
+ *
+ *
This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonWorkloadIdentityCallableFactory
+ implements HttpJsonStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createUnaryCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createPagedCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createBatchingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ UnaryCallable innerCallable =
+ HttpJsonCallableFactory.createBaseUnaryCallable(
+ httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
+ HttpJsonOperationSnapshotCallable initialCallable =
+ new HttpJsonOperationSnapshotCallable(
+ innerCallable,
+ httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
+ return HttpJsonCallableFactory.createOperationCallable(
+ callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createServerStreamingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/HttpJsonWorkloadIdentityStub.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/HttpJsonWorkloadIdentityStub.java
new file mode 100644
index 000000000000..6ef63a842a7e
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/HttpJsonWorkloadIdentityStub.java
@@ -0,0 +1,439 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workloadidentity.v1.stub;
+
+import static com.google.cloud.workloadidentity.v1.WorkloadIdentityClient.ListLocationsPagedResponse;
+
+import com.google.api.HttpRule;
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshot;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.RequestParamsBuilder;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.workloadidentity.v1.GenerateServiceAgentsRequest;
+import com.google.cloud.workloadidentity.v1.GenerateServiceAgentsResponse;
+import com.google.cloud.workloadidentity.v1.OperationMetadata;
+import com.google.common.collect.ImmutableMap;
+import com.google.longrunning.Operation;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the WorkloadIdentity service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonWorkloadIdentityStub extends WorkloadIdentityStub {
+ private static final TypeRegistry typeRegistry =
+ TypeRegistry.newBuilder()
+ .add(GenerateServiceAgentsResponse.getDescriptor())
+ .add(OperationMetadata.getDescriptor())
+ .build();
+
+ private static final ApiMethodDescriptor
+ generateServiceAgentsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.workloadidentity.v1.WorkloadIdentity/GenerateServiceAgents")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/serviceProducers/*}:generateServiceAgents",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{parent=folders/*/locations/*/serviceProducers/*}:generateServiceAgents",
+ "/v1/{parent=organizations/*/locations/*/serviceProducers/*}:generateServiceAgents")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("*", request.toBuilder().clearParent().build(), true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (GenerateServiceAgentsRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor
+ listLocationsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.location.Locations/ListLocations")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*}/locations",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{name=folders/*}/locations", "/v1/{name=organizations/*}/locations")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListLocationsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getLocationMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.location.Locations/GetLocation")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{name=folders/*/locations/*}",
+ "/v1/{name=organizations/*/locations/*}")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Location.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private final UnaryCallable
+ generateServiceAgentsCallable;
+ private final OperationCallable<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationCallable;
+ private final UnaryCallable listLocationsCallable;
+ private final UnaryCallable
+ listLocationsPagedCallable;
+ private final UnaryCallable getLocationCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final HttpJsonOperationsStub httpJsonOperationsStub;
+ private final HttpJsonStubCallableFactory callableFactory;
+
+ public static final HttpJsonWorkloadIdentityStub create(WorkloadIdentityStubSettings settings)
+ throws IOException {
+ return new HttpJsonWorkloadIdentityStub(settings, ClientContext.create(settings));
+ }
+
+ public static final HttpJsonWorkloadIdentityStub create(ClientContext clientContext)
+ throws IOException {
+ return new HttpJsonWorkloadIdentityStub(
+ WorkloadIdentityStubSettings.newHttpJsonBuilder().build(), clientContext);
+ }
+
+ public static final HttpJsonWorkloadIdentityStub create(
+ ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException {
+ return new HttpJsonWorkloadIdentityStub(
+ WorkloadIdentityStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of HttpJsonWorkloadIdentityStub, 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 HttpJsonWorkloadIdentityStub(
+ WorkloadIdentityStubSettings settings, ClientContext clientContext) throws IOException {
+ this(settings, clientContext, new HttpJsonWorkloadIdentityCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of HttpJsonWorkloadIdentityStub, 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 HttpJsonWorkloadIdentityStub(
+ WorkloadIdentityStubSettings settings,
+ ClientContext clientContext,
+ HttpJsonStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.httpJsonOperationsStub =
+ HttpJsonOperationsStub.create(
+ clientContext,
+ callableFactory,
+ typeRegistry,
+ ImmutableMap.builder()
+ .put(
+ "google.longrunning.Operations.CancelOperation",
+ HttpRule.newBuilder()
+ .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel")
+ .addAdditionalBindings(
+ HttpRule.newBuilder()
+ .setPost("/v1/{name=folders/*/locations/*/operations/*}:cancel")
+ .build())
+ .addAdditionalBindings(
+ HttpRule.newBuilder()
+ .setPost(
+ "/v1/{name=organizations/*/locations/*/operations/*}:cancel")
+ .build())
+ .build())
+ .put(
+ "google.longrunning.Operations.DeleteOperation",
+ HttpRule.newBuilder()
+ .setDelete("/v1/{name=projects/*/locations/*/operations/*}")
+ .addAdditionalBindings(
+ HttpRule.newBuilder()
+ .setDelete("/v1/{name=folders/*/locations/*/operations/*}")
+ .build())
+ .addAdditionalBindings(
+ HttpRule.newBuilder()
+ .setDelete("/v1/{name=organizations/*/locations/*/operations/*}")
+ .build())
+ .build())
+ .put(
+ "google.longrunning.Operations.GetOperation",
+ HttpRule.newBuilder()
+ .setGet("/v1/{name=projects/*/locations/*/operations/*}")
+ .addAdditionalBindings(
+ HttpRule.newBuilder()
+ .setGet("/v1/{name=folders/*/locations/*/operations/*}")
+ .build())
+ .addAdditionalBindings(
+ HttpRule.newBuilder()
+ .setGet("/v1/{name=organizations/*/locations/*/operations/*}")
+ .build())
+ .build())
+ .put(
+ "google.longrunning.Operations.ListOperations",
+ HttpRule.newBuilder()
+ .setGet("/v1/{name=projects/*/locations/*}/operations")
+ .addAdditionalBindings(
+ HttpRule.newBuilder()
+ .setGet("/v1/{name=folders/*/locations/*}/operations")
+ .build())
+ .addAdditionalBindings(
+ HttpRule.newBuilder()
+ .setGet("/v1/{name=organizations/*/locations/*}/operations")
+ .build())
+ .build())
+ .build());
+
+ HttpJsonCallSettings
+ generateServiceAgentsTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(generateServiceAgentsMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getParent())
+ .build();
+ HttpJsonCallSettings
+ listLocationsTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(listLocationsMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ HttpJsonCallSettings getLocationTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(getLocationMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+
+ this.generateServiceAgentsCallable =
+ callableFactory.createUnaryCallable(
+ generateServiceAgentsTransportSettings,
+ settings.generateServiceAgentsSettings(),
+ clientContext);
+ this.generateServiceAgentsOperationCallable =
+ callableFactory.createOperationCallable(
+ generateServiceAgentsTransportSettings,
+ settings.generateServiceAgentsOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+ this.listLocationsCallable =
+ callableFactory.createUnaryCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.listLocationsPagedCallable =
+ callableFactory.createPagedCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.getLocationCallable =
+ callableFactory.createUnaryCallable(
+ getLocationTransportSettings, settings.getLocationSettings(), clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ @InternalApi
+ public static List getMethodDescriptors() {
+ List methodDescriptors = new ArrayList<>();
+ methodDescriptors.add(generateServiceAgentsMethodDescriptor);
+ methodDescriptors.add(listLocationsMethodDescriptor);
+ methodDescriptors.add(getLocationMethodDescriptor);
+ return methodDescriptors;
+ }
+
+ public HttpJsonOperationsStub getHttpJsonOperationsStub() {
+ return httpJsonOperationsStub;
+ }
+
+ @Override
+ public UnaryCallable generateServiceAgentsCallable() {
+ return generateServiceAgentsCallable;
+ }
+
+ @Override
+ public OperationCallable<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationCallable() {
+ return generateServiceAgentsOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable listLocationsCallable() {
+ return listLocationsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ return listLocationsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getLocationCallable() {
+ return getLocationCallable;
+ }
+
+ @Override
+ public final void close() {
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
+ }
+
+ @Override
+ public void shutdown() {
+ backgroundResources.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return backgroundResources.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return backgroundResources.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ backgroundResources.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return backgroundResources.awaitTermination(duration, unit);
+ }
+}
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/Version.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/Version.java
new file mode 100644
index 000000000000..ae275ebfb9ef
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/Version.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workloadidentity.v1.stub;
+
+import com.google.api.core.InternalApi;
+
+@InternalApi("For internal use only")
+final class Version {
+ // {x-version-update-start:google-cloud-workloadidentity:current}
+ static final String VERSION = "0.0.0-SNAPSHOT";
+ // {x-version-update-end}
+
+}
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/WorkloadIdentityStub.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/WorkloadIdentityStub.java
new file mode 100644
index 000000000000..7e6128189e85
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/WorkloadIdentityStub.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workloadidentity.v1.stub;
+
+import static com.google.cloud.workloadidentity.v1.WorkloadIdentityClient.ListLocationsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.workloadidentity.v1.GenerateServiceAgentsRequest;
+import com.google.cloud.workloadidentity.v1.GenerateServiceAgentsResponse;
+import com.google.cloud.workloadidentity.v1.OperationMetadata;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the WorkloadIdentity service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public abstract class WorkloadIdentityStub implements BackgroundResource {
+
+ public @Nullable OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.@Nullable OperationsStub
+ getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public OperationCallable<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: generateServiceAgentsOperationCallable()");
+ }
+
+ public UnaryCallable generateServiceAgentsCallable() {
+ throw new UnsupportedOperationException("Not implemented: generateServiceAgentsCallable()");
+ }
+
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
+ }
+
+ public UnaryCallable listLocationsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
+ }
+
+ public UnaryCallable getLocationCallable() {
+ throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
+ }
+
+ @Override
+ public abstract void close();
+}
diff --git a/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/WorkloadIdentityStubSettings.java b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/WorkloadIdentityStubSettings.java
new file mode 100644
index 000000000000..a38dedd64dc6
--- /dev/null
+++ b/java-workloadidentity/google-cloud-workloadidentity/src/main/java/com/google/cloud/workloadidentity/v1/stub/WorkloadIdentityStubSettings.java
@@ -0,0 +1,559 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workloadidentity.v1.stub;
+
+import static com.google.cloud.workloadidentity.v1.WorkloadIdentityClient.ListLocationsPagedResponse;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.ApiFuture;
+import com.google.api.core.BetaApi;
+import com.google.api.core.ObsoleteApi;
+import com.google.api.gax.core.GaxProperties;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.GaxGrpcProperties;
+import com.google.api.gax.grpc.GrpcTransportChannel;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.grpc.ProtoOperationTransformers;
+import com.google.api.gax.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
+import com.google.api.gax.longrunning.OperationSnapshot;
+import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
+import com.google.api.gax.retrying.RetrySettings;
+import com.google.api.gax.rpc.ApiCallContext;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.LibraryMetadata;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.PagedListDescriptor;
+import com.google.api.gax.rpc.PagedListResponseFactory;
+import com.google.api.gax.rpc.StatusCode;
+import com.google.api.gax.rpc.StubSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.workloadidentity.v1.GenerateServiceAgentsRequest;
+import com.google.cloud.workloadidentity.v1.GenerateServiceAgentsResponse;
+import com.google.cloud.workloadidentity.v1.OperationMetadata;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import com.google.longrunning.Operation;
+import java.io.IOException;
+import java.time.Duration;
+import java.util.List;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link WorkloadIdentityStub}.
+ *
+ *
The default instance has everything set to sensible defaults:
+ *
+ *
+ *
The default service address (workloadidentity.googleapis.com) and default port (443) are
+ * used.
+ *
Credentials are acquired automatically through Application Default Credentials.
+ *
Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ *
The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ *
For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getLocation:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WorkloadIdentityStubSettings.Builder workloadIdentitySettingsBuilder =
+ * WorkloadIdentityStubSettings.newBuilder();
+ * workloadIdentitySettingsBuilder
+ * .getLocationSettings()
+ * .setRetrySettings(
+ * workloadIdentitySettingsBuilder
+ * .getLocationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * WorkloadIdentityStubSettings workloadIdentitySettings = workloadIdentitySettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ *
To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for generateServiceAgents:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WorkloadIdentityStubSettings.Builder workloadIdentitySettingsBuilder =
+ * WorkloadIdentityStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * workloadIdentitySettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+@SuppressWarnings("CanonicalDuration")
+public class WorkloadIdentityStubSettings extends StubSettings {
+ /** The default scopes of the service. */
+ private static final ImmutableList DEFAULT_SERVICE_SCOPES =
+ ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
+
+ private final UnaryCallSettings
+ generateServiceAgentsSettings;
+ private final OperationCallSettings<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationSettings;
+ private final PagedCallSettings<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings getLocationSettings;
+
+ private static final PagedListDescriptor
+ LIST_LOCATIONS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) {
+ return ListLocationsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) {
+ return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListLocationsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListLocationsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListLocationsResponse payload) {
+ return payload.getLocationsList();
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ LIST_LOCATIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListLocationsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context);
+ return ListLocationsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ /** Returns the object with the settings used for calls to generateServiceAgents. */
+ public UnaryCallSettings
+ generateServiceAgentsSettings() {
+ return generateServiceAgentsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to generateServiceAgents. */
+ public OperationCallSettings<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationSettings() {
+ return generateServiceAgentsOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return getLocationSettings;
+ }
+
+ public WorkloadIdentityStub createStub() throws IOException {
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(GrpcTransportChannel.getGrpcTransportName())) {
+ return GrpcWorkloadIdentityStub.create(this);
+ }
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonWorkloadIdentityStub.create(this);
+ }
+ throw new UnsupportedOperationException(
+ String.format(
+ "Transport not supported: %s", getTransportChannelProvider().getTransportName()));
+ }
+
+ /** Returns the default service name. */
+ @Override
+ public String getServiceName() {
+ return "workloadidentity";
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return InstantiatingExecutorProvider.newBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ @ObsoleteApi("Use getEndpoint() instead")
+ public static String getDefaultEndpoint() {
+ return "workloadidentity.googleapis.com:443";
+ }
+
+ /** Returns the default mTLS service endpoint. */
+ public static String getDefaultMtlsEndpoint() {
+ return "workloadidentity.mtls.googleapis.com:443";
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return DEFAULT_SERVICE_SCOPES;
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return GoogleCredentialsProvider.newBuilder()
+ .setScopesToApply(DEFAULT_SERVICE_SCOPES)
+ .setUseJwtAccessWithScope(true);
+ }
+
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return InstantiatingGrpcChannelProvider.newBuilder()
+ .setMaxInboundMessageSize(Integer.MAX_VALUE);
+ }
+
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return defaultGrpcTransportProviderBuilder().build();
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(WorkloadIdentityStubSettings.class))
+ .setTransportToken(
+ GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(WorkloadIdentityStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return WorkloadIdentityStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(@Nullable ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected WorkloadIdentityStubSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+
+ generateServiceAgentsSettings = settingsBuilder.generateServiceAgentsSettings().build();
+ generateServiceAgentsOperationSettings =
+ settingsBuilder.generateServiceAgentsOperationSettings().build();
+ listLocationsSettings = settingsBuilder.listLocationsSettings().build();
+ getLocationSettings = settingsBuilder.getLocationSettings().build();
+ }
+
+ @Override
+ protected LibraryMetadata getLibraryMetadata() {
+ return LibraryMetadata.newBuilder()
+ .setArtifactName("com.google.cloud:google-cloud-workloadidentity")
+ .setRepository("googleapis/google-cloud-java")
+ .setVersion(Version.VERSION)
+ .build();
+ }
+
+ /** Builder for WorkloadIdentityStubSettings. */
+ public static class Builder extends StubSettings.Builder {
+ private final ImmutableList> unaryMethodSettingsBuilders;
+ private final UnaryCallSettings.Builder
+ generateServiceAgentsSettings;
+ private final OperationCallSettings.Builder<
+ GenerateServiceAgentsRequest, GenerateServiceAgentsResponse, OperationMetadata>
+ generateServiceAgentsOperationSettings;
+ private final PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings.Builder getLocationSettings;
+ private static final ImmutableMap>
+ RETRYABLE_CODE_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder> definitions =
+ ImmutableMap.builder();
+ definitions.put(
+ "retry_policy_0_codes",
+ ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ RETRYABLE_CODE_DEFINITIONS = definitions.build();
+ }
+
+ private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder definitions = ImmutableMap.builder();
+ RetrySettings settings = null;
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelayDuration(Duration.ofMillis(1000L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelayDuration(Duration.ofMillis(10000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(60000L))
+ .build();
+ definitions.put("retry_policy_0_params", settings);
+ settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
+ definitions.put("no_retry_params", settings);
+ RETRY_PARAM_DEFINITIONS = definitions.build();
+ }
+
+ protected Builder() {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(@Nullable ClientContext clientContext) {
+ super(clientContext);
+
+ generateServiceAgentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ generateServiceAgentsOperationSettings = OperationCallSettings.newBuilder();
+ listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
+ getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ generateServiceAgentsSettings, listLocationsSettings, getLocationSettings);
+ initDefaults(this);
+ }
+
+ protected Builder(WorkloadIdentityStubSettings settings) {
+ super(settings);
+
+ generateServiceAgentsSettings = settings.generateServiceAgentsSettings.toBuilder();
+ generateServiceAgentsOperationSettings =
+ settings.generateServiceAgentsOperationSettings.toBuilder();
+ listLocationsSettings = settings.listLocationsSettings.toBuilder();
+ getLocationSettings = settings.getLocationSettings.toBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ generateServiceAgentsSettings, listLocationsSettings, getLocationSettings);
+ }
+
+ private static Builder createDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultTransportChannelProvider());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
+ private static Builder initDefaults(Builder builder) {
+ builder
+ .generateServiceAgentsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .listLocationsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getLocationSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .generateServiceAgentsOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(
+ GenerateServiceAgentsResponse.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelayDuration(Duration.ofMillis(1000L))
+ .setRetryDelayMultiplier(2.0)
+ .setMaxRetryDelayDuration(Duration.ofMillis(10000L))
+ .setInitialRpcTimeoutDuration(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeoutDuration(Duration.ZERO)
+ .setTotalTimeoutDuration(Duration.ofMillis(900000L))
+ .build()));
+
+ return builder;
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ *