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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ * Agent response = agentRegistryClient.getAgent(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the AgentRegistryClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
ListAgents |
+ * Lists Agents in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SearchAgents |
+ * Searches Agents in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetAgent |
+ * Gets details of a single Agent. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListEndpoints |
+ * Lists Endpoints in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetEndpoint |
+ * Gets details of a single Endpoint. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListMcpServers |
+ * Lists McpServers in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SearchMcpServers |
+ * Searches McpServers in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetMcpServer |
+ * Gets details of a single McpServer. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListServices |
+ * Lists Services in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetService |
+ * Gets details of a single Service. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateService |
+ * Creates a new Service in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateService |
+ * Updates the parameters of a single Service. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteService |
+ * Deletes a single Service. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListBindings |
+ * Lists Bindings in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetBinding |
+ * Gets details of a single Binding. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateBinding |
+ * Creates a new Binding in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateBinding |
+ * Updates the parameters of a single Binding. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteBinding |
+ * Deletes a single Binding. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
FetchAvailableBindings |
+ * Fetches available Bindings. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetLocation |
+ * Gets information about a location. |
+ *
+ * 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. + *
|
+ *
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 AgentRegistrySettings 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
+ * AgentRegistrySettings agentRegistrySettings =
+ * AgentRegistrySettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * AgentRegistryClient agentRegistryClient = AgentRegistryClient.create(agentRegistrySettings);
+ * }
+ *
+ * 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
+ * AgentRegistrySettings agentRegistrySettings =
+ * AgentRegistrySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AgentRegistryClient agentRegistryClient = AgentRegistryClient.create(agentRegistrySettings);
+ * }
+ *
+ * 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
+ * AgentRegistrySettings agentRegistrySettings =
+ * AgentRegistrySettings.newHttpJsonBuilder().build();
+ * AgentRegistryClient agentRegistryClient = AgentRegistryClient.create(agentRegistrySettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class AgentRegistryClient implements BackgroundResource { + private final AgentRegistrySettings settings; + private final AgentRegistryStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of AgentRegistryClient with default settings. */ + public static final AgentRegistryClient create() throws IOException { + return create(AgentRegistrySettings.newBuilder().build()); + } + + /** + * Constructs an instance of AgentRegistryClient, 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 AgentRegistryClient create(AgentRegistrySettings settings) + throws IOException { + return new AgentRegistryClient(settings); + } + + /** + * Constructs an instance of AgentRegistryClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AgentRegistrySettings). + */ + public static final AgentRegistryClient create(AgentRegistryStub stub) { + return new AgentRegistryClient(stub); + } + + /** + * Constructs an instance of AgentRegistryClient, 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 AgentRegistryClient(AgentRegistrySettings settings) throws IOException { + this.settings = settings; + this.stub = ((AgentRegistryStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected AgentRegistryClient(AgentRegistryStub 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 AgentRegistrySettings getSettings() { + return settings; + } + + public AgentRegistryStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Agents in a given project and location. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Agent element : agentRegistryClient.listAgents(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListAgentsRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAgentsPagedResponse listAgents(LocationName parent) {
+ ListAgentsRequest request =
+ ListAgentsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listAgents(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Agents in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Agent element : agentRegistryClient.listAgents(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListAgentsRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAgentsPagedResponse listAgents(String parent) {
+ ListAgentsRequest request = ListAgentsRequest.newBuilder().setParent(parent).build();
+ return listAgents(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Agents in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListAgentsRequest request =
+ * ListAgentsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Agent element : agentRegistryClient.listAgents(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 ListAgentsPagedResponse listAgents(ListAgentsRequest request) {
+ return listAgentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Agents in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListAgentsRequest request =
+ * ListAgentsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future = agentRegistryClient.listAgentsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Agent element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListAgentsRequest request =
+ * ListAgentsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListAgentsResponse response = agentRegistryClient.listAgentsCallable().call(request);
+ * for (Agent element : response.getAgentsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Agent element : agentRegistryClient.searchAgents(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for SearchAgentsRequest. Format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchAgentsPagedResponse searchAgents(LocationName parent) {
+ SearchAgentsRequest request =
+ SearchAgentsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return searchAgents(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Agents in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Agent element : agentRegistryClient.searchAgents(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for SearchAgentsRequest. Format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchAgentsPagedResponse searchAgents(String parent) {
+ SearchAgentsRequest request = SearchAgentsRequest.newBuilder().setParent(parent).build();
+ return searchAgents(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Agents in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * SearchAgentsRequest request =
+ * SearchAgentsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSearchString("searchString120312793")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Agent element : agentRegistryClient.searchAgents(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 SearchAgentsPagedResponse searchAgents(SearchAgentsRequest request) {
+ return searchAgentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Agents in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * SearchAgentsRequest request =
+ * SearchAgentsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSearchString("searchString120312793")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future = agentRegistryClient.searchAgentsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Agent element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * SearchAgentsRequest request =
+ * SearchAgentsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSearchString("searchString120312793")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * SearchAgentsResponse response = agentRegistryClient.searchAgentsCallable().call(request);
+ * for (Agent element : response.getAgentsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ * Agent response = agentRegistryClient.getAgent(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Agent getAgent(AgentName name) {
+ GetAgentRequest request =
+ GetAgentRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getAgent(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Agent.
+ *
+ * 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+ * Agent response = agentRegistryClient.getAgent(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Agent getAgent(String name) {
+ GetAgentRequest request = GetAgentRequest.newBuilder().setName(name).build();
+ return getAgent(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Agent.
+ *
+ * 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetAgentRequest request =
+ * GetAgentRequest.newBuilder()
+ * .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+ * .build();
+ * Agent response = agentRegistryClient.getAgent(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 Agent getAgent(GetAgentRequest request) {
+ return getAgentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Agent.
+ *
+ * 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetAgentRequest request =
+ * GetAgentRequest.newBuilder()
+ * .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+ * .build();
+ * ApiFuture future = agentRegistryClient.getAgentCallable().futureCall(request);
+ * // Do something.
+ * Agent response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Endpoint element : agentRegistryClient.listEndpoints(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list endpoints in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEndpointsPagedResponse listEndpoints(LocationName parent) {
+ ListEndpointsRequest request =
+ ListEndpointsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listEndpoints(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Endpoints in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Endpoint element : agentRegistryClient.listEndpoints(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list endpoints in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEndpointsPagedResponse listEndpoints(String parent) {
+ ListEndpointsRequest request = ListEndpointsRequest.newBuilder().setParent(parent).build();
+ return listEndpoints(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Endpoints in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListEndpointsRequest request =
+ * ListEndpointsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Endpoint element : agentRegistryClient.listEndpoints(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 ListEndpointsPagedResponse listEndpoints(ListEndpointsRequest request) {
+ return listEndpointsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Endpoints in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListEndpointsRequest request =
+ * ListEndpointsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture future =
+ * agentRegistryClient.listEndpointsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Endpoint element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListEndpointsRequest request =
+ * ListEndpointsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListEndpointsResponse response = agentRegistryClient.listEndpointsCallable().call(request);
+ * for (Endpoint element : response.getEndpointsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+ * Endpoint response = agentRegistryClient.getEndpoint(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the endpoint to retrieve. Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Endpoint getEndpoint(EndpointName name) {
+ GetEndpointRequest request =
+ GetEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getEndpoint(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Endpoint.
+ *
+ * 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+ * Endpoint response = agentRegistryClient.getEndpoint(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the endpoint to retrieve. Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Endpoint getEndpoint(String name) {
+ GetEndpointRequest request = GetEndpointRequest.newBuilder().setName(name).build();
+ return getEndpoint(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Endpoint.
+ *
+ * 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetEndpointRequest request =
+ * GetEndpointRequest.newBuilder()
+ * .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+ * .build();
+ * Endpoint response = agentRegistryClient.getEndpoint(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 Endpoint getEndpoint(GetEndpointRequest request) {
+ return getEndpointCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Endpoint.
+ *
+ * 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetEndpointRequest request =
+ * GetEndpointRequest.newBuilder()
+ * .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+ * .build();
+ * ApiFuture future = agentRegistryClient.getEndpointCallable().futureCall(request);
+ * // Do something.
+ * Endpoint response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (McpServer element : agentRegistryClient.listMcpServers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListMcpServersRequest. Format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMcpServersPagedResponse listMcpServers(LocationName parent) {
+ ListMcpServersRequest request =
+ ListMcpServersRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listMcpServers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists McpServers in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (McpServer element : agentRegistryClient.listMcpServers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListMcpServersRequest. Format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMcpServersPagedResponse listMcpServers(String parent) {
+ ListMcpServersRequest request = ListMcpServersRequest.newBuilder().setParent(parent).build();
+ return listMcpServers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists McpServers in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListMcpServersRequest request =
+ * ListMcpServersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (McpServer element : agentRegistryClient.listMcpServers(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 ListMcpServersPagedResponse listMcpServers(ListMcpServersRequest request) {
+ return listMcpServersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists McpServers in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListMcpServersRequest request =
+ * ListMcpServersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * agentRegistryClient.listMcpServersPagedCallable().futureCall(request);
+ * // Do something.
+ * for (McpServer element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListMcpServersRequest request =
+ * ListMcpServersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListMcpServersResponse response =
+ * agentRegistryClient.listMcpServersCallable().call(request);
+ * for (McpServer element : response.getMcpServersList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (McpServer element : agentRegistryClient.searchMcpServers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for SearchMcpServersRequest. Format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchMcpServersPagedResponse searchMcpServers(LocationName parent) {
+ SearchMcpServersRequest request =
+ SearchMcpServersRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return searchMcpServers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches McpServers in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (McpServer element : agentRegistryClient.searchMcpServers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for SearchMcpServersRequest. Format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchMcpServersPagedResponse searchMcpServers(String parent) {
+ SearchMcpServersRequest request =
+ SearchMcpServersRequest.newBuilder().setParent(parent).build();
+ return searchMcpServers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches McpServers in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * SearchMcpServersRequest request =
+ * SearchMcpServersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSearchString("searchString120312793")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (McpServer element : agentRegistryClient.searchMcpServers(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 SearchMcpServersPagedResponse searchMcpServers(SearchMcpServersRequest request) {
+ return searchMcpServersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches McpServers in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * SearchMcpServersRequest request =
+ * SearchMcpServersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSearchString("searchString120312793")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * agentRegistryClient.searchMcpServersPagedCallable().futureCall(request);
+ * // Do something.
+ * for (McpServer element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * SearchMcpServersRequest request =
+ * SearchMcpServersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSearchString("searchString120312793")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * SearchMcpServersResponse response =
+ * agentRegistryClient.searchMcpServersCallable().call(request);
+ * for (McpServer element : response.getMcpServersList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * McpServerName name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]");
+ * McpServer response = agentRegistryClient.getMcpServer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final McpServer getMcpServer(McpServerName name) {
+ GetMcpServerRequest request =
+ GetMcpServerRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getMcpServer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single McpServer.
+ *
+ * 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString();
+ * McpServer response = agentRegistryClient.getMcpServer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final McpServer getMcpServer(String name) {
+ GetMcpServerRequest request = GetMcpServerRequest.newBuilder().setName(name).build();
+ return getMcpServer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single McpServer.
+ *
+ * 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetMcpServerRequest request =
+ * GetMcpServerRequest.newBuilder()
+ * .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString())
+ * .build();
+ * McpServer response = agentRegistryClient.getMcpServer(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 McpServer getMcpServer(GetMcpServerRequest request) {
+ return getMcpServerCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single McpServer.
+ *
+ * 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetMcpServerRequest request =
+ * GetMcpServerRequest.newBuilder()
+ * .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString())
+ * .build();
+ * ApiFuture future = agentRegistryClient.getMcpServerCallable().futureCall(request);
+ * // Do something.
+ * McpServer response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Service element : agentRegistryClient.listServices(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list services in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServicesPagedResponse listServices(LocationName parent) {
+ ListServicesRequest request =
+ ListServicesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listServices(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Services in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Service element : agentRegistryClient.listServices(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list services in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServicesPagedResponse listServices(String parent) {
+ ListServicesRequest request = ListServicesRequest.newBuilder().setParent(parent).build();
+ return listServices(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Services in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListServicesRequest request =
+ * ListServicesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Service element : agentRegistryClient.listServices(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 ListServicesPagedResponse listServices(ListServicesRequest request) {
+ return listServicesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Services in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListServicesRequest request =
+ * ListServicesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture future =
+ * agentRegistryClient.listServicesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Service element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListServicesRequest request =
+ * ListServicesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListServicesResponse response = agentRegistryClient.listServicesCallable().call(request);
+ * for (Service element : response.getServicesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * Service response = agentRegistryClient.getService(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Service. Format:
+ * `projects/{project}/locations/{location}/services/{service}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Service getService(ServiceName name) {
+ GetServiceRequest request =
+ GetServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Service.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * Service response = agentRegistryClient.getService(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Service. Format:
+ * `projects/{project}/locations/{location}/services/{service}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Service getService(String name) {
+ GetServiceRequest request = GetServiceRequest.newBuilder().setName(name).build();
+ return getService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Service.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetServiceRequest request =
+ * GetServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .build();
+ * Service response = agentRegistryClient.getService(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 Service getService(GetServiceRequest request) {
+ return getServiceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Service.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetServiceRequest request =
+ * GetServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .build();
+ * ApiFuture future = agentRegistryClient.getServiceCallable().futureCall(request);
+ * // Do something.
+ * Service response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Service service = Service.newBuilder().build();
+ * String serviceId = "serviceId-194185552";
+ * Service response = agentRegistryClient.createServiceAsync(parent, service, serviceId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create the Service in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @param service Required. The Service resource that is being created. Format:
+ * `projects/{project}/locations/{location}/services/{service}`.
+ * @param serviceId Required. The ID to use for the service, which will become the final component
+ * of the service's resource name.
+ * This value should be 4-63 characters, and valid characters are `/[a-z][0-9]-/`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * This value should be 4-63 characters, and valid characters are `/[a-z][0-9]-/`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it
+ * must match the regular expression `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it
+ * must match the regular expression `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getAgent:
+ *
+ * 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 createService:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= AgentRegistryClient =======================
+ *
+ * Service Description: Service for managing Agents, Endpoints, McpServers, Services, and
+ * Bindings.
+ *
+ * Sample for AgentRegistryClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class AgentRegistryStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getAgent:
+ *
+ * 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 createService:
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Service service = Service.newBuilder().build();
+ * String serviceId = "serviceId-194185552";
+ * Service response = agentRegistryClient.createServiceAsync(parent, service, serviceId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create the Service in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @param service Required. The Service resource that is being created. Format:
+ * `projects/{project}/locations/{location}/services/{service}`.
+ * @param serviceId Required. The ID to use for the service, which will become the final component
+ * of the service's resource name.
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * CreateServiceRequest request =
+ * CreateServiceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setServiceId("serviceId-194185552")
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Service response = agentRegistryClient.createServiceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * CreateServiceRequest request =
+ * CreateServiceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setServiceId("serviceId-194185552")
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * CreateServiceRequest request =
+ * CreateServiceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setServiceId("serviceId-194185552")
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * Service service = Service.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Service response = agentRegistryClient.updateServiceAsync(service, updateMask).get();
+ * }
+ * }
+ *
+ * @param service Required. The Service resource that is being updated. Format:
+ * `projects/{project}/locations/{location}/services/{service}`.
+ * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the
+ * Service resource by the update. The fields specified in the update_mask are relative to the
+ * resource, not the full request. A field will be overwritten if it is in the mask. If the
+ * user does not provide a mask then all fields present in the request will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * UpdateServiceRequest request =
+ * UpdateServiceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Service response = agentRegistryClient.updateServiceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * UpdateServiceRequest request =
+ * UpdateServiceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * UpdateServiceRequest request =
+ * UpdateServiceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setService(Service.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * agentRegistryClient.deleteServiceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Service. Format:
+ * `projects/{project}/locations/{location}/services/{service}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * agentRegistryClient.deleteServiceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Service. Format:
+ * `projects/{project}/locations/{location}/services/{service}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * DeleteServiceRequest request =
+ * DeleteServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * agentRegistryClient.deleteServiceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * DeleteServiceRequest request =
+ * DeleteServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * DeleteServiceRequest request =
+ * DeleteServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Binding element : agentRegistryClient.listBindings(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list bindings in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBindingsPagedResponse listBindings(LocationName parent) {
+ ListBindingsRequest request =
+ ListBindingsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listBindings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Bindings in a given project and location.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Binding element : agentRegistryClient.listBindings(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list bindings in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBindingsPagedResponse listBindings(String parent) {
+ ListBindingsRequest request = ListBindingsRequest.newBuilder().setParent(parent).build();
+ return listBindings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Bindings in a given project and location.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListBindingsRequest request =
+ * ListBindingsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Binding element : agentRegistryClient.listBindings(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 ListBindingsPagedResponse listBindings(ListBindingsRequest request) {
+ return listBindingsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Bindings in a given project and location.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListBindingsRequest request =
+ * ListBindingsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListBindingsRequest request =
+ * ListBindingsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListBindingsResponse response = agentRegistryClient.listBindingsCallable().call(request);
+ * for (Binding element : response.getBindingsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]");
+ * Binding response = agentRegistryClient.getBinding(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Binding. Format:
+ * `projects/{project}/locations/{location}/bindings/{binding}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Binding getBinding(BindingName name) {
+ GetBindingRequest request =
+ GetBindingRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getBinding(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Binding.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString();
+ * Binding response = agentRegistryClient.getBinding(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Binding. Format:
+ * `projects/{project}/locations/{location}/bindings/{binding}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Binding getBinding(String name) {
+ GetBindingRequest request = GetBindingRequest.newBuilder().setName(name).build();
+ return getBinding(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Binding.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetBindingRequest request =
+ * GetBindingRequest.newBuilder()
+ * .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+ * .build();
+ * Binding response = agentRegistryClient.getBinding(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 Binding getBinding(GetBindingRequest request) {
+ return getBindingCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Binding.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetBindingRequest request =
+ * GetBindingRequest.newBuilder()
+ * .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Binding binding = Binding.newBuilder().build();
+ * String bindingId = "bindingId-920966528";
+ * Binding response = agentRegistryClient.createBindingAsync(parent, binding, bindingId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create the Binding in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @param binding Required. The Binding resource that is being created.
+ * @param bindingId Required. The ID to use for the binding, which will become the final component
+ * of the binding's resource name.
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Binding binding = Binding.newBuilder().build();
+ * String bindingId = "bindingId-920966528";
+ * Binding response = agentRegistryClient.createBindingAsync(parent, binding, bindingId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create the Binding in. Expected format:
+ * `projects/{project}/locations/{location}`.
+ * @param binding Required. The Binding resource that is being created.
+ * @param bindingId Required. The ID to use for the binding, which will become the final component
+ * of the binding's resource name.
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * CreateBindingRequest request =
+ * CreateBindingRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setBindingId("bindingId-920966528")
+ * .setBinding(Binding.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Binding response = agentRegistryClient.createBindingAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * CreateBindingRequest request =
+ * CreateBindingRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setBindingId("bindingId-920966528")
+ * .setBinding(Binding.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * CreateBindingRequest request =
+ * CreateBindingRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setBindingId("bindingId-920966528")
+ * .setBinding(Binding.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * Binding binding = Binding.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Binding response = agentRegistryClient.updateBindingAsync(binding, updateMask).get();
+ * }
+ * }
+ *
+ * @param binding Required. The Binding resource that is being updated.
+ * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the
+ * Binding resource by the update. The fields specified in the update_mask are relative to the
+ * resource, not the full request. A field will be overwritten if it is in the mask. If the
+ * user does not provide a mask then all fields present in the request will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * UpdateBindingRequest request =
+ * UpdateBindingRequest.newBuilder()
+ * .setBinding(Binding.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Binding response = agentRegistryClient.updateBindingAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * UpdateBindingRequest request =
+ * UpdateBindingRequest.newBuilder()
+ * .setBinding(Binding.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * UpdateBindingRequest request =
+ * UpdateBindingRequest.newBuilder()
+ * .setBinding(Binding.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]");
+ * agentRegistryClient.deleteBindingAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Binding. Format:
+ * `projects/{project}/locations/{location}/bindings/{binding}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString();
+ * agentRegistryClient.deleteBindingAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Binding. Format:
+ * `projects/{project}/locations/{location}/bindings/{binding}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * DeleteBindingRequest request =
+ * DeleteBindingRequest.newBuilder()
+ * .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * agentRegistryClient.deleteBindingAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * DeleteBindingRequest request =
+ * DeleteBindingRequest.newBuilder()
+ * .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * DeleteBindingRequest request =
+ * DeleteBindingRequest.newBuilder()
+ * .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Binding element : agentRegistryClient.fetchAvailableBindings(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, in the format `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final FetchAvailableBindingsPagedResponse fetchAvailableBindings(LocationName parent) {
+ FetchAvailableBindingsRequest request =
+ FetchAvailableBindingsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return fetchAvailableBindings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches available Bindings.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Binding element : agentRegistryClient.fetchAvailableBindings(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, in the format `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final FetchAvailableBindingsPagedResponse fetchAvailableBindings(String parent) {
+ FetchAvailableBindingsRequest request =
+ FetchAvailableBindingsRequest.newBuilder().setParent(parent).build();
+ return fetchAvailableBindings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches available Bindings.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * FetchAvailableBindingsRequest request =
+ * FetchAvailableBindingsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Binding element : agentRegistryClient.fetchAvailableBindings(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 FetchAvailableBindingsPagedResponse fetchAvailableBindings(
+ FetchAvailableBindingsRequest request) {
+ return fetchAvailableBindingsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches available Bindings.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * FetchAvailableBindingsRequest request =
+ * FetchAvailableBindingsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * FetchAvailableBindingsRequest request =
+ * FetchAvailableBindingsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * FetchAvailableBindingsResponse response =
+ * agentRegistryClient.fetchAvailableBindingsCallable().call(request);
+ * for (Binding element : response.getBindingsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : agentRegistryClient.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.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = agentRegistryClient.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{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = agentRegistryClient.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.
+ *
+ * {@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * AgentRegistrySettings.Builder agentRegistrySettingsBuilder = AgentRegistrySettings.newBuilder();
+ * agentRegistrySettingsBuilder
+ * .getAgentSettings()
+ * .setRetrySettings(
+ * agentRegistrySettingsBuilder
+ * .getAgentSettings()
+ * .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());
+ * AgentRegistrySettings agentRegistrySettings = agentRegistrySettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * {@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
+ * AgentRegistrySettings.Builder agentRegistrySettingsBuilder = AgentRegistrySettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * agentRegistrySettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class AgentRegistrySettings extends ClientSettings{@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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ * AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ * Agent response = agentRegistryClient.getAgent(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.agentregistry.v1;
+
+import javax.annotation.Generated;
diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStub.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStub.java
new file mode 100644
index 000000000000..c2523ee90dfa
--- /dev/null
+++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStub.java
@@ -0,0 +1,251 @@
+/*
+ * 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.agentregistry.v1.stub;
+
+import static com.google.cloud.agentregistry.v1.AgentRegistryClient.FetchAvailableBindingsPagedResponse;
+import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListAgentsPagedResponse;
+import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListBindingsPagedResponse;
+import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListEndpointsPagedResponse;
+import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListLocationsPagedResponse;
+import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListMcpServersPagedResponse;
+import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListServicesPagedResponse;
+import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchAgentsPagedResponse;
+import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchMcpServersPagedResponse;
+
+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.agentregistry.v1.Agent;
+import com.google.cloud.agentregistry.v1.Binding;
+import com.google.cloud.agentregistry.v1.CreateBindingRequest;
+import com.google.cloud.agentregistry.v1.CreateServiceRequest;
+import com.google.cloud.agentregistry.v1.DeleteBindingRequest;
+import com.google.cloud.agentregistry.v1.DeleteServiceRequest;
+import com.google.cloud.agentregistry.v1.Endpoint;
+import com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest;
+import com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse;
+import com.google.cloud.agentregistry.v1.GetAgentRequest;
+import com.google.cloud.agentregistry.v1.GetBindingRequest;
+import com.google.cloud.agentregistry.v1.GetEndpointRequest;
+import com.google.cloud.agentregistry.v1.GetMcpServerRequest;
+import com.google.cloud.agentregistry.v1.GetServiceRequest;
+import com.google.cloud.agentregistry.v1.ListAgentsRequest;
+import com.google.cloud.agentregistry.v1.ListAgentsResponse;
+import com.google.cloud.agentregistry.v1.ListBindingsRequest;
+import com.google.cloud.agentregistry.v1.ListBindingsResponse;
+import com.google.cloud.agentregistry.v1.ListEndpointsRequest;
+import com.google.cloud.agentregistry.v1.ListEndpointsResponse;
+import com.google.cloud.agentregistry.v1.ListMcpServersRequest;
+import com.google.cloud.agentregistry.v1.ListMcpServersResponse;
+import com.google.cloud.agentregistry.v1.ListServicesRequest;
+import com.google.cloud.agentregistry.v1.ListServicesResponse;
+import com.google.cloud.agentregistry.v1.McpServer;
+import com.google.cloud.agentregistry.v1.OperationMetadata;
+import com.google.cloud.agentregistry.v1.SearchAgentsRequest;
+import com.google.cloud.agentregistry.v1.SearchAgentsResponse;
+import com.google.cloud.agentregistry.v1.SearchMcpServersRequest;
+import com.google.cloud.agentregistry.v1.SearchMcpServersResponse;
+import com.google.cloud.agentregistry.v1.Service;
+import com.google.cloud.agentregistry.v1.UpdateBindingRequest;
+import com.google.cloud.agentregistry.v1.UpdateServiceRequest;
+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.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the AgentRegistry service API.
+ *
+ *
+ *
+ *
+ * {@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
+ * AgentRegistryStubSettings.Builder agentRegistrySettingsBuilder =
+ * AgentRegistryStubSettings.newBuilder();
+ * agentRegistrySettingsBuilder
+ * .getAgentSettings()
+ * .setRetrySettings(
+ * agentRegistrySettingsBuilder
+ * .getAgentSettings()
+ * .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());
+ * AgentRegistryStubSettings agentRegistrySettings = agentRegistrySettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * {@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
+ * AgentRegistryStubSettings.Builder agentRegistrySettingsBuilder =
+ * AgentRegistryStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * agentRegistrySettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+@SuppressWarnings("CanonicalDuration")
+public class AgentRegistryStubSettings extends StubSettings