This service provides access to the local catalog of agents and tools, allowing agents at + * runtime to quickly and securely look up peer agents or tools without querying the global control + * plane. + * + *
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 (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * String name = "name3373707";
+ * McpServer response = agentRegistryEndpointClient.getAiApplicationMcpServer(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the AgentRegistryEndpointClient 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 | + *
|---|---|---|
GetAiApplicationMcpServer |
+ * Gets an MCP server active within the localized dataplane of the AI Application. |
+ *
+ * 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. + *
|
+ *
GetAiApplicationEndpoint |
+ * Gets an endpoint active within the localized dataplane of the AI Application. |
+ *
+ * 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. + *
|
+ *
ListAiApplicationAgents |
+ * Lists agents active within the localized dataplane of the AI Application. |
+ *
+ * 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. + *
|
+ *
ListAiApplicationMcpServers |
+ * Lists MCP servers active within the localized dataplane of the AI Application. |
+ *
+ * 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. + *
|
+ *
ListAiApplicationEndpoints |
+ * Lists endpoints active within the localized dataplane of the AI Application. |
+ *
+ * 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. + *
|
+ *
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 AgentRegistryEndpointSettings + * 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
+ * AgentRegistryEndpointSettings agentRegistryEndpointSettings =
+ * AgentRegistryEndpointSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create(agentRegistryEndpointSettings);
+ * }
+ *
+ * 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
+ * AgentRegistryEndpointSettings agentRegistryEndpointSettings =
+ * AgentRegistryEndpointSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create(agentRegistryEndpointSettings);
+ * }
+ *
+ * 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
+ * AgentRegistryEndpointSettings agentRegistryEndpointSettings =
+ * AgentRegistryEndpointSettings.newHttpJsonBuilder().build();
+ * AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create(agentRegistryEndpointSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class AgentRegistryEndpointClient implements BackgroundResource { + private final @Nullable AgentRegistryEndpointSettings settings; + private final AgentRegistryEndpointStub stub; + + /** Constructs an instance of AgentRegistryEndpointClient with default settings. */ + public static final AgentRegistryEndpointClient create() throws IOException { + return create(AgentRegistryEndpointSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AgentRegistryEndpointClient, 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 AgentRegistryEndpointClient create(AgentRegistryEndpointSettings settings) + throws IOException { + return new AgentRegistryEndpointClient(settings); + } + + /** + * Constructs an instance of AgentRegistryEndpointClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(AgentRegistryEndpointSettings). + */ + public static final AgentRegistryEndpointClient create(AgentRegistryEndpointStub stub) { + return new AgentRegistryEndpointClient(stub); + } + + /** + * Constructs an instance of AgentRegistryEndpointClient, 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 AgentRegistryEndpointClient(AgentRegistryEndpointSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AgentRegistryEndpointStubSettings) settings.getStubSettings()).createStub(); + } + + protected AgentRegistryEndpointClient(AgentRegistryEndpointStub stub) { + this.settings = null; + this.stub = stub; + } + + public final @Nullable AgentRegistryEndpointSettings getSettings() { + return settings; + } + + public AgentRegistryEndpointStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an MCP server active within the localized dataplane of the AI Application. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * String name = "name3373707";
+ * McpServer response = agentRegistryEndpointClient.getAiApplicationMcpServer(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the MCP server, in the format
+ * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final McpServer getAiApplicationMcpServer(String name) {
+ GetAiApplicationMcpServerRequest request =
+ GetAiApplicationMcpServerRequest.newBuilder().setName(name).build();
+ return getAiApplicationMcpServer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an MCP server active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * GetAiApplicationMcpServerRequest request =
+ * GetAiApplicationMcpServerRequest.newBuilder().setName("name3373707").build();
+ * McpServer response = agentRegistryEndpointClient.getAiApplicationMcpServer(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 getAiApplicationMcpServer(GetAiApplicationMcpServerRequest request) {
+ return getAiApplicationMcpServerCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an MCP server active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * GetAiApplicationMcpServerRequest request =
+ * GetAiApplicationMcpServerRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * agentRegistryEndpointClient.getAiApplicationMcpServerCallable().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 (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * String name = "name3373707";
+ * Endpoint response = agentRegistryEndpointClient.getAiApplicationEndpoint(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the endpoint, in the format
+ * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Endpoint getAiApplicationEndpoint(String name) {
+ GetAiApplicationEndpointRequest request =
+ GetAiApplicationEndpointRequest.newBuilder().setName(name).build();
+ return getAiApplicationEndpoint(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an endpoint active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * GetAiApplicationEndpointRequest request =
+ * GetAiApplicationEndpointRequest.newBuilder().setName("name3373707").build();
+ * Endpoint response = agentRegistryEndpointClient.getAiApplicationEndpoint(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 getAiApplicationEndpoint(GetAiApplicationEndpointRequest request) {
+ return getAiApplicationEndpointCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an endpoint active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * GetAiApplicationEndpointRequest request =
+ * GetAiApplicationEndpointRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * agentRegistryEndpointClient.getAiApplicationEndpointCallable().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 (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * String parent = "parent-995424086";
+ * for (Agent element :
+ * agentRegistryEndpointClient.listAiApplicationAgents(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, in the format
+ * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAiApplicationAgentsPagedResponse listAiApplicationAgents(String parent) {
+ ListAiApplicationAgentsRequest request =
+ ListAiApplicationAgentsRequest.newBuilder().setParent(parent).build();
+ return listAiApplicationAgents(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists agents active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * ListAiApplicationAgentsRequest request =
+ * ListAiApplicationAgentsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Agent element :
+ * agentRegistryEndpointClient.listAiApplicationAgents(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 ListAiApplicationAgentsPagedResponse listAiApplicationAgents(
+ ListAiApplicationAgentsRequest request) {
+ return listAiApplicationAgentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists agents active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * ListAiApplicationAgentsRequest request =
+ * ListAiApplicationAgentsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * agentRegistryEndpointClient.listAiApplicationAgentsPagedCallable().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 (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * ListAiApplicationAgentsRequest request =
+ * ListAiApplicationAgentsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListAiApplicationAgentsResponse response =
+ * agentRegistryEndpointClient.listAiApplicationAgentsCallable().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 (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * String parent = "parent-995424086";
+ * for (McpServer element :
+ * agentRegistryEndpointClient.listAiApplicationMcpServers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, in the format
+ * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAiApplicationMcpServersPagedResponse listAiApplicationMcpServers(String parent) {
+ ListAiApplicationMcpServersRequest request =
+ ListAiApplicationMcpServersRequest.newBuilder().setParent(parent).build();
+ return listAiApplicationMcpServers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MCP servers active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * ListAiApplicationMcpServersRequest request =
+ * ListAiApplicationMcpServersRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (McpServer element :
+ * agentRegistryEndpointClient.listAiApplicationMcpServers(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 ListAiApplicationMcpServersPagedResponse listAiApplicationMcpServers(
+ ListAiApplicationMcpServersRequest request) {
+ return listAiApplicationMcpServersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MCP servers active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * ListAiApplicationMcpServersRequest request =
+ * ListAiApplicationMcpServersRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * agentRegistryEndpointClient
+ * .listAiApplicationMcpServersPagedCallable()
+ * .futureCall(request);
+ * // Do something.
+ * for (McpServer element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersPagedResponse>
+ listAiApplicationMcpServersPagedCallable() {
+ return stub.listAiApplicationMcpServersPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MCP servers active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * ListAiApplicationMcpServersRequest request =
+ * ListAiApplicationMcpServersRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListAiApplicationMcpServersResponse response =
+ * agentRegistryEndpointClient.listAiApplicationMcpServersCallable().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 UnaryCallable<
+ ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse>
+ listAiApplicationMcpServersCallable() {
+ return stub.listAiApplicationMcpServersCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists endpoints active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * String parent = "parent-995424086";
+ * for (Endpoint element :
+ * agentRegistryEndpointClient.listAiApplicationEndpoints(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, in the format
+ * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAiApplicationEndpointsPagedResponse listAiApplicationEndpoints(String parent) {
+ ListAiApplicationEndpointsRequest request =
+ ListAiApplicationEndpointsRequest.newBuilder().setParent(parent).build();
+ return listAiApplicationEndpoints(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists endpoints active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * ListAiApplicationEndpointsRequest request =
+ * ListAiApplicationEndpointsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Endpoint element :
+ * agentRegistryEndpointClient.listAiApplicationEndpoints(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 ListAiApplicationEndpointsPagedResponse listAiApplicationEndpoints(
+ ListAiApplicationEndpointsRequest request) {
+ return listAiApplicationEndpointsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists endpoints active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * ListAiApplicationEndpointsRequest request =
+ * ListAiApplicationEndpointsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * agentRegistryEndpointClient.listAiApplicationEndpointsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Endpoint element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsPagedResponse>
+ listAiApplicationEndpointsPagedCallable() {
+ return stub.listAiApplicationEndpointsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists endpoints active within the localized dataplane of the AI Application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * ListAiApplicationEndpointsRequest request =
+ * ListAiApplicationEndpointsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListAiApplicationEndpointsResponse response =
+ * agentRegistryEndpointClient.listAiApplicationEndpointsCallable().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 UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getAiApplicationMcpServer: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AgentRegistryEndpointSettings.Builder agentRegistryEndpointSettingsBuilder =
+ * AgentRegistryEndpointSettings.newBuilder();
+ * agentRegistryEndpointSettingsBuilder
+ * .getAiApplicationMcpServerSettings()
+ * .setRetrySettings(
+ * agentRegistryEndpointSettingsBuilder
+ * .getAiApplicationMcpServerSettings()
+ * .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());
+ * AgentRegistryEndpointSettings agentRegistryEndpointSettings =
+ * agentRegistryEndpointSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class AgentRegistryEndpointSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= AgentRegistryEndpointClient =======================
+ *
+ * Service Description: The localized dataplane API for Agent Registry.
+ *
+ * This service provides access to the local catalog of agents and tools, allowing agents at
+ * runtime to quickly and securely look up peer agents or tools without querying the global control
+ * plane.
+ *
+ * Sample for AgentRegistryEndpointClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public abstract class AgentRegistryEndpointStub implements BackgroundResource {
+
+ 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 getAiApplicationMcpServer:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcAgentRegistryEndpointCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcAgentRegistryEndpointStub extends AgentRegistryEndpointStub {
+ private static final MethodDescriptor This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonAgentRegistryEndpointCallableFactory
+ implements HttpJsonStubCallableFactory This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonAgentRegistryEndpointStub extends AgentRegistryEndpointStub {
+ private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
+
+ private static final ApiMethodDescriptor{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryEndpointClient agentRegistryEndpointClient =
+ * AgentRegistryEndpointClient.create()) {
+ * String name = "name3373707";
+ * McpServer response = agentRegistryEndpointClient.getAiApplicationMcpServer(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.agentregistryendpoint.v1;
+
+import javax.annotation.Generated;
diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/AgentRegistryEndpointStub.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/AgentRegistryEndpointStub.java
new file mode 100644
index 000000000000..4c7b1632e127
--- /dev/null
+++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/AgentRegistryEndpointStub.java
@@ -0,0 +1,95 @@
+/*
+ * 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.agentregistryendpoint.v1.stub;
+
+import static com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient.ListAiApplicationAgentsPagedResponse;
+import static com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient.ListAiApplicationEndpointsPagedResponse;
+import static com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient.ListAiApplicationMcpServersPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.agentregistry.v1.Endpoint;
+import com.google.cloud.agentregistry.v1.McpServer;
+import com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest;
+import com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest;
+import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest;
+import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse;
+import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest;
+import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse;
+import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest;
+import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the AgentRegistryEndpoint 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
+ * AgentRegistryEndpointStubSettings.Builder agentRegistryEndpointSettingsBuilder =
+ * AgentRegistryEndpointStubSettings.newBuilder();
+ * agentRegistryEndpointSettingsBuilder
+ * .getAiApplicationMcpServerSettings()
+ * .setRetrySettings(
+ * agentRegistryEndpointSettingsBuilder
+ * .getAiApplicationMcpServerSettings()
+ * .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());
+ * AgentRegistryEndpointStubSettings agentRegistryEndpointSettings =
+ * agentRegistryEndpointSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+@SuppressWarnings("CanonicalDuration")
+public class AgentRegistryEndpointStubSettings
+ extends StubSettings