diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index c2eaf920ecee..6ab3ffee0e24 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -64,6 +64,13 @@ pom import + + com.google.cloud + google-cloud-agentregistryendpoint-bom + 0.1.0-SNAPSHOT + pom + import + com.google.cloud google-cloud-aiplatform-bom diff --git a/java-agentregistryendpoint/.repo-metadata.json b/java-agentregistryendpoint/.repo-metadata.json new file mode 100644 index 000000000000..b1a43b3a3dce --- /dev/null +++ b/java-agentregistryendpoint/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "agentregistryendpoint", + "name_pretty": "Agent Registry Endpoint", + "product_documentation": "https://docs.cloud.google.com/agent-registry/reference/agentregistryendpoint/rest", + "api_description": "Agent Registry Endpoint is the localized dataplane API for Agent Registry.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-agentregistryendpoint/latest/overview", + "release_level": "preview", + "transport": "grpc+rest", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-agentregistryendpoint", + "distribution_name": "com.google.cloud:google-cloud-agentregistryendpoint", + "api_id": "agentregistryendpoint.googleapis.com", + "library_type": "GAPIC_AUTO", + "issue_tracker": "https://issuetracker.google.com/issues/new?component=2250143" +} \ No newline at end of file diff --git a/java-agentregistryendpoint/README.md b/java-agentregistryendpoint/README.md new file mode 100644 index 000000000000..59626d915d96 --- /dev/null +++ b/java-agentregistryendpoint/README.md @@ -0,0 +1,210 @@ +# Google Agent Registry Endpoint Client for Java + +Java idiomatic client for [Agent Registry Endpoint][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.90.0 + pom + import + + + + + + + com.google.cloud + google-cloud-agentregistryendpoint + + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + +```xml + + com.google.cloud + google-cloud-agentregistryendpoint + 0.0.0 + +``` + +If you are using Gradle 5.x or later, add this to your dependencies: + +```Groovy +implementation platform('com.google.cloud:libraries-bom:26.90.0') + +implementation 'com.google.cloud:google-cloud-agentregistryendpoint' +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-agentregistryendpoint:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-agentregistryendpoint" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Agent Registry Endpoint APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Agent Registry Endpoint API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Agent Registry Endpoint [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Agent Registry Endpoint. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-agentregistryendpoint` library. See the [Quickstart](#quickstart) section +to add `google-cloud-agentregistryendpoint` as a dependency in your code. + +## About Agent Registry Endpoint + + +[Agent Registry Endpoint][product-docs] Agent Registry Endpoint is the localized dataplane API for Agent Registry. + +See the [Agent Registry Endpoint client library docs][javadocs] to learn how to +use this Agent Registry Endpoint Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Agent Registry Endpoint uses both gRPC and HTTP/JSON for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://docs.cloud.google.com/agent-registry/reference/agentregistryendpoint/rest +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-agentregistryendpoint/latest/overview +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-agentregistryendpoint.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-agentregistryendpoint/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=agentregistryendpoint.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint-bom/pom.xml b/java-agentregistryendpoint/google-cloud-agentregistryendpoint-bom/pom.xml new file mode 100644 index 000000000000..d0c7f113419d --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint-bom/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + com.google.cloud + google-cloud-agentregistryendpoint-bom + 0.1.0-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.98.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Agent Registry Endpoint BOM + + BOM for Agent Registry Endpoint + + + + true + + + + + + + com.google.cloud + google-cloud-agentregistryendpoint + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-agentregistryendpoint-v1 + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-agentregistryendpoint-v1 + 0.1.0-SNAPSHOT + + + + + \ No newline at end of file diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/pom.xml b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/pom.xml new file mode 100644 index 000000000000..c0a11d8fe1f1 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/pom.xml @@ -0,0 +1,117 @@ + + + 4.0.0 + com.google.cloud + google-cloud-agentregistryendpoint + 0.1.0-SNAPSHOT + jar + Google Agent Registry Endpoint + Agent Registry Endpoint Agent Registry Endpoint is the localized dataplane API for Agent Registry. + + com.google.cloud + google-cloud-agentregistryendpoint-parent + 0.1.0-SNAPSHOT + + + google-cloud-agentregistryendpoint + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-agentregistryendpoint-v1 + + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + proto-google-iam-v1 + + + org.threeten + threetenbp + + + + + com.google.api.grpc + grpc-google-common-protos + test + + + com.google.api.grpc + grpc-google-iam-v1 + test + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-agentregistryendpoint-v1 + test + + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + \ No newline at end of file diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointClient.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointClient.java new file mode 100644 index 000000000000..1acf106e1039 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointClient.java @@ -0,0 +1,1173 @@ +/* + * 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; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.stub.AgentRegistryEndpointStub; +import com.google.cloud.agentregistryendpoint.v1.stub.AgentRegistryEndpointStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: 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. + * + *

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(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod 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.

+ *
    + *
  • getAiApplicationMcpServer(GetAiApplicationMcpServerRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAiApplicationMcpServer(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAiApplicationMcpServerCallable() + *

+ *

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.

+ *
    + *
  • getAiApplicationEndpoint(GetAiApplicationEndpointRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAiApplicationEndpoint(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAiApplicationEndpointCallable() + *

+ *

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.

+ *
    + *
  • listAiApplicationAgents(ListAiApplicationAgentsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAiApplicationAgents(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAiApplicationAgentsPagedCallable() + *

  • listAiApplicationAgentsCallable() + *

+ *

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.

+ *
    + *
  • listAiApplicationMcpServers(ListAiApplicationMcpServersRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAiApplicationMcpServers(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAiApplicationMcpServersPagedCallable() + *

  • listAiApplicationMcpServersCallable() + *

+ *

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.

+ *
    + *
  • listAiApplicationEndpoints(ListAiApplicationEndpointsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAiApplicationEndpoints(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAiApplicationEndpointsPagedCallable() + *

  • listAiApplicationEndpointsCallable() + *

+ *
+ * + *

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 UnaryCallable + getAiApplicationMcpServerCallable() { + return stub.getAiApplicationMcpServerCallable(); + } + + // 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()) {
+   *   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 UnaryCallable + getAiApplicationEndpointCallable() { + return stub.getAiApplicationEndpointCallable(); + } + + // 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()) {
+   *   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 UnaryCallable + listAiApplicationAgentsPagedCallable() { + return stub.listAiApplicationAgentsPagedCallable(); + } + + // 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();
+   *   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 UnaryCallable + listAiApplicationAgentsCallable() { + return stub.listAiApplicationAgentsCallable(); + } + + // 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()) {
+   *   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 UnaryCallable + listAiApplicationEndpointsCallable() { + return stub.listAiApplicationEndpointsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAiApplicationAgentsPagedResponse + extends AbstractPagedListResponse< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + Agent, + ListAiApplicationAgentsPage, + ListAiApplicationAgentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAiApplicationAgentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAiApplicationAgentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAiApplicationAgentsPagedResponse(ListAiApplicationAgentsPage page) { + super(page, ListAiApplicationAgentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAiApplicationAgentsPage + extends AbstractPage< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + Agent, + ListAiApplicationAgentsPage> { + + private ListAiApplicationAgentsPage( + @Nullable + PageContext + context, + @Nullable ListAiApplicationAgentsResponse response) { + super(context, response); + } + + private static ListAiApplicationAgentsPage createEmptyPage() { + return new ListAiApplicationAgentsPage(null, null); + } + + @Override + protected ListAiApplicationAgentsPage createPage( + @Nullable + PageContext + context, + @Nullable ListAiApplicationAgentsResponse response) { + return new ListAiApplicationAgentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAiApplicationAgentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + Agent, + ListAiApplicationAgentsPage, + ListAiApplicationAgentsFixedSizeCollection> { + + private ListAiApplicationAgentsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAiApplicationAgentsFixedSizeCollection createEmptyCollection() { + return new ListAiApplicationAgentsFixedSizeCollection(null, 0); + } + + @Override + protected ListAiApplicationAgentsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListAiApplicationAgentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAiApplicationMcpServersPagedResponse + extends AbstractPagedListResponse< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + McpServer, + ListAiApplicationMcpServersPage, + ListAiApplicationMcpServersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse, McpServer> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAiApplicationMcpServersPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAiApplicationMcpServersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAiApplicationMcpServersPagedResponse(ListAiApplicationMcpServersPage page) { + super(page, ListAiApplicationMcpServersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAiApplicationMcpServersPage + extends AbstractPage< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + McpServer, + ListAiApplicationMcpServersPage> { + + private ListAiApplicationMcpServersPage( + @Nullable + PageContext< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse, McpServer> + context, + @Nullable ListAiApplicationMcpServersResponse response) { + super(context, response); + } + + private static ListAiApplicationMcpServersPage createEmptyPage() { + return new ListAiApplicationMcpServersPage(null, null); + } + + @Override + protected ListAiApplicationMcpServersPage createPage( + @Nullable + PageContext< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse, McpServer> + context, + @Nullable ListAiApplicationMcpServersResponse response) { + return new ListAiApplicationMcpServersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse, McpServer> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAiApplicationMcpServersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + McpServer, + ListAiApplicationMcpServersPage, + ListAiApplicationMcpServersFixedSizeCollection> { + + private ListAiApplicationMcpServersFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAiApplicationMcpServersFixedSizeCollection createEmptyCollection() { + return new ListAiApplicationMcpServersFixedSizeCollection(null, 0); + } + + @Override + protected ListAiApplicationMcpServersFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListAiApplicationMcpServersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAiApplicationEndpointsPagedResponse + extends AbstractPagedListResponse< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + Endpoint, + ListAiApplicationEndpointsPage, + ListAiApplicationEndpointsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAiApplicationEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAiApplicationEndpointsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAiApplicationEndpointsPagedResponse(ListAiApplicationEndpointsPage page) { + super(page, ListAiApplicationEndpointsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAiApplicationEndpointsPage + extends AbstractPage< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + Endpoint, + ListAiApplicationEndpointsPage> { + + private ListAiApplicationEndpointsPage( + @Nullable + PageContext< + ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsResponse, Endpoint> + context, + @Nullable ListAiApplicationEndpointsResponse response) { + super(context, response); + } + + private static ListAiApplicationEndpointsPage createEmptyPage() { + return new ListAiApplicationEndpointsPage(null, null); + } + + @Override + protected ListAiApplicationEndpointsPage createPage( + @Nullable + PageContext< + ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsResponse, Endpoint> + context, + @Nullable ListAiApplicationEndpointsResponse response) { + return new ListAiApplicationEndpointsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsResponse, Endpoint> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAiApplicationEndpointsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + Endpoint, + ListAiApplicationEndpointsPage, + ListAiApplicationEndpointsFixedSizeCollection> { + + private ListAiApplicationEndpointsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAiApplicationEndpointsFixedSizeCollection createEmptyCollection() { + return new ListAiApplicationEndpointsFixedSizeCollection(null, 0); + } + + @Override + protected ListAiApplicationEndpointsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListAiApplicationEndpointsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointSettings.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointSettings.java new file mode 100644 index 000000000000..f0f66b36fcf5 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointSettings.java @@ -0,0 +1,301 @@ +/* + * 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; + +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.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.stub.AgentRegistryEndpointStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AgentRegistryEndpointClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (agentregistryendpoint.googleapis.com) and default port (443) + * are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of 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 ClientSettings { + + /** Returns the object with the settings used for calls to getAiApplicationMcpServer. */ + public UnaryCallSettings + getAiApplicationMcpServerSettings() { + return ((AgentRegistryEndpointStubSettings) getStubSettings()) + .getAiApplicationMcpServerSettings(); + } + + /** Returns the object with the settings used for calls to getAiApplicationEndpoint. */ + public UnaryCallSettings + getAiApplicationEndpointSettings() { + return ((AgentRegistryEndpointStubSettings) getStubSettings()) + .getAiApplicationEndpointSettings(); + } + + /** Returns the object with the settings used for calls to listAiApplicationAgents. */ + public PagedCallSettings< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + ListAiApplicationAgentsPagedResponse> + listAiApplicationAgentsSettings() { + return ((AgentRegistryEndpointStubSettings) getStubSettings()) + .listAiApplicationAgentsSettings(); + } + + /** Returns the object with the settings used for calls to listAiApplicationMcpServers. */ + public PagedCallSettings< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + ListAiApplicationMcpServersPagedResponse> + listAiApplicationMcpServersSettings() { + return ((AgentRegistryEndpointStubSettings) getStubSettings()) + .listAiApplicationMcpServersSettings(); + } + + /** Returns the object with the settings used for calls to listAiApplicationEndpoints. */ + public PagedCallSettings< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + ListAiApplicationEndpointsPagedResponse> + listAiApplicationEndpointsSettings() { + return ((AgentRegistryEndpointStubSettings) getStubSettings()) + .listAiApplicationEndpointsSettings(); + } + + public static final AgentRegistryEndpointSettings create(AgentRegistryEndpointStubSettings stub) + throws IOException { + return new AgentRegistryEndpointSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AgentRegistryEndpointStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AgentRegistryEndpointStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AgentRegistryEndpointStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AgentRegistryEndpointStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AgentRegistryEndpointStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AgentRegistryEndpointStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AgentRegistryEndpointStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AgentRegistryEndpointStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AgentRegistryEndpointSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AgentRegistryEndpointSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(AgentRegistryEndpointStubSettings.newBuilder(clientContext)); + } + + protected Builder(AgentRegistryEndpointSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AgentRegistryEndpointStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AgentRegistryEndpointStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(AgentRegistryEndpointStubSettings.newHttpJsonBuilder()); + } + + public AgentRegistryEndpointStubSettings.Builder getStubSettingsBuilder() { + return ((AgentRegistryEndpointStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getAiApplicationMcpServer. */ + public UnaryCallSettings.Builder + getAiApplicationMcpServerSettings() { + return getStubSettingsBuilder().getAiApplicationMcpServerSettings(); + } + + /** Returns the builder for the settings used for calls to getAiApplicationEndpoint. */ + public UnaryCallSettings.Builder + getAiApplicationEndpointSettings() { + return getStubSettingsBuilder().getAiApplicationEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to listAiApplicationAgents. */ + public PagedCallSettings.Builder< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + ListAiApplicationAgentsPagedResponse> + listAiApplicationAgentsSettings() { + return getStubSettingsBuilder().listAiApplicationAgentsSettings(); + } + + /** Returns the builder for the settings used for calls to listAiApplicationMcpServers. */ + public PagedCallSettings.Builder< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + ListAiApplicationMcpServersPagedResponse> + listAiApplicationMcpServersSettings() { + return getStubSettingsBuilder().listAiApplicationMcpServersSettings(); + } + + /** Returns the builder for the settings used for calls to listAiApplicationEndpoints. */ + public PagedCallSettings.Builder< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + ListAiApplicationEndpointsPagedResponse> + listAiApplicationEndpointsSettings() { + return getStubSettingsBuilder().listAiApplicationEndpointsSettings(); + } + + @Override + public AgentRegistryEndpointSettings build() throws IOException { + return new AgentRegistryEndpointSettings(this); + } + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/gapic_metadata.json b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/gapic_metadata.json new file mode 100644 index 000000000000..06e0c7d7e4c4 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.agentregistryendpoint.v1", + "libraryPackage": "com.google.cloud.agentregistryendpoint.v1", + "services": { + "AgentRegistryEndpoint": { + "clients": { + "grpc": { + "libraryClient": "AgentRegistryEndpointClient", + "rpcs": { + "GetAiApplicationEndpoint": { + "methods": ["getAiApplicationEndpoint", "getAiApplicationEndpoint", "getAiApplicationEndpointCallable"] + }, + "GetAiApplicationMcpServer": { + "methods": ["getAiApplicationMcpServer", "getAiApplicationMcpServer", "getAiApplicationMcpServerCallable"] + }, + "ListAiApplicationAgents": { + "methods": ["listAiApplicationAgents", "listAiApplicationAgents", "listAiApplicationAgentsPagedCallable", "listAiApplicationAgentsCallable"] + }, + "ListAiApplicationEndpoints": { + "methods": ["listAiApplicationEndpoints", "listAiApplicationEndpoints", "listAiApplicationEndpointsPagedCallable", "listAiApplicationEndpointsCallable"] + }, + "ListAiApplicationMcpServers": { + "methods": ["listAiApplicationMcpServers", "listAiApplicationMcpServers", "listAiApplicationMcpServersPagedCallable", "listAiApplicationMcpServersCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/package-info.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/package-info.java new file mode 100644 index 000000000000..1853f4aaa9ed --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/package-info.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Agent Registry Endpoint API + * + *

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: + * + *

{@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. + * + *

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 + getAiApplicationMcpServerCallable() { + throw new UnsupportedOperationException("Not implemented: getAiApplicationMcpServerCallable()"); + } + + public UnaryCallable + getAiApplicationEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: getAiApplicationEndpointCallable()"); + } + + public UnaryCallable + listAiApplicationAgentsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAiApplicationAgentsPagedCallable()"); + } + + public UnaryCallable + listAiApplicationAgentsCallable() { + throw new UnsupportedOperationException("Not implemented: listAiApplicationAgentsCallable()"); + } + + public UnaryCallable + listAiApplicationMcpServersPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAiApplicationMcpServersPagedCallable()"); + } + + public UnaryCallable + listAiApplicationMcpServersCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAiApplicationMcpServersCallable()"); + } + + public UnaryCallable + listAiApplicationEndpointsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAiApplicationEndpointsPagedCallable()"); + } + + public UnaryCallable + listAiApplicationEndpointsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAiApplicationEndpointsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/AgentRegistryEndpointStubSettings.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/AgentRegistryEndpointStubSettings.java new file mode 100644 index 000000000000..dd6d4bc070c2 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/AgentRegistryEndpointStubSettings.java @@ -0,0 +1,748 @@ +/* + * 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.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.agentregistry.v1.Agent; +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 com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AgentRegistryEndpointStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (agentregistryendpoint.googleapis.com) and default port (443) + * are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of 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
+ * 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 { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/agentregistry.read-only") + .add("https://www.googleapis.com/auth/agentregistry.read-write") + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final UnaryCallSettings + getAiApplicationMcpServerSettings; + private final UnaryCallSettings + getAiApplicationEndpointSettings; + private final PagedCallSettings< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + ListAiApplicationAgentsPagedResponse> + listAiApplicationAgentsSettings; + private final PagedCallSettings< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + ListAiApplicationMcpServersPagedResponse> + listAiApplicationMcpServersSettings; + private final PagedCallSettings< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + ListAiApplicationEndpointsPagedResponse> + listAiApplicationEndpointsSettings; + + private static final PagedListDescriptor< + ListAiApplicationAgentsRequest, ListAiApplicationAgentsResponse, Agent> + LIST_AI_APPLICATION_AGENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAiApplicationAgentsRequest, ListAiApplicationAgentsResponse, Agent>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAiApplicationAgentsRequest injectToken( + ListAiApplicationAgentsRequest payload, String token) { + return ListAiApplicationAgentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAiApplicationAgentsRequest injectPageSize( + ListAiApplicationAgentsRequest payload, int pageSize) { + return ListAiApplicationAgentsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAiApplicationAgentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAiApplicationAgentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAiApplicationAgentsResponse payload) { + return payload.getAgentsList(); + } + }; + + private static final PagedListDescriptor< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse, McpServer> + LIST_AI_APPLICATION_MCP_SERVERS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + McpServer>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAiApplicationMcpServersRequest injectToken( + ListAiApplicationMcpServersRequest payload, String token) { + return ListAiApplicationMcpServersRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListAiApplicationMcpServersRequest injectPageSize( + ListAiApplicationMcpServersRequest payload, int pageSize) { + return ListAiApplicationMcpServersRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAiApplicationMcpServersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAiApplicationMcpServersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAiApplicationMcpServersResponse payload) { + return payload.getMcpServersList(); + } + }; + + private static final PagedListDescriptor< + ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsResponse, Endpoint> + LIST_AI_APPLICATION_ENDPOINTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsResponse, Endpoint>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAiApplicationEndpointsRequest injectToken( + ListAiApplicationEndpointsRequest payload, String token) { + return ListAiApplicationEndpointsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListAiApplicationEndpointsRequest injectPageSize( + ListAiApplicationEndpointsRequest payload, int pageSize) { + return ListAiApplicationEndpointsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAiApplicationEndpointsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAiApplicationEndpointsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAiApplicationEndpointsResponse payload) { + return payload.getEndpointsList(); + } + }; + + private static final PagedListResponseFactory< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + ListAiApplicationAgentsPagedResponse> + LIST_AI_APPLICATION_AGENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + ListAiApplicationAgentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListAiApplicationAgentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AI_APPLICATION_AGENTS_PAGE_STR_DESC, request, context); + return ListAiApplicationAgentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + ListAiApplicationMcpServersPagedResponse> + LIST_AI_APPLICATION_MCP_SERVERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + ListAiApplicationMcpServersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse> + callable, + ListAiApplicationMcpServersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + McpServer> + pageContext = + PageContext.create( + callable, + LIST_AI_APPLICATION_MCP_SERVERS_PAGE_STR_DESC, + request, + context); + return ListAiApplicationMcpServersPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + ListAiApplicationEndpointsPagedResponse> + LIST_AI_APPLICATION_ENDPOINTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + ListAiApplicationEndpointsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListAiApplicationEndpointsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + Endpoint> + pageContext = + PageContext.create( + callable, LIST_AI_APPLICATION_ENDPOINTS_PAGE_STR_DESC, request, context); + return ListAiApplicationEndpointsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getAiApplicationMcpServer. */ + public UnaryCallSettings + getAiApplicationMcpServerSettings() { + return getAiApplicationMcpServerSettings; + } + + /** Returns the object with the settings used for calls to getAiApplicationEndpoint. */ + public UnaryCallSettings + getAiApplicationEndpointSettings() { + return getAiApplicationEndpointSettings; + } + + /** Returns the object with the settings used for calls to listAiApplicationAgents. */ + public PagedCallSettings< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + ListAiApplicationAgentsPagedResponse> + listAiApplicationAgentsSettings() { + return listAiApplicationAgentsSettings; + } + + /** Returns the object with the settings used for calls to listAiApplicationMcpServers. */ + public PagedCallSettings< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + ListAiApplicationMcpServersPagedResponse> + listAiApplicationMcpServersSettings() { + return listAiApplicationMcpServersSettings; + } + + /** Returns the object with the settings used for calls to listAiApplicationEndpoints. */ + public PagedCallSettings< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + ListAiApplicationEndpointsPagedResponse> + listAiApplicationEndpointsSettings() { + return listAiApplicationEndpointsSettings; + } + + public AgentRegistryEndpointStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAgentRegistryEndpointStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAgentRegistryEndpointStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "agentregistryendpoint"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "agentregistryendpoint.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "agentregistryendpoint.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AgentRegistryEndpointStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AgentRegistryEndpointStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AgentRegistryEndpointStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AgentRegistryEndpointStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getAiApplicationMcpServerSettings = settingsBuilder.getAiApplicationMcpServerSettings().build(); + getAiApplicationEndpointSettings = settingsBuilder.getAiApplicationEndpointSettings().build(); + listAiApplicationAgentsSettings = settingsBuilder.listAiApplicationAgentsSettings().build(); + listAiApplicationMcpServersSettings = + settingsBuilder.listAiApplicationMcpServersSettings().build(); + listAiApplicationEndpointsSettings = + settingsBuilder.listAiApplicationEndpointsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-agentregistryendpoint") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for AgentRegistryEndpointStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + getAiApplicationMcpServerSettings; + private final UnaryCallSettings.Builder + getAiApplicationEndpointSettings; + private final PagedCallSettings.Builder< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + ListAiApplicationAgentsPagedResponse> + listAiApplicationAgentsSettings; + private final PagedCallSettings.Builder< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + ListAiApplicationMcpServersPagedResponse> + listAiApplicationMcpServersSettings; + private final PagedCallSettings.Builder< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + ListAiApplicationEndpointsPagedResponse> + listAiApplicationEndpointsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(clientContext); + + getAiApplicationMcpServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAiApplicationEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAiApplicationAgentsSettings = + PagedCallSettings.newBuilder(LIST_AI_APPLICATION_AGENTS_PAGE_STR_FACT); + listAiApplicationMcpServersSettings = + PagedCallSettings.newBuilder(LIST_AI_APPLICATION_MCP_SERVERS_PAGE_STR_FACT); + listAiApplicationEndpointsSettings = + PagedCallSettings.newBuilder(LIST_AI_APPLICATION_ENDPOINTS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getAiApplicationMcpServerSettings, + getAiApplicationEndpointSettings, + listAiApplicationAgentsSettings, + listAiApplicationMcpServersSettings, + listAiApplicationEndpointsSettings); + initDefaults(this); + } + + protected Builder(AgentRegistryEndpointStubSettings settings) { + super(settings); + + getAiApplicationMcpServerSettings = settings.getAiApplicationMcpServerSettings.toBuilder(); + getAiApplicationEndpointSettings = settings.getAiApplicationEndpointSettings.toBuilder(); + listAiApplicationAgentsSettings = settings.listAiApplicationAgentsSettings.toBuilder(); + listAiApplicationMcpServersSettings = + settings.listAiApplicationMcpServersSettings.toBuilder(); + listAiApplicationEndpointsSettings = settings.listAiApplicationEndpointsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getAiApplicationMcpServerSettings, + getAiApplicationEndpointSettings, + listAiApplicationAgentsSettings, + listAiApplicationMcpServersSettings, + listAiApplicationEndpointsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getAiApplicationMcpServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getAiApplicationEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAiApplicationAgentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAiApplicationMcpServersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAiApplicationEndpointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getAiApplicationMcpServer. */ + public UnaryCallSettings.Builder + getAiApplicationMcpServerSettings() { + return getAiApplicationMcpServerSettings; + } + + /** Returns the builder for the settings used for calls to getAiApplicationEndpoint. */ + public UnaryCallSettings.Builder + getAiApplicationEndpointSettings() { + return getAiApplicationEndpointSettings; + } + + /** Returns the builder for the settings used for calls to listAiApplicationAgents. */ + public PagedCallSettings.Builder< + ListAiApplicationAgentsRequest, + ListAiApplicationAgentsResponse, + ListAiApplicationAgentsPagedResponse> + listAiApplicationAgentsSettings() { + return listAiApplicationAgentsSettings; + } + + /** Returns the builder for the settings used for calls to listAiApplicationMcpServers. */ + public PagedCallSettings.Builder< + ListAiApplicationMcpServersRequest, + ListAiApplicationMcpServersResponse, + ListAiApplicationMcpServersPagedResponse> + listAiApplicationMcpServersSettings() { + return listAiApplicationMcpServersSettings; + } + + /** Returns the builder for the settings used for calls to listAiApplicationEndpoints. */ + public PagedCallSettings.Builder< + ListAiApplicationEndpointsRequest, + ListAiApplicationEndpointsResponse, + ListAiApplicationEndpointsPagedResponse> + listAiApplicationEndpointsSettings() { + return listAiApplicationEndpointsSettings; + } + + @Override + public AgentRegistryEndpointStubSettings build() throws IOException { + return new AgentRegistryEndpointStubSettings(this); + } + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/GrpcAgentRegistryEndpointCallableFactory.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/GrpcAgentRegistryEndpointCallableFactory.java new file mode 100644 index 000000000000..ee526ed6647c --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/GrpcAgentRegistryEndpointCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistryendpoint.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AgentRegistryEndpoint service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class GrpcAgentRegistryEndpointCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/GrpcAgentRegistryEndpointStub.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/GrpcAgentRegistryEndpointStub.java new file mode 100644 index 000000000000..c42672e420a0 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/GrpcAgentRegistryEndpointStub.java @@ -0,0 +1,382 @@ +/* + * 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.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +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 com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AgentRegistryEndpoint service API. + * + *

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 + getAiApplicationMcpServerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/GetAiApplicationMcpServer") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAiApplicationMcpServerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(McpServer.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getAiApplicationEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/GetAiApplicationEndpoint") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAiApplicationEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Endpoint.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListAiApplicationAgentsRequest, ListAiApplicationAgentsResponse> + listAiApplicationAgentsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/ListAiApplicationAgents") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAiApplicationAgentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAiApplicationAgentsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse> + listAiApplicationMcpServersMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/ListAiApplicationMcpServers") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAiApplicationMcpServersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAiApplicationMcpServersResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsResponse> + listAiApplicationEndpointsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/ListAiApplicationEndpoints") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAiApplicationEndpointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAiApplicationEndpointsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + getAiApplicationMcpServerCallable; + private final UnaryCallable + getAiApplicationEndpointCallable; + private final UnaryCallable + listAiApplicationAgentsCallable; + private final UnaryCallable + listAiApplicationAgentsPagedCallable; + private final UnaryCallable< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse> + listAiApplicationMcpServersCallable; + private final UnaryCallable< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersPagedResponse> + listAiApplicationMcpServersPagedCallable; + private final UnaryCallable + listAiApplicationEndpointsCallable; + private final UnaryCallable< + ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsPagedResponse> + listAiApplicationEndpointsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAgentRegistryEndpointStub create( + AgentRegistryEndpointStubSettings settings) throws IOException { + return new GrpcAgentRegistryEndpointStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAgentRegistryEndpointStub create(ClientContext clientContext) + throws IOException { + return new GrpcAgentRegistryEndpointStub( + AgentRegistryEndpointStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAgentRegistryEndpointStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAgentRegistryEndpointStub( + AgentRegistryEndpointStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAgentRegistryEndpointStub, 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 GrpcAgentRegistryEndpointStub( + AgentRegistryEndpointStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcAgentRegistryEndpointCallableFactory()); + } + + /** + * Constructs an instance of GrpcAgentRegistryEndpointStub, 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 GrpcAgentRegistryEndpointStub( + AgentRegistryEndpointStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + getAiApplicationMcpServerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAiApplicationMcpServerMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getAiApplicationEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAiApplicationEndpointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listAiApplicationAgentsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAiApplicationAgentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listAiApplicationMcpServersTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listAiApplicationMcpServersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listAiApplicationEndpointsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAiApplicationEndpointsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.getAiApplicationMcpServerCallable = + callableFactory.createUnaryCallable( + getAiApplicationMcpServerTransportSettings, + settings.getAiApplicationMcpServerSettings(), + clientContext); + this.getAiApplicationEndpointCallable = + callableFactory.createUnaryCallable( + getAiApplicationEndpointTransportSettings, + settings.getAiApplicationEndpointSettings(), + clientContext); + this.listAiApplicationAgentsCallable = + callableFactory.createUnaryCallable( + listAiApplicationAgentsTransportSettings, + settings.listAiApplicationAgentsSettings(), + clientContext); + this.listAiApplicationAgentsPagedCallable = + callableFactory.createPagedCallable( + listAiApplicationAgentsTransportSettings, + settings.listAiApplicationAgentsSettings(), + clientContext); + this.listAiApplicationMcpServersCallable = + callableFactory.createUnaryCallable( + listAiApplicationMcpServersTransportSettings, + settings.listAiApplicationMcpServersSettings(), + clientContext); + this.listAiApplicationMcpServersPagedCallable = + callableFactory.createPagedCallable( + listAiApplicationMcpServersTransportSettings, + settings.listAiApplicationMcpServersSettings(), + clientContext); + this.listAiApplicationEndpointsCallable = + callableFactory.createUnaryCallable( + listAiApplicationEndpointsTransportSettings, + settings.listAiApplicationEndpointsSettings(), + clientContext); + this.listAiApplicationEndpointsPagedCallable = + callableFactory.createPagedCallable( + listAiApplicationEndpointsTransportSettings, + settings.listAiApplicationEndpointsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + getAiApplicationMcpServerCallable() { + return getAiApplicationMcpServerCallable; + } + + @Override + public UnaryCallable + getAiApplicationEndpointCallable() { + return getAiApplicationEndpointCallable; + } + + @Override + public UnaryCallable + listAiApplicationAgentsCallable() { + return listAiApplicationAgentsCallable; + } + + @Override + public UnaryCallable + listAiApplicationAgentsPagedCallable() { + return listAiApplicationAgentsPagedCallable; + } + + @Override + public UnaryCallable + listAiApplicationMcpServersCallable() { + return listAiApplicationMcpServersCallable; + } + + @Override + public UnaryCallable + listAiApplicationMcpServersPagedCallable() { + return listAiApplicationMcpServersPagedCallable; + } + + @Override + public UnaryCallable + listAiApplicationEndpointsCallable() { + return listAiApplicationEndpointsCallable; + } + + @Override + public UnaryCallable + listAiApplicationEndpointsPagedCallable() { + return listAiApplicationEndpointsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/HttpJsonAgentRegistryEndpointCallableFactory.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/HttpJsonAgentRegistryEndpointCallableFactory.java new file mode 100644 index 000000000000..56b2fd296063 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/HttpJsonAgentRegistryEndpointCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistryendpoint.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AgentRegistryEndpoint service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class HttpJsonAgentRegistryEndpointCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/HttpJsonAgentRegistryEndpointStub.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/HttpJsonAgentRegistryEndpointStub.java new file mode 100644 index 000000000000..7209a7b7eb10 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/HttpJsonAgentRegistryEndpointStub.java @@ -0,0 +1,521 @@ +/* + * 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.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +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 com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AgentRegistryEndpoint service API. + * + *

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 + getAiApplicationMcpServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/GetAiApplicationMcpServer") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/aiApplications/*/mcpServers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(McpServer.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAiApplicationEndpointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/GetAiApplicationEndpoint") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/aiApplications/*/endpoints/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Endpoint.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListAiApplicationAgentsRequest, ListAiApplicationAgentsResponse> + listAiApplicationAgentsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/ListAiApplicationAgents") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/aiApplications/*}/agents", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAiApplicationAgentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse> + listAiApplicationMcpServersMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/ListAiApplicationMcpServers") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/aiApplications/*}/mcpServers", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAiApplicationMcpServersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsResponse> + listAiApplicationEndpointsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint/ListAiApplicationEndpoints") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/aiApplications/*}/endpoints", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAiApplicationEndpointsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + getAiApplicationMcpServerCallable; + private final UnaryCallable + getAiApplicationEndpointCallable; + private final UnaryCallable + listAiApplicationAgentsCallable; + private final UnaryCallable + listAiApplicationAgentsPagedCallable; + private final UnaryCallable< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersResponse> + listAiApplicationMcpServersCallable; + private final UnaryCallable< + ListAiApplicationMcpServersRequest, ListAiApplicationMcpServersPagedResponse> + listAiApplicationMcpServersPagedCallable; + private final UnaryCallable + listAiApplicationEndpointsCallable; + private final UnaryCallable< + ListAiApplicationEndpointsRequest, ListAiApplicationEndpointsPagedResponse> + listAiApplicationEndpointsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAgentRegistryEndpointStub create( + AgentRegistryEndpointStubSettings settings) throws IOException { + return new HttpJsonAgentRegistryEndpointStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAgentRegistryEndpointStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAgentRegistryEndpointStub( + AgentRegistryEndpointStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAgentRegistryEndpointStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAgentRegistryEndpointStub( + AgentRegistryEndpointStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonAgentRegistryEndpointStub, 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 HttpJsonAgentRegistryEndpointStub( + AgentRegistryEndpointStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonAgentRegistryEndpointCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAgentRegistryEndpointStub, 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 HttpJsonAgentRegistryEndpointStub( + AgentRegistryEndpointStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + getAiApplicationMcpServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAiApplicationMcpServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getAiApplicationEndpointTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAiApplicationEndpointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listAiApplicationAgentsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAiApplicationAgentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listAiApplicationMcpServersTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listAiApplicationMcpServersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listAiApplicationEndpointsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAiApplicationEndpointsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.getAiApplicationMcpServerCallable = + callableFactory.createUnaryCallable( + getAiApplicationMcpServerTransportSettings, + settings.getAiApplicationMcpServerSettings(), + clientContext); + this.getAiApplicationEndpointCallable = + callableFactory.createUnaryCallable( + getAiApplicationEndpointTransportSettings, + settings.getAiApplicationEndpointSettings(), + clientContext); + this.listAiApplicationAgentsCallable = + callableFactory.createUnaryCallable( + listAiApplicationAgentsTransportSettings, + settings.listAiApplicationAgentsSettings(), + clientContext); + this.listAiApplicationAgentsPagedCallable = + callableFactory.createPagedCallable( + listAiApplicationAgentsTransportSettings, + settings.listAiApplicationAgentsSettings(), + clientContext); + this.listAiApplicationMcpServersCallable = + callableFactory.createUnaryCallable( + listAiApplicationMcpServersTransportSettings, + settings.listAiApplicationMcpServersSettings(), + clientContext); + this.listAiApplicationMcpServersPagedCallable = + callableFactory.createPagedCallable( + listAiApplicationMcpServersTransportSettings, + settings.listAiApplicationMcpServersSettings(), + clientContext); + this.listAiApplicationEndpointsCallable = + callableFactory.createUnaryCallable( + listAiApplicationEndpointsTransportSettings, + settings.listAiApplicationEndpointsSettings(), + clientContext); + this.listAiApplicationEndpointsPagedCallable = + callableFactory.createPagedCallable( + listAiApplicationEndpointsTransportSettings, + settings.listAiApplicationEndpointsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getAiApplicationMcpServerMethodDescriptor); + methodDescriptors.add(getAiApplicationEndpointMethodDescriptor); + methodDescriptors.add(listAiApplicationAgentsMethodDescriptor); + methodDescriptors.add(listAiApplicationMcpServersMethodDescriptor); + methodDescriptors.add(listAiApplicationEndpointsMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + getAiApplicationMcpServerCallable() { + return getAiApplicationMcpServerCallable; + } + + @Override + public UnaryCallable + getAiApplicationEndpointCallable() { + return getAiApplicationEndpointCallable; + } + + @Override + public UnaryCallable + listAiApplicationAgentsCallable() { + return listAiApplicationAgentsCallable; + } + + @Override + public UnaryCallable + listAiApplicationAgentsPagedCallable() { + return listAiApplicationAgentsPagedCallable; + } + + @Override + public UnaryCallable + listAiApplicationMcpServersCallable() { + return listAiApplicationMcpServersCallable; + } + + @Override + public UnaryCallable + listAiApplicationMcpServersPagedCallable() { + return listAiApplicationMcpServersPagedCallable; + } + + @Override + public UnaryCallable + listAiApplicationEndpointsCallable() { + return listAiApplicationEndpointsCallable; + } + + @Override + public UnaryCallable + listAiApplicationEndpointsPagedCallable() { + return listAiApplicationEndpointsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/Version.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/Version.java new file mode 100644 index 000000000000..352a216eed6d --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/java/com/google/cloud/agentregistryendpoint/v1/stub/Version.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistryendpoint.v1.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-agentregistryendpoint:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/resources/META-INF/native-image/com.google.cloud.agentregistryendpoint.v1/reflect-config.json b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/resources/META-INF/native-image/com.google.cloud.agentregistryendpoint.v1/reflect-config.json new file mode 100644 index 000000000000..69e3ab76d725 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/main/resources/META-INF/native-image/com.google.cloud.agentregistryendpoint.v1/reflect-config.json @@ -0,0 +1,1748 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent$Card", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent$Card$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent$Card$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent$Protocol", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent$Protocol$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent$Protocol$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent$Skill", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Agent$Skill$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Endpoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Endpoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Interface", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Interface$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Interface$ProtocolBinding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.McpServer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.McpServer$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.McpServer$Tool", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.McpServer$Tool$Annotations", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.McpServer$Tool$Annotations$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.McpServer$Tool$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.NullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointClientHttpJsonTest.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointClientHttpJsonTest.java new file mode 100644 index 000000000000..f37af466fd2c --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointClientHttpJsonTest.java @@ -0,0 +1,352 @@ +/* + * 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; + +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.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.Interface; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.stub.HttpJsonAgentRegistryEndpointStub; +import com.google.common.collect.Lists; +import com.google.protobuf.Struct; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AgentRegistryEndpointClientHttpJsonTest { + private static MockHttpService mockService; + private static AgentRegistryEndpointClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAgentRegistryEndpointStub.getMethodDescriptors(), + AgentRegistryEndpointSettings.getDefaultEndpoint()); + AgentRegistryEndpointSettings settings = + AgentRegistryEndpointSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AgentRegistryEndpointSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AgentRegistryEndpointClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getAiApplicationMcpServerTest() throws Exception { + McpServer expectedResponse = + McpServer.newBuilder() + .setName("name3373707") + .setMcpServerId("mcpServerId298140536") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .addAllTools(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6507/locations/location-6507/aiApplications/aiApplication-6507/mcpServers/mcpServer-6507"; + + McpServer actualResponse = client.getAiApplicationMcpServer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAiApplicationMcpServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6507/locations/location-6507/aiApplications/aiApplication-6507/mcpServers/mcpServer-6507"; + client.getAiApplicationMcpServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAiApplicationEndpointTest() throws Exception { + Endpoint expectedResponse = + Endpoint.newBuilder() + .setName("name3373707") + .setEndpointId("endpointId-1837754992") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5947/locations/location-5947/aiApplications/aiApplication-5947/endpoints/endpoint-5947"; + + Endpoint actualResponse = client.getAiApplicationEndpoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAiApplicationEndpointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5947/locations/location-5947/aiApplications/aiApplication-5947/endpoints/endpoint-5947"; + client.getAiApplicationEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAiApplicationAgentsTest() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + ListAiApplicationAgentsResponse expectedResponse = + ListAiApplicationAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-6948/locations/location-6948/aiApplications/aiApplication-6948"; + + ListAiApplicationAgentsPagedResponse pagedListResponse = client.listAiApplicationAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAiApplicationAgentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-6948/locations/location-6948/aiApplications/aiApplication-6948"; + client.listAiApplicationAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAiApplicationMcpServersTest() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + ListAiApplicationMcpServersResponse expectedResponse = + ListAiApplicationMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-6948/locations/location-6948/aiApplications/aiApplication-6948"; + + ListAiApplicationMcpServersPagedResponse pagedListResponse = + client.listAiApplicationMcpServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMcpServersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAiApplicationMcpServersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-6948/locations/location-6948/aiApplications/aiApplication-6948"; + client.listAiApplicationMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAiApplicationEndpointsTest() throws Exception { + Endpoint responsesElement = Endpoint.newBuilder().build(); + ListAiApplicationEndpointsResponse expectedResponse = + ListAiApplicationEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllEndpoints(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-6948/locations/location-6948/aiApplications/aiApplication-6948"; + + ListAiApplicationEndpointsPagedResponse pagedListResponse = + client.listAiApplicationEndpoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEndpointsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAiApplicationEndpointsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-6948/locations/location-6948/aiApplications/aiApplication-6948"; + client.listAiApplicationEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointClientTest.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointClientTest.java new file mode 100644 index 000000000000..8ff812fe04c8 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointClientTest.java @@ -0,0 +1,321 @@ +/* + * 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; + +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.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.Interface; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Struct; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AgentRegistryEndpointClientTest { + private static MockAgentRegistryEndpoint mockAgentRegistryEndpoint; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AgentRegistryEndpointClient client; + + @BeforeClass + public static void startStaticServer() { + mockAgentRegistryEndpoint = new MockAgentRegistryEndpoint(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockAgentRegistryEndpoint)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AgentRegistryEndpointSettings settings = + AgentRegistryEndpointSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AgentRegistryEndpointClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getAiApplicationMcpServerTest() throws Exception { + McpServer expectedResponse = + McpServer.newBuilder() + .setName("name3373707") + .setMcpServerId("mcpServerId298140536") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .addAllTools(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .build(); + mockAgentRegistryEndpoint.addResponse(expectedResponse); + + String name = "name3373707"; + + McpServer actualResponse = client.getAiApplicationMcpServer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistryEndpoint.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAiApplicationMcpServerRequest actualRequest = + ((GetAiApplicationMcpServerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAiApplicationMcpServerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistryEndpoint.addException(exception); + + try { + String name = "name3373707"; + client.getAiApplicationMcpServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAiApplicationEndpointTest() throws Exception { + Endpoint expectedResponse = + Endpoint.newBuilder() + .setName("name3373707") + .setEndpointId("endpointId-1837754992") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .build(); + mockAgentRegistryEndpoint.addResponse(expectedResponse); + + String name = "name3373707"; + + Endpoint actualResponse = client.getAiApplicationEndpoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistryEndpoint.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAiApplicationEndpointRequest actualRequest = + ((GetAiApplicationEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAiApplicationEndpointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistryEndpoint.addException(exception); + + try { + String name = "name3373707"; + client.getAiApplicationEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAiApplicationAgentsTest() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + ListAiApplicationAgentsResponse expectedResponse = + ListAiApplicationAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistryEndpoint.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAiApplicationAgentsPagedResponse pagedListResponse = client.listAiApplicationAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistryEndpoint.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAiApplicationAgentsRequest actualRequest = + ((ListAiApplicationAgentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAiApplicationAgentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistryEndpoint.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAiApplicationAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAiApplicationMcpServersTest() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + ListAiApplicationMcpServersResponse expectedResponse = + ListAiApplicationMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistryEndpoint.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAiApplicationMcpServersPagedResponse pagedListResponse = + client.listAiApplicationMcpServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMcpServersList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistryEndpoint.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAiApplicationMcpServersRequest actualRequest = + ((ListAiApplicationMcpServersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAiApplicationMcpServersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistryEndpoint.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAiApplicationMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAiApplicationEndpointsTest() throws Exception { + Endpoint responsesElement = Endpoint.newBuilder().build(); + ListAiApplicationEndpointsResponse expectedResponse = + ListAiApplicationEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllEndpoints(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistryEndpoint.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAiApplicationEndpointsPagedResponse pagedListResponse = + client.listAiApplicationEndpoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEndpointsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistryEndpoint.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAiApplicationEndpointsRequest actualRequest = + ((ListAiApplicationEndpointsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAiApplicationEndpointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistryEndpoint.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAiApplicationEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/MockAgentRegistryEndpoint.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/MockAgentRegistryEndpoint.java new file mode 100644 index 000000000000..de9f9cdabdb1 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/MockAgentRegistryEndpoint.java @@ -0,0 +1,59 @@ +/* + * 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAgentRegistryEndpoint implements MockGrpcService { + private final MockAgentRegistryEndpointImpl serviceImpl; + + public MockAgentRegistryEndpoint() { + serviceImpl = new MockAgentRegistryEndpointImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/MockAgentRegistryEndpointImpl.java b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/MockAgentRegistryEndpointImpl.java new file mode 100644 index 000000000000..d64918cea0e9 --- /dev/null +++ b/java-agentregistryendpoint/google-cloud-agentregistryendpoint/src/test/java/com/google/cloud/agentregistryendpoint/v1/MockAgentRegistryEndpointImpl.java @@ -0,0 +1,175 @@ +/* + * 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; + +import com.google.api.core.BetaApi; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointGrpc.AgentRegistryEndpointImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAgentRegistryEndpointImpl extends AgentRegistryEndpointImplBase { + private List requests; + private Queue responses; + + public MockAgentRegistryEndpointImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getAiApplicationMcpServer( + GetAiApplicationMcpServerRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof McpServer) { + requests.add(request); + responseObserver.onNext(((McpServer) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAiApplicationMcpServer, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + McpServer.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAiApplicationEndpoint( + GetAiApplicationEndpointRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Endpoint) { + requests.add(request); + responseObserver.onNext(((Endpoint) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAiApplicationEndpoint, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + Endpoint.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAiApplicationAgents( + ListAiApplicationAgentsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAiApplicationAgentsResponse) { + requests.add(request); + responseObserver.onNext(((ListAiApplicationAgentsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAiApplicationAgents, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListAiApplicationAgentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAiApplicationMcpServers( + ListAiApplicationMcpServersRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAiApplicationMcpServersResponse) { + requests.add(request); + responseObserver.onNext(((ListAiApplicationMcpServersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAiApplicationMcpServers, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAiApplicationMcpServersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAiApplicationEndpoints( + ListAiApplicationEndpointsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAiApplicationEndpointsResponse) { + requests.add(request); + responseObserver.onNext(((ListAiApplicationEndpointsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAiApplicationEndpoints, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + ListAiApplicationEndpointsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-agentregistryendpoint/grpc-google-cloud-agentregistryendpoint-v1/pom.xml b/java-agentregistryendpoint/grpc-google-cloud-agentregistryendpoint-v1/pom.xml new file mode 100644 index 000000000000..8f09f63b0341 --- /dev/null +++ b/java-agentregistryendpoint/grpc-google-cloud-agentregistryendpoint-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-agentregistryendpoint-v1 + 0.1.0-SNAPSHOT + grpc-google-cloud-agentregistryendpoint-v1 + GRPC library for google-cloud-agentregistryendpoint + + com.google.cloud + google-cloud-agentregistryendpoint-parent + 0.1.0-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-agentregistryendpoint-v1 + + + com.google.guava + guava + + + diff --git a/java-agentregistryendpoint/grpc-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointGrpc.java b/java-agentregistryendpoint/grpc-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointGrpc.java new file mode 100644 index 000000000000..ee50a8f768aa --- /dev/null +++ b/java-agentregistryendpoint/grpc-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointGrpc.java @@ -0,0 +1,1065 @@ +/* + * 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; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * 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.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class AgentRegistryEndpointGrpc { + + private AgentRegistryEndpointGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.agentregistryendpoint.v1.AgentRegistryEndpoint"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest, + com.google.cloud.agentregistry.v1.McpServer> + getGetAiApplicationMcpServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAiApplicationMcpServer", + requestType = + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest.class, + responseType = com.google.cloud.agentregistry.v1.McpServer.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest, + com.google.cloud.agentregistry.v1.McpServer> + getGetAiApplicationMcpServerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest, + com.google.cloud.agentregistry.v1.McpServer> + getGetAiApplicationMcpServerMethod; + if ((getGetAiApplicationMcpServerMethod = + AgentRegistryEndpointGrpc.getGetAiApplicationMcpServerMethod) + == null) { + synchronized (AgentRegistryEndpointGrpc.class) { + if ((getGetAiApplicationMcpServerMethod = + AgentRegistryEndpointGrpc.getGetAiApplicationMcpServerMethod) + == null) { + AgentRegistryEndpointGrpc.getGetAiApplicationMcpServerMethod = + getGetAiApplicationMcpServerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAiApplicationMcpServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistryendpoint.v1 + .GetAiApplicationMcpServerRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.McpServer.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryEndpointMethodDescriptorSupplier( + "GetAiApplicationMcpServer")) + .build(); + } + } + } + return getGetAiApplicationMcpServerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest, + com.google.cloud.agentregistry.v1.Endpoint> + getGetAiApplicationEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAiApplicationEndpoint", + requestType = com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest.class, + responseType = com.google.cloud.agentregistry.v1.Endpoint.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest, + com.google.cloud.agentregistry.v1.Endpoint> + getGetAiApplicationEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest, + com.google.cloud.agentregistry.v1.Endpoint> + getGetAiApplicationEndpointMethod; + if ((getGetAiApplicationEndpointMethod = + AgentRegistryEndpointGrpc.getGetAiApplicationEndpointMethod) + == null) { + synchronized (AgentRegistryEndpointGrpc.class) { + if ((getGetAiApplicationEndpointMethod = + AgentRegistryEndpointGrpc.getGetAiApplicationEndpointMethod) + == null) { + AgentRegistryEndpointGrpc.getGetAiApplicationEndpointMethod = + getGetAiApplicationEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAiApplicationEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistryendpoint.v1 + .GetAiApplicationEndpointRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.Endpoint.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryEndpointMethodDescriptorSupplier( + "GetAiApplicationEndpoint")) + .build(); + } + } + } + return getGetAiApplicationEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse> + getListAiApplicationAgentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAiApplicationAgents", + requestType = com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest.class, + responseType = + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse> + getListAiApplicationAgentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse> + getListAiApplicationAgentsMethod; + if ((getListAiApplicationAgentsMethod = + AgentRegistryEndpointGrpc.getListAiApplicationAgentsMethod) + == null) { + synchronized (AgentRegistryEndpointGrpc.class) { + if ((getListAiApplicationAgentsMethod = + AgentRegistryEndpointGrpc.getListAiApplicationAgentsMethod) + == null) { + AgentRegistryEndpointGrpc.getListAiApplicationAgentsMethod = + getListAiApplicationAgentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAiApplicationAgents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistryendpoint.v1 + .ListAiApplicationAgentsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistryendpoint.v1 + .ListAiApplicationAgentsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryEndpointMethodDescriptorSupplier( + "ListAiApplicationAgents")) + .build(); + } + } + } + return getListAiApplicationAgentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse> + getListAiApplicationMcpServersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAiApplicationMcpServers", + requestType = + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest.class, + responseType = + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse> + getListAiApplicationMcpServersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse> + getListAiApplicationMcpServersMethod; + if ((getListAiApplicationMcpServersMethod = + AgentRegistryEndpointGrpc.getListAiApplicationMcpServersMethod) + == null) { + synchronized (AgentRegistryEndpointGrpc.class) { + if ((getListAiApplicationMcpServersMethod = + AgentRegistryEndpointGrpc.getListAiApplicationMcpServersMethod) + == null) { + AgentRegistryEndpointGrpc.getListAiApplicationMcpServersMethod = + getListAiApplicationMcpServersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAiApplicationMcpServers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistryendpoint.v1 + .ListAiApplicationMcpServersRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistryendpoint.v1 + .ListAiApplicationMcpServersResponse.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryEndpointMethodDescriptorSupplier( + "ListAiApplicationMcpServers")) + .build(); + } + } + } + return getListAiApplicationMcpServersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse> + getListAiApplicationEndpointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAiApplicationEndpoints", + requestType = + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest.class, + responseType = + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse> + getListAiApplicationEndpointsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse> + getListAiApplicationEndpointsMethod; + if ((getListAiApplicationEndpointsMethod = + AgentRegistryEndpointGrpc.getListAiApplicationEndpointsMethod) + == null) { + synchronized (AgentRegistryEndpointGrpc.class) { + if ((getListAiApplicationEndpointsMethod = + AgentRegistryEndpointGrpc.getListAiApplicationEndpointsMethod) + == null) { + AgentRegistryEndpointGrpc.getListAiApplicationEndpointsMethod = + getListAiApplicationEndpointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAiApplicationEndpoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistryendpoint.v1 + .ListAiApplicationEndpointsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistryendpoint.v1 + .ListAiApplicationEndpointsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryEndpointMethodDescriptorSupplier( + "ListAiApplicationEndpoints")) + .build(); + } + } + } + return getListAiApplicationEndpointsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AgentRegistryEndpointStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AgentRegistryEndpointStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryEndpointStub(channel, callOptions); + } + }; + return AgentRegistryEndpointStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static AgentRegistryEndpointBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AgentRegistryEndpointBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryEndpointBlockingV2Stub(channel, callOptions); + } + }; + return AgentRegistryEndpointBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AgentRegistryEndpointBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AgentRegistryEndpointBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryEndpointBlockingStub(channel, callOptions); + } + }; + return AgentRegistryEndpointBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AgentRegistryEndpointFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AgentRegistryEndpointFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryEndpointFutureStub(channel, callOptions); + } + }; + return AgentRegistryEndpointFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * 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.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Gets an MCP server active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + default void getAiApplicationMcpServer( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAiApplicationMcpServerMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets an endpoint active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + default void getAiApplicationEndpoint( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAiApplicationEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists agents active within the localized dataplane of the AI Application.
+     * 
+ */ + default void listAiApplicationAgents( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAiApplicationAgentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists MCP servers active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + default void listAiApplicationMcpServers( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAiApplicationMcpServersMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists endpoints active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + default void listAiApplicationEndpoints( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAiApplicationEndpointsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AgentRegistryEndpoint. + * + *
+   * 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.
+   * 
+ */ + public abstract static class AgentRegistryEndpointImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return AgentRegistryEndpointGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AgentRegistryEndpoint. + * + *
+   * 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.
+   * 
+ */ + public static final class AgentRegistryEndpointStub + extends io.grpc.stub.AbstractAsyncStub { + private AgentRegistryEndpointStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AgentRegistryEndpointStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryEndpointStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets an MCP server active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public void getAiApplicationMcpServer( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAiApplicationMcpServerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an endpoint active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public void getAiApplicationEndpoint( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAiApplicationEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists agents active within the localized dataplane of the AI Application.
+     * 
+ */ + public void listAiApplicationAgents( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAiApplicationAgentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists MCP servers active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public void listAiApplicationMcpServers( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAiApplicationMcpServersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists endpoints active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public void listAiApplicationEndpoints( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAiApplicationEndpointsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AgentRegistryEndpoint. + * + *
+   * 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.
+   * 
+ */ + public static final class AgentRegistryEndpointBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private AgentRegistryEndpointBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AgentRegistryEndpointBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryEndpointBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Gets an MCP server active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.McpServer getAiApplicationMcpServer( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAiApplicationMcpServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an endpoint active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Endpoint getAiApplicationEndpoint( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAiApplicationEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists agents active within the localized dataplane of the AI Application.
+     * 
+ */ + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + listAiApplicationAgents( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAiApplicationAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists MCP servers active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + listAiApplicationMcpServers( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAiApplicationMcpServersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists endpoints active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + listAiApplicationEndpoints( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAiApplicationEndpointsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service AgentRegistryEndpoint. + * + *
+   * 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.
+   * 
+ */ + public static final class AgentRegistryEndpointBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AgentRegistryEndpointBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AgentRegistryEndpointBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryEndpointBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets an MCP server active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.McpServer getAiApplicationMcpServer( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAiApplicationMcpServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an endpoint active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Endpoint getAiApplicationEndpoint( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAiApplicationEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists agents active within the localized dataplane of the AI Application.
+     * 
+ */ + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + listAiApplicationAgents( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAiApplicationAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists MCP servers active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + listAiApplicationMcpServers( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAiApplicationMcpServersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists endpoints active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + listAiApplicationEndpoints( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAiApplicationEndpointsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * AgentRegistryEndpoint. + * + *
+   * 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.
+   * 
+ */ + public static final class AgentRegistryEndpointFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AgentRegistryEndpointFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AgentRegistryEndpointFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryEndpointFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets an MCP server active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.McpServer> + getAiApplicationMcpServer( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAiApplicationMcpServerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an endpoint active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.Endpoint> + getAiApplicationEndpoint( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAiApplicationEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists agents active within the localized dataplane of the AI Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse> + listAiApplicationAgents( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAiApplicationAgentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists MCP servers active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse> + listAiApplicationMcpServers( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAiApplicationMcpServersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists endpoints active within the localized dataplane of the AI
+     * Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse> + listAiApplicationEndpoints( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAiApplicationEndpointsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_AI_APPLICATION_MCP_SERVER = 0; + private static final int METHODID_GET_AI_APPLICATION_ENDPOINT = 1; + private static final int METHODID_LIST_AI_APPLICATION_AGENTS = 2; + private static final int METHODID_LIST_AI_APPLICATION_MCP_SERVERS = 3; + private static final int METHODID_LIST_AI_APPLICATION_ENDPOINTS = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_AI_APPLICATION_MCP_SERVER: + serviceImpl.getAiApplicationMcpServer( + (com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_AI_APPLICATION_ENDPOINT: + serviceImpl.getAiApplicationEndpoint( + (com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_AI_APPLICATION_AGENTS: + serviceImpl.listAiApplicationAgents( + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse>) + responseObserver); + break; + case METHODID_LIST_AI_APPLICATION_MCP_SERVERS: + serviceImpl.listAiApplicationMcpServers( + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.agentregistryendpoint.v1 + .ListAiApplicationMcpServersResponse>) + responseObserver); + break; + case METHODID_LIST_AI_APPLICATION_ENDPOINTS: + serviceImpl.listAiApplicationEndpoints( + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetAiApplicationMcpServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest, + com.google.cloud.agentregistry.v1.McpServer>( + service, METHODID_GET_AI_APPLICATION_MCP_SERVER))) + .addMethod( + getGetAiApplicationEndpointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest, + com.google.cloud.agentregistry.v1.Endpoint>( + service, METHODID_GET_AI_APPLICATION_ENDPOINT))) + .addMethod( + getListAiApplicationAgentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse>( + service, METHODID_LIST_AI_APPLICATION_AGENTS))) + .addMethod( + getListAiApplicationMcpServersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse>( + service, METHODID_LIST_AI_APPLICATION_MCP_SERVERS))) + .addMethod( + getListAiApplicationEndpointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse>( + service, METHODID_LIST_AI_APPLICATION_ENDPOINTS))) + .build(); + } + + private abstract static class AgentRegistryEndpointBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AgentRegistryEndpointBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AgentRegistryEndpoint"); + } + } + + private static final class AgentRegistryEndpointFileDescriptorSupplier + extends AgentRegistryEndpointBaseDescriptorSupplier { + AgentRegistryEndpointFileDescriptorSupplier() {} + } + + private static final class AgentRegistryEndpointMethodDescriptorSupplier + extends AgentRegistryEndpointBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AgentRegistryEndpointMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AgentRegistryEndpointGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AgentRegistryEndpointFileDescriptorSupplier()) + .addMethod(getGetAiApplicationMcpServerMethod()) + .addMethod(getGetAiApplicationEndpointMethod()) + .addMethod(getListAiApplicationAgentsMethod()) + .addMethod(getListAiApplicationMcpServersMethod()) + .addMethod(getListAiApplicationEndpointsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-agentregistryendpoint/pom.xml b/java-agentregistryendpoint/pom.xml new file mode 100644 index 000000000000..27f28291ecde --- /dev/null +++ b/java-agentregistryendpoint/pom.xml @@ -0,0 +1,63 @@ + + + 4.0.0 + com.google.cloud + google-cloud-agentregistryendpoint-parent + pom + 0.1.0-SNAPSHOT + Google Agent Registry Endpoint Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.98.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-agentregistryendpoint-parent + + + + + + + com.google.cloud + google-cloud-agentregistryendpoint + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-agentregistryendpoint-v1 + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-agentregistryendpoint-v1 + 0.1.0-SNAPSHOT + + + + com.google.api.grpc + proto-google-cloud-agentregistry-v1 + 0.11.0-SNAPSHOT + + + + + + + google-cloud-agentregistryendpoint + grpc-google-cloud-agentregistryendpoint-v1 + proto-google-cloud-agentregistryendpoint-v1 + + google-cloud-agentregistryendpoint-bom + + + \ No newline at end of file diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/clirr-ignored-differences.xml b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..b3fa43d27a70 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/agentregistryendpoint/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/agentregistryendpoint/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/agentregistryendpoint/v1/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * clear() + ** + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * clearField(*) + ** + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * clone() + ** + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * setField(*) + ** + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/agentregistryendpoint/v1/** + * setUnknownFields(*) + ** + + diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/pom.xml b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/pom.xml new file mode 100644 index 000000000000..e47cc7def883 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-agentregistryendpoint-v1 + 0.1.0-SNAPSHOT + proto-google-cloud-agentregistryendpoint-v1 + Proto library for google-cloud-agentregistryendpoint + + com.google.cloud + google-cloud-agentregistryendpoint-parent + 0.1.0-SNAPSHOT + + + + com.google.api.grpc + proto-google-cloud-agentregistry-v1 + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + org.jspecify + jspecify + + + diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointServiceProto.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointServiceProto.java new file mode 100644 index 000000000000..5a01c3a44e80 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/AgentRegistryEndpointServiceProto.java @@ -0,0 +1,244 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +@com.google.protobuf.Generated +public final class AgentRegistryEndpointServiceProto extends com.google.protobuf.GeneratedFile { + private AgentRegistryEndpointServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AgentRegistryEndpointServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "Igoogle/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto\022%goo" + + "gle.cloud.agentregistryendpoint.v1\032\034goog" + + "le/api/annotations.proto\032\027google/api/cli" + + "ent.proto\032\037google/api/field_behavior.pro" + + "to\032)google/cloud/agentregistry/v1/agent.proto\032,google/cloud/agentregistry/v1/end" + + "point.proto\032.google/cloud/agentregistry/v1/mcp_server.proto\"6\n" + + " GetAiApplicationMcpServerRequest\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\002\"5\n" + + "\037GetAiApplicationEndpointRequest\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\002\"i\n" + + "\036ListAiApplicationAgentsRequest\022\024\n" + + "\006parent\030\001 \001(\tB\004\342A\001\002\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\n" + + "page_token\030\003 \001(\tB\004\342A\001\001\"p\n" + + "\037ListAiApplicationAgentsResponse\0224\n" + + "\006agents\030\001 \003(\0132$.google.cloud.agentregistry.v1.Agent\022\027\n" + + "\017next_page_token\030\002 \001(\t\"m\n" + + "\"ListAiApplicationMcpServersRequest\022\024\n" + + "\006parent\030\001 \001(\tB\004\342A\001\002\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\n" + + "page_token\030\003 \001(\tB\004\342A\001\001\"}\n" + + "#ListAiApplicationMcpServersResponse\022=\n" + + "\013mcp_servers\030\001 \003(\0132(.google.cloud.agentregistry.v1.McpServer\022\027\n" + + "\017next_page_token\030\002 \001(\t\"l\n" + + "!ListAiApplicationEndpointsRequest\022\024\n" + + "\006parent\030\001 \001(\tB\004\342A\001\002\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\n" + + "page_token\030\003 \001(\tB\004\342A\001\001\"y\n" + + "\"ListAiApplicationEndpointsResponse\022:\n" + + "\tendpoints\030\001 \003(\0132\'.google.cloud.agentregistry.v1.Endpoint\022\027\n" + + "\017next_page_token\030\002 \001(\t2\342\013\n" + + "\025AgentRegistryEndpoint\022\336\001\n" + + "\031GetAiApplicationMcpServer\022G.google.cloud.agentregistryendpoint.v1.G" + + "etAiApplicationMcpServerRequest\032(.google" + + ".cloud.agentregistry.v1.McpServer\"N\332A\004na" + + "me\202\323\344\223\002A\022?/v1/{name=projects/*/locations/*/aiApplications/*/mcpServers/*}\022\332\001\n" + + "\030GetAiApplicationEndpoint\022F.google.cloud.ag" + + "entregistryendpoint.v1.GetAiApplicationEndpointRequest\032\'.google.cloud.agentregis" + + "try.v1.Endpoint\"M\332A\004name\202\323\344\223\002@\022>/v1/{nam" + + "e=projects/*/locations/*/aiApplications/*/endpoints/*}\022\366\001\n" + + "\027ListAiApplicationAgents\022E.google.cloud.agentregistryendpoint." + + "v1.ListAiApplicationAgentsRequest\032F.google.cloud.agentregistryendpoint.v1.ListAi" + + "ApplicationAgentsResponse\"L\332A\006parent\202\323\344\223" + + "\002=\022;/v1/{parent=projects/*/locations/*/aiApplications/*}/agents\022\206\002\n" + + "\033ListAiApplicationMcpServers\022I.google.cloud.agentregi" + + "stryendpoint.v1.ListAiApplicationMcpServersRequest\032J.google.cloud.agentregistrye" + + "ndpoint.v1.ListAiApplicationMcpServersRe" + + "sponse\"P\332A\006parent\202\323\344\223\002A\022?/v1/{parent=pro" + + "jects/*/locations/*/aiApplications/*}/mcpServers\022\202\002\n" + + "\032ListAiApplicationEndpoints\022H.google.cloud.agentregistryendpoint.v1." + + "ListAiApplicationEndpointsRequest\032I.google.cloud.agentregistryendpoint.v1.ListAi" + + "ApplicationEndpointsResponse\"O\332A\006parent\202" + + "\323\344\223\002@\022>/v1/{parent=projects/*/locations/" + + "*/aiApplications/*}/endpoints\032\203\002\312A$agent" + + "registryendpoint.googleapis.com\322A\330\001https" + + "://www.googleapis.com/auth/agentregistry.read-only,https://www.googleapis.com/au" + + "th/agentregistry.read-write,https://www.googleapis.com/auth/cloud-platform,https" + + "://www.googleapis.com/auth/cloud-platform.read-onlyB\254\002\n" + + ")com.google.cloud.agentregistryendpoint.v1B!AgentRegistryEndpoint" + + "ServiceProtoP\001Z_cloud.google.com/go/agentregistryendpoint/apiv1/agentregistryend" + + "pointpb;agentregistryendpointpb\252\002%Google" + + ".Cloud.AgentRegistryEndpoint.V1\312\002%Google" + + "\\Cloud\\AgentRegistryEndpoint\\V1\352\002(Google" + + "::Cloud::AgentRegistryEndpoint::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.agentregistry.v1.AgentProto.getDescriptor(), + com.google.cloud.agentregistry.v1.EndpointProto.getDescriptor(), + com.google.cloud.agentregistry.v1.McpServerProto.getDescriptor(), + }); + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_descriptor, + new java.lang.String[] { + "Agents", "NextPageToken", + }); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_descriptor, + new java.lang.String[] { + "McpServers", "NextPageToken", + }); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_descriptor, + new java.lang.String[] { + "Endpoints", "NextPageToken", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.agentregistry.v1.AgentProto.getDescriptor(); + com.google.cloud.agentregistry.v1.EndpointProto.getDescriptor(); + com.google.cloud.agentregistry.v1.McpServerProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationEndpointRequest.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationEndpointRequest.java new file mode 100644 index 000000000000..fe6e01074d0d --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationEndpointRequest.java @@ -0,0 +1,624 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +/** + * + * + *
+ * Request message for getting an endpoint active within the localized
+ * dataplane of the AI Application.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest} + */ +@com.google.protobuf.Generated +public final class GetAiApplicationEndpointRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest) + GetAiApplicationEndpointRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetAiApplicationEndpointRequest"); + } + + // Use GetAiApplicationEndpointRequest.newBuilder() to construct. + private GetAiApplicationEndpointRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetAiApplicationEndpointRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest.class, + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the endpoint, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the endpoint, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest other = + (com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting an endpoint active within the localized
+   * dataplane of the AI Application.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest) + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest.class, + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationEndpointRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest + getDefaultInstanceForType() { + return com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest build() { + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest + buildPartial() { + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest result = + new com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest) { + return mergeFrom( + (com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest other) { + if (other + == com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the endpoint, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the endpoint, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the endpoint, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the endpoint, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the endpoint, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest) + private static final com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest(); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAiApplicationEndpointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationEndpointRequestOrBuilder.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationEndpointRequestOrBuilder.java new file mode 100644 index 000000000000..44ff8094020a --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationEndpointRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +@com.google.protobuf.Generated +public interface GetAiApplicationEndpointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the endpoint, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the endpoint, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationMcpServerRequest.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationMcpServerRequest.java new file mode 100644 index 000000000000..3919c65dd96c --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationMcpServerRequest.java @@ -0,0 +1,630 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +/** + * + * + *
+ * Request message for getting an MCP server active within the localized
+ * dataplane of the AI Application.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest} + */ +@com.google.protobuf.Generated +public final class GetAiApplicationMcpServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest) + GetAiApplicationMcpServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetAiApplicationMcpServerRequest"); + } + + // Use GetAiApplicationMcpServerRequest.newBuilder() to construct. + private GetAiApplicationMcpServerRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetAiApplicationMcpServerRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest.class, + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the MCP server, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the MCP server, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest other = + (com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting an MCP server active within the localized
+   * dataplane of the AI Application.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest) + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest.class, + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_GetAiApplicationMcpServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + getDefaultInstanceForType() { + return com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest build() { + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + buildPartial() { + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest result = + new com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest) { + return mergeFrom( + (com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest other) { + if (other + == com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the MCP server, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the MCP server, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the MCP server, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the MCP server, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the MCP server, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest) + private static final com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest(); + } + + public static com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAiApplicationMcpServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationMcpServerRequestOrBuilder.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationMcpServerRequestOrBuilder.java new file mode 100644 index 000000000000..15d3134ee2e7 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/GetAiApplicationMcpServerRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +@com.google.protobuf.Generated +public interface GetAiApplicationMcpServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the MCP server, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the MCP server, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsRequest.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsRequest.java new file mode 100644 index 000000000000..6f686d0af1ef --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsRequest.java @@ -0,0 +1,949 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +/** + * + * + *
+ * Request message for listing agents active within the localized dataplane.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest} + */ +@com.google.protobuf.Generated +public final class ListAiApplicationAgentsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest) + ListAiApplicationAgentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAiApplicationAgentsRequest"); + } + + // Use ListAiApplicationAgentsRequest.newBuilder() to construct. + private ListAiApplicationAgentsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAiApplicationAgentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of agents to return. The service may return
+   * fewer than this value. If unspecified or set to `0`, at most 50 agents are
+   * returned. The maximum value is 100; values above 100 are coerced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListAiApplicationAgents`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationAgents` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListAiApplicationAgents`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationAgents` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest other = + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for listing agents active within the localized dataplane.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest) + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest + getDefaultInstanceForType() { + return com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest build() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest buildPartial() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest result = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest) { + return mergeFrom( + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest other) { + if (other + == com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of agents to return. The service may return
+     * fewer than this value. If unspecified or set to `0`, at most 50 agents are
+     * returned. The maximum value is 100; values above 100 are coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of agents to return. The service may return
+     * fewer than this value. If unspecified or set to `0`, at most 50 agents are
+     * returned. The maximum value is 100; values above 100 are coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of agents to return. The service may return
+     * fewer than this value. If unspecified or set to `0`, at most 50 agents are
+     * returned. The maximum value is 100; values above 100 are coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAiApplicationAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationAgents` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAiApplicationAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationAgents` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAiApplicationAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationAgents` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAiApplicationAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationAgents` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListAiApplicationAgents`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationAgents` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest) + private static final com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest(); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAiApplicationAgentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsRequestOrBuilder.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsRequestOrBuilder.java new file mode 100644 index 000000000000..12ed701b8f0d --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +@com.google.protobuf.Generated +public interface ListAiApplicationAgentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of agents to return. The service may return
+   * fewer than this value. If unspecified or set to `0`, at most 50 agents are
+   * returned. The maximum value is 100; values above 100 are coerced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListAiApplicationAgents`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationAgents` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListAiApplicationAgents`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationAgents` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsResponse.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsResponse.java new file mode 100644 index 000000000000..3d717887efdc --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsResponse.java @@ -0,0 +1,1136 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +/** + * + * + *
+ * Response message for listing agents active within the localized dataplane.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse} + */ +@com.google.protobuf.Generated +public final class ListAiApplicationAgentsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse) + ListAiApplicationAgentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAiApplicationAgentsResponse"); + } + + // Use ListAiApplicationAgentsResponse.newBuilder() to construct. + private ListAiApplicationAgentsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAiApplicationAgentsResponse() { + agents_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse.Builder + .class); + } + + public static final int AGENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List agents_; + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + @java.lang.Override + public java.util.List getAgentsList() { + return agents_; + } + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + @java.lang.Override + public java.util.List + getAgentsOrBuilderList() { + return agents_; + } + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + @java.lang.Override + public int getAgentsCount() { + return agents_.size(); + } + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent getAgents(int index) { + return agents_.get(index); + } + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.AgentOrBuilder getAgentsOrBuilder(int index) { + return agents_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < agents_.size(); i++) { + output.writeMessage(1, agents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < agents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, agents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse other = + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse) obj; + + if (!getAgentsList().equals(other.getAgentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAgentsCount() > 0) { + hash = (37 * hash) + AGENTS_FIELD_NUMBER; + hash = (53 * hash) + getAgentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for listing agents active within the localized dataplane.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse) + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (agentsBuilder_ == null) { + agents_ = java.util.Collections.emptyList(); + } else { + agents_ = null; + agentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationAgentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + getDefaultInstanceForType() { + return com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse build() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + buildPartial() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse result = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse result) { + if (agentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + agents_ = java.util.Collections.unmodifiableList(agents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.agents_ = agents_; + } else { + result.agents_ = agentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse) { + return mergeFrom( + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse other) { + if (other + == com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + .getDefaultInstance()) return this; + if (agentsBuilder_ == null) { + if (!other.agents_.isEmpty()) { + if (agents_.isEmpty()) { + agents_ = other.agents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAgentsIsMutable(); + agents_.addAll(other.agents_); + } + onChanged(); + } + } else { + if (!other.agents_.isEmpty()) { + if (agentsBuilder_.isEmpty()) { + agentsBuilder_.dispose(); + agentsBuilder_ = null; + agents_ = other.agents_; + bitField0_ = (bitField0_ & ~0x00000001); + agentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAgentsFieldBuilder() + : null; + } else { + agentsBuilder_.addAllMessages(other.agents_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.agentregistry.v1.Agent m = + input.readMessage( + com.google.cloud.agentregistry.v1.Agent.parser(), extensionRegistry); + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + agents_.add(m); + } else { + agentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List agents_ = + java.util.Collections.emptyList(); + + private void ensureAgentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + agents_ = new java.util.ArrayList(agents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Agent, + com.google.cloud.agentregistry.v1.Agent.Builder, + com.google.cloud.agentregistry.v1.AgentOrBuilder> + agentsBuilder_; + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public java.util.List getAgentsList() { + if (agentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(agents_); + } else { + return agentsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public int getAgentsCount() { + if (agentsBuilder_ == null) { + return agents_.size(); + } else { + return agentsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public com.google.cloud.agentregistry.v1.Agent getAgents(int index) { + if (agentsBuilder_ == null) { + return agents_.get(index); + } else { + return agentsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public Builder setAgents(int index, com.google.cloud.agentregistry.v1.Agent value) { + if (agentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentsIsMutable(); + agents_.set(index, value); + onChanged(); + } else { + agentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public Builder setAgents( + int index, com.google.cloud.agentregistry.v1.Agent.Builder builderForValue) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + agents_.set(index, builderForValue.build()); + onChanged(); + } else { + agentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public Builder addAgents(com.google.cloud.agentregistry.v1.Agent value) { + if (agentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentsIsMutable(); + agents_.add(value); + onChanged(); + } else { + agentsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public Builder addAgents(int index, com.google.cloud.agentregistry.v1.Agent value) { + if (agentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentsIsMutable(); + agents_.add(index, value); + onChanged(); + } else { + agentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public Builder addAgents(com.google.cloud.agentregistry.v1.Agent.Builder builderForValue) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + agents_.add(builderForValue.build()); + onChanged(); + } else { + agentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public Builder addAgents( + int index, com.google.cloud.agentregistry.v1.Agent.Builder builderForValue) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + agents_.add(index, builderForValue.build()); + onChanged(); + } else { + agentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public Builder addAllAgents( + java.lang.Iterable values) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, agents_); + onChanged(); + } else { + agentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public Builder clearAgents() { + if (agentsBuilder_ == null) { + agents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + agentsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public Builder removeAgents(int index) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + agents_.remove(index); + onChanged(); + } else { + agentsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public com.google.cloud.agentregistry.v1.Agent.Builder getAgentsBuilder(int index) { + return internalGetAgentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public com.google.cloud.agentregistry.v1.AgentOrBuilder getAgentsOrBuilder(int index) { + if (agentsBuilder_ == null) { + return agents_.get(index); + } else { + return agentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public java.util.List + getAgentsOrBuilderList() { + if (agentsBuilder_ != null) { + return agentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(agents_); + } + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public com.google.cloud.agentregistry.v1.Agent.Builder addAgentsBuilder() { + return internalGetAgentsFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Agent.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public com.google.cloud.agentregistry.v1.Agent.Builder addAgentsBuilder(int index) { + return internalGetAgentsFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Agent.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of agents.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public java.util.List getAgentsBuilderList() { + return internalGetAgentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Agent, + com.google.cloud.agentregistry.v1.Agent.Builder, + com.google.cloud.agentregistry.v1.AgentOrBuilder> + internalGetAgentsFieldBuilder() { + if (agentsBuilder_ == null) { + agentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Agent, + com.google.cloud.agentregistry.v1.Agent.Builder, + com.google.cloud.agentregistry.v1.AgentOrBuilder>( + agents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + agents_ = null; + } + return agentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse) + private static final com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse(); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAiApplicationAgentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsResponseOrBuilder.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsResponseOrBuilder.java new file mode 100644 index 000000000000..69790e44c207 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationAgentsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +@com.google.protobuf.Generated +public interface ListAiApplicationAgentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + java.util.List getAgentsList(); + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + com.google.cloud.agentregistry.v1.Agent getAgents(int index); + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + int getAgentsCount(); + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + java.util.List + getAgentsOrBuilderList(); + + /** + * + * + *
+   * The list of agents.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + com.google.cloud.agentregistry.v1.AgentOrBuilder getAgentsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsRequest.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsRequest.java new file mode 100644 index 000000000000..c8e92a3160f9 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsRequest.java @@ -0,0 +1,970 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +/** + * + * + *
+ * Request message for listing endpoints active within the localized
+ * dataplane.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest} + */ +@com.google.protobuf.Generated +public final class ListAiApplicationEndpointsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest) + ListAiApplicationEndpointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAiApplicationEndpointsRequest"); + } + + // Use ListAiApplicationEndpointsRequest.newBuilder() to construct. + private ListAiApplicationEndpointsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAiApplicationEndpointsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of endpoints to return. The service may return
+   * fewer than this value. If unspecified or set to `0`, at most 50 endpoints
+   * are returned. The maximum value is 100; values above 100 are coerced to
+   * 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAiApplicationEndpoints` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationEndpoints` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAiApplicationEndpoints` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationEndpoints` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest other = + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for listing endpoints active within the localized
+   * dataplane.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest) + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + getDefaultInstanceForType() { + return com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest build() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + buildPartial() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest result = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest) { + return mergeFrom( + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest other) { + if (other + == com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of endpoints to return. The service may return
+     * fewer than this value. If unspecified or set to `0`, at most 50 endpoints
+     * are returned. The maximum value is 100; values above 100 are coerced to
+     * 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of endpoints to return. The service may return
+     * fewer than this value. If unspecified or set to `0`, at most 50 endpoints
+     * are returned. The maximum value is 100; values above 100 are coerced to
+     * 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of endpoints to return. The service may return
+     * fewer than this value. If unspecified or set to `0`, at most 50 endpoints
+     * are returned. The maximum value is 100; values above 100 are coerced to
+     * 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationEndpoints` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationEndpoints` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationEndpoints` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationEndpoints` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationEndpoints` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationEndpoints` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationEndpoints` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationEndpoints` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationEndpoints` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationEndpoints` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest) + private static final com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest(); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAiApplicationEndpointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsRequestOrBuilder.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsRequestOrBuilder.java new file mode 100644 index 000000000000..d6ab1216aaa3 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +@com.google.protobuf.Generated +public interface ListAiApplicationEndpointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of endpoints to return. The service may return
+   * fewer than this value. If unspecified or set to `0`, at most 50 endpoints
+   * are returned. The maximum value is 100; values above 100 are coerced to
+   * 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAiApplicationEndpoints` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationEndpoints` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAiApplicationEndpoints` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationEndpoints` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsResponse.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsResponse.java new file mode 100644 index 000000000000..78541cdd32ba --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsResponse.java @@ -0,0 +1,1147 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +/** + * + * + *
+ * Response message for listing endpoints active within the localized
+ * dataplane.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse} + */ +@com.google.protobuf.Generated +public final class ListAiApplicationEndpointsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse) + ListAiApplicationEndpointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAiApplicationEndpointsResponse"); + } + + // Use ListAiApplicationEndpointsResponse.newBuilder() to construct. + private ListAiApplicationEndpointsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAiApplicationEndpointsResponse() { + endpoints_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse.Builder + .class); + } + + public static final int ENDPOINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List endpoints_; + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public java.util.List getEndpointsList() { + return endpoints_; + } + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public java.util.List + getEndpointsOrBuilderList() { + return endpoints_; + } + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public int getEndpointsCount() { + return endpoints_.size(); + } + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Endpoint getEndpoints(int index) { + return endpoints_.get(index); + } + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.EndpointOrBuilder getEndpointsOrBuilder(int index) { + return endpoints_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < endpoints_.size(); i++) { + output.writeMessage(1, endpoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < endpoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse other = + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse) obj; + + if (!getEndpointsList().equals(other.getEndpointsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEndpointsCount() > 0) { + hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getEndpointsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for listing endpoints active within the localized
+   * dataplane.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse) + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (endpointsBuilder_ == null) { + endpoints_ = java.util.Collections.emptyList(); + } else { + endpoints_ = null; + endpointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationEndpointsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + getDefaultInstanceForType() { + return com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse build() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + buildPartial() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse result = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse result) { + if (endpointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + endpoints_ = java.util.Collections.unmodifiableList(endpoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.endpoints_ = endpoints_; + } else { + result.endpoints_ = endpointsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse) { + return mergeFrom( + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse other) { + if (other + == com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + .getDefaultInstance()) return this; + if (endpointsBuilder_ == null) { + if (!other.endpoints_.isEmpty()) { + if (endpoints_.isEmpty()) { + endpoints_ = other.endpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEndpointsIsMutable(); + endpoints_.addAll(other.endpoints_); + } + onChanged(); + } + } else { + if (!other.endpoints_.isEmpty()) { + if (endpointsBuilder_.isEmpty()) { + endpointsBuilder_.dispose(); + endpointsBuilder_ = null; + endpoints_ = other.endpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + endpointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEndpointsFieldBuilder() + : null; + } else { + endpointsBuilder_.addAllMessages(other.endpoints_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.agentregistry.v1.Endpoint m = + input.readMessage( + com.google.cloud.agentregistry.v1.Endpoint.parser(), extensionRegistry); + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(m); + } else { + endpointsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List endpoints_ = + java.util.Collections.emptyList(); + + private void ensureEndpointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + endpoints_ = + new java.util.ArrayList(endpoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Endpoint, + com.google.cloud.agentregistry.v1.Endpoint.Builder, + com.google.cloud.agentregistry.v1.EndpointOrBuilder> + endpointsBuilder_; + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public java.util.List getEndpointsList() { + if (endpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpoints_); + } else { + return endpointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public int getEndpointsCount() { + if (endpointsBuilder_ == null) { + return endpoints_.size(); + } else { + return endpointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.agentregistry.v1.Endpoint getEndpoints(int index) { + if (endpointsBuilder_ == null) { + return endpoints_.get(index); + } else { + return endpointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public Builder setEndpoints(int index, com.google.cloud.agentregistry.v1.Endpoint value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.set(index, value); + onChanged(); + } else { + endpointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public Builder setEndpoints( + int index, com.google.cloud.agentregistry.v1.Endpoint.Builder builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public Builder addEndpoints(com.google.cloud.agentregistry.v1.Endpoint value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.add(value); + onChanged(); + } else { + endpointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public Builder addEndpoints(int index, com.google.cloud.agentregistry.v1.Endpoint value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.add(index, value); + onChanged(); + } else { + endpointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public Builder addEndpoints( + com.google.cloud.agentregistry.v1.Endpoint.Builder builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public Builder addEndpoints( + int index, com.google.cloud.agentregistry.v1.Endpoint.Builder builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public Builder addAllEndpoints( + java.lang.Iterable values) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpoints_); + onChanged(); + } else { + endpointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public Builder clearEndpoints() { + if (endpointsBuilder_ == null) { + endpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + endpointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public Builder removeEndpoints(int index) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.remove(index); + onChanged(); + } else { + endpointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.agentregistry.v1.Endpoint.Builder getEndpointsBuilder(int index) { + return internalGetEndpointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.agentregistry.v1.EndpointOrBuilder getEndpointsOrBuilder(int index) { + if (endpointsBuilder_ == null) { + return endpoints_.get(index); + } else { + return endpointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public java.util.List + getEndpointsOrBuilderList() { + if (endpointsBuilder_ != null) { + return endpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpoints_); + } + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.agentregistry.v1.Endpoint.Builder addEndpointsBuilder() { + return internalGetEndpointsFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Endpoint.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public com.google.cloud.agentregistry.v1.Endpoint.Builder addEndpointsBuilder(int index) { + return internalGetEndpointsFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Endpoint.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of endpoints.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public java.util.List + getEndpointsBuilderList() { + return internalGetEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Endpoint, + com.google.cloud.agentregistry.v1.Endpoint.Builder, + com.google.cloud.agentregistry.v1.EndpointOrBuilder> + internalGetEndpointsFieldBuilder() { + if (endpointsBuilder_ == null) { + endpointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Endpoint, + com.google.cloud.agentregistry.v1.Endpoint.Builder, + com.google.cloud.agentregistry.v1.EndpointOrBuilder>( + endpoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + endpoints_ = null; + } + return endpointsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse) + private static final com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse(); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAiApplicationEndpointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsResponseOrBuilder.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsResponseOrBuilder.java new file mode 100644 index 000000000000..b9088cdb7c77 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationEndpointsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +@com.google.protobuf.Generated +public interface ListAiApplicationEndpointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + java.util.List getEndpointsList(); + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + com.google.cloud.agentregistry.v1.Endpoint getEndpoints(int index); + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + int getEndpointsCount(); + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + java.util.List + getEndpointsOrBuilderList(); + + /** + * + * + *
+   * The list of endpoints.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + com.google.cloud.agentregistry.v1.EndpointOrBuilder getEndpointsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersRequest.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersRequest.java new file mode 100644 index 000000000000..99d683aee0aa --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersRequest.java @@ -0,0 +1,970 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +/** + * + * + *
+ * Request message for listing MCP servers active within the localized
+ * dataplane.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest} + */ +@com.google.protobuf.Generated +public final class ListAiApplicationMcpServersRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest) + ListAiApplicationMcpServersRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAiApplicationMcpServersRequest"); + } + + // Use ListAiApplicationMcpServersRequest.newBuilder() to construct. + private ListAiApplicationMcpServersRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAiApplicationMcpServersRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of MCP servers to return. The service may
+   * return fewer than this value. If unspecified or set to `0`, at most 50 MCP
+   * servers are returned. The maximum value is 100; values above 100 are
+   * coerced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAiApplicationMcpServers` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationMcpServers` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAiApplicationMcpServers` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationMcpServers` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest other = + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for listing MCP servers active within the localized
+   * dataplane.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest) + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + getDefaultInstanceForType() { + return com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest build() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + buildPartial() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest result = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest) { + return mergeFrom( + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest other) { + if (other + == com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource name, in the format
+     * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of MCP servers to return. The service may
+     * return fewer than this value. If unspecified or set to `0`, at most 50 MCP
+     * servers are returned. The maximum value is 100; values above 100 are
+     * coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of MCP servers to return. The service may
+     * return fewer than this value. If unspecified or set to `0`, at most 50 MCP
+     * servers are returned. The maximum value is 100; values above 100 are
+     * coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of MCP servers to return. The service may
+     * return fewer than this value. If unspecified or set to `0`, at most 50 MCP
+     * servers are returned. The maximum value is 100; values above 100 are
+     * coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationMcpServers` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationMcpServers` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationMcpServers` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationMcpServers` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationMcpServers` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationMcpServers` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationMcpServers` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationMcpServers` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAiApplicationMcpServers` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListAiApplicationMcpServers` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest) + private static final com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest(); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAiApplicationMcpServersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersRequestOrBuilder.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersRequestOrBuilder.java new file mode 100644 index 000000000000..acf694f2eca0 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +@com.google.protobuf.Generated +public interface ListAiApplicationMcpServersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name, in the format
+   * `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of MCP servers to return. The service may
+   * return fewer than this value. If unspecified or set to `0`, at most 50 MCP
+   * servers are returned. The maximum value is 100; values above 100 are
+   * coerced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAiApplicationMcpServers` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationMcpServers` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAiApplicationMcpServers` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListAiApplicationMcpServers` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersResponse.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersResponse.java new file mode 100644 index 000000000000..40b7bd5179e1 --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersResponse.java @@ -0,0 +1,1148 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +/** + * + * + *
+ * Response message for listing MCP servers active within the localized
+ * dataplane.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse} + */ +@com.google.protobuf.Generated +public final class ListAiApplicationMcpServersResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse) + ListAiApplicationMcpServersResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAiApplicationMcpServersResponse"); + } + + // Use ListAiApplicationMcpServersResponse.newBuilder() to construct. + private ListAiApplicationMcpServersResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAiApplicationMcpServersResponse() { + mcpServers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse.Builder + .class); + } + + public static final int MCP_SERVERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List mcpServers_; + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public java.util.List getMcpServersList() { + return mcpServers_; + } + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public java.util.List + getMcpServersOrBuilderList() { + return mcpServers_; + } + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public int getMcpServersCount() { + return mcpServers_.size(); + } + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer getMcpServers(int index) { + return mcpServers_.get(index); + } + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServerOrBuilder getMcpServersOrBuilder(int index) { + return mcpServers_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < mcpServers_.size(); i++) { + output.writeMessage(1, mcpServers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < mcpServers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, mcpServers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse other = + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse) obj; + + if (!getMcpServersList().equals(other.getMcpServersList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMcpServersCount() > 0) { + hash = (37 * hash) + MCP_SERVERS_FIELD_NUMBER; + hash = (53 * hash) + getMcpServersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for listing MCP servers active within the localized
+   * dataplane.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse) + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse.class, + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (mcpServersBuilder_ == null) { + mcpServers_ = java.util.Collections.emptyList(); + } else { + mcpServers_ = null; + mcpServersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointServiceProto + .internal_static_google_cloud_agentregistryendpoint_v1_ListAiApplicationMcpServersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + getDefaultInstanceForType() { + return com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse build() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + buildPartial() { + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse result = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse result) { + if (mcpServersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + mcpServers_ = java.util.Collections.unmodifiableList(mcpServers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.mcpServers_ = mcpServers_; + } else { + result.mcpServers_ = mcpServersBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse) { + return mergeFrom( + (com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse other) { + if (other + == com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + .getDefaultInstance()) return this; + if (mcpServersBuilder_ == null) { + if (!other.mcpServers_.isEmpty()) { + if (mcpServers_.isEmpty()) { + mcpServers_ = other.mcpServers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMcpServersIsMutable(); + mcpServers_.addAll(other.mcpServers_); + } + onChanged(); + } + } else { + if (!other.mcpServers_.isEmpty()) { + if (mcpServersBuilder_.isEmpty()) { + mcpServersBuilder_.dispose(); + mcpServersBuilder_ = null; + mcpServers_ = other.mcpServers_; + bitField0_ = (bitField0_ & ~0x00000001); + mcpServersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMcpServersFieldBuilder() + : null; + } else { + mcpServersBuilder_.addAllMessages(other.mcpServers_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.agentregistry.v1.McpServer m = + input.readMessage( + com.google.cloud.agentregistry.v1.McpServer.parser(), extensionRegistry); + if (mcpServersBuilder_ == null) { + ensureMcpServersIsMutable(); + mcpServers_.add(m); + } else { + mcpServersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List mcpServers_ = + java.util.Collections.emptyList(); + + private void ensureMcpServersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + mcpServers_ = + new java.util.ArrayList(mcpServers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.McpServer, + com.google.cloud.agentregistry.v1.McpServer.Builder, + com.google.cloud.agentregistry.v1.McpServerOrBuilder> + mcpServersBuilder_; + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public java.util.List getMcpServersList() { + if (mcpServersBuilder_ == null) { + return java.util.Collections.unmodifiableList(mcpServers_); + } else { + return mcpServersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public int getMcpServersCount() { + if (mcpServersBuilder_ == null) { + return mcpServers_.size(); + } else { + return mcpServersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public com.google.cloud.agentregistry.v1.McpServer getMcpServers(int index) { + if (mcpServersBuilder_ == null) { + return mcpServers_.get(index); + } else { + return mcpServersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public Builder setMcpServers(int index, com.google.cloud.agentregistry.v1.McpServer value) { + if (mcpServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMcpServersIsMutable(); + mcpServers_.set(index, value); + onChanged(); + } else { + mcpServersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public Builder setMcpServers( + int index, com.google.cloud.agentregistry.v1.McpServer.Builder builderForValue) { + if (mcpServersBuilder_ == null) { + ensureMcpServersIsMutable(); + mcpServers_.set(index, builderForValue.build()); + onChanged(); + } else { + mcpServersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public Builder addMcpServers(com.google.cloud.agentregistry.v1.McpServer value) { + if (mcpServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMcpServersIsMutable(); + mcpServers_.add(value); + onChanged(); + } else { + mcpServersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public Builder addMcpServers(int index, com.google.cloud.agentregistry.v1.McpServer value) { + if (mcpServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMcpServersIsMutable(); + mcpServers_.add(index, value); + onChanged(); + } else { + mcpServersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public Builder addMcpServers( + com.google.cloud.agentregistry.v1.McpServer.Builder builderForValue) { + if (mcpServersBuilder_ == null) { + ensureMcpServersIsMutable(); + mcpServers_.add(builderForValue.build()); + onChanged(); + } else { + mcpServersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public Builder addMcpServers( + int index, com.google.cloud.agentregistry.v1.McpServer.Builder builderForValue) { + if (mcpServersBuilder_ == null) { + ensureMcpServersIsMutable(); + mcpServers_.add(index, builderForValue.build()); + onChanged(); + } else { + mcpServersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public Builder addAllMcpServers( + java.lang.Iterable values) { + if (mcpServersBuilder_ == null) { + ensureMcpServersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mcpServers_); + onChanged(); + } else { + mcpServersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public Builder clearMcpServers() { + if (mcpServersBuilder_ == null) { + mcpServers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + mcpServersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public Builder removeMcpServers(int index) { + if (mcpServersBuilder_ == null) { + ensureMcpServersIsMutable(); + mcpServers_.remove(index); + onChanged(); + } else { + mcpServersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public com.google.cloud.agentregistry.v1.McpServer.Builder getMcpServersBuilder(int index) { + return internalGetMcpServersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public com.google.cloud.agentregistry.v1.McpServerOrBuilder getMcpServersOrBuilder(int index) { + if (mcpServersBuilder_ == null) { + return mcpServers_.get(index); + } else { + return mcpServersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public java.util.List + getMcpServersOrBuilderList() { + if (mcpServersBuilder_ != null) { + return mcpServersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mcpServers_); + } + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public com.google.cloud.agentregistry.v1.McpServer.Builder addMcpServersBuilder() { + return internalGetMcpServersFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.McpServer.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public com.google.cloud.agentregistry.v1.McpServer.Builder addMcpServersBuilder(int index) { + return internalGetMcpServersFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.McpServer.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of MCP servers.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public java.util.List + getMcpServersBuilderList() { + return internalGetMcpServersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.McpServer, + com.google.cloud.agentregistry.v1.McpServer.Builder, + com.google.cloud.agentregistry.v1.McpServerOrBuilder> + internalGetMcpServersFieldBuilder() { + if (mcpServersBuilder_ == null) { + mcpServersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.McpServer, + com.google.cloud.agentregistry.v1.McpServer.Builder, + com.google.cloud.agentregistry.v1.McpServerOrBuilder>( + mcpServers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + mcpServers_ = null; + } + return mcpServersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse) + private static final com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse(); + } + + public static com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAiApplicationMcpServersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersResponseOrBuilder.java b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersResponseOrBuilder.java new file mode 100644 index 000000000000..ce747a07903b --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/java/com/google/cloud/agentregistryendpoint/v1/ListAiApplicationMcpServersResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.agentregistryendpoint.v1; + +@com.google.protobuf.Generated +public interface ListAiApplicationMcpServersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + java.util.List getMcpServersList(); + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + com.google.cloud.agentregistry.v1.McpServer getMcpServers(int index); + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + int getMcpServersCount(); + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + java.util.List + getMcpServersOrBuilderList(); + + /** + * + * + *
+   * The list of MCP servers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + com.google.cloud.agentregistry.v1.McpServerOrBuilder getMcpServersOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/proto/google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/proto/google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto new file mode 100644 index 000000000000..37a2362c84ce --- /dev/null +++ b/java-agentregistryendpoint/proto-google-cloud-agentregistryendpoint-v1/src/main/proto/google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.proto @@ -0,0 +1,209 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.agentregistryendpoint.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/agentregistry/v1/agent.proto"; +import "google/cloud/agentregistry/v1/endpoint.proto"; +import "google/cloud/agentregistry/v1/mcp_server.proto"; + +option csharp_namespace = "Google.Cloud.AgentRegistryEndpoint.V1"; +option go_package = "cloud.google.com/go/agentregistryendpoint/apiv1/agentregistryendpointpb;agentregistryendpointpb"; +option java_multiple_files = true; +option java_outer_classname = "AgentRegistryEndpointServiceProto"; +option java_package = "com.google.cloud.agentregistryendpoint.v1"; +option php_namespace = "Google\\Cloud\\AgentRegistryEndpoint\\V1"; +option ruby_package = "Google::Cloud::AgentRegistryEndpoint::V1"; + +// 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. +service AgentRegistryEndpoint { + option (google.api.default_host) = "agentregistryendpoint.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/agentregistry.read-only," + "https://www.googleapis.com/auth/agentregistry.read-write," + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Gets an MCP server active within the localized dataplane of the AI + // Application. + rpc GetAiApplicationMcpServer(GetAiApplicationMcpServerRequest) + returns (google.cloud.agentregistry.v1.McpServer) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/aiApplications/*/mcpServers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets an endpoint active within the localized dataplane of the AI + // Application. + rpc GetAiApplicationEndpoint(GetAiApplicationEndpointRequest) + returns (google.cloud.agentregistry.v1.Endpoint) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/aiApplications/*/endpoints/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists agents active within the localized dataplane of the AI Application. + rpc ListAiApplicationAgents(ListAiApplicationAgentsRequest) + returns (ListAiApplicationAgentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/aiApplications/*}/agents" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists MCP servers active within the localized dataplane of the AI + // Application. + rpc ListAiApplicationMcpServers(ListAiApplicationMcpServersRequest) + returns (ListAiApplicationMcpServersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/aiApplications/*}/mcpServers" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists endpoints active within the localized dataplane of the AI + // Application. + rpc ListAiApplicationEndpoints(ListAiApplicationEndpointsRequest) + returns (ListAiApplicationEndpointsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/aiApplications/*}/endpoints" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for getting an MCP server active within the localized +// dataplane of the AI Application. +message GetAiApplicationMcpServerRequest { + // Required. The resource name of the MCP server, in the format + // `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for getting an endpoint active within the localized +// dataplane of the AI Application. +message GetAiApplicationEndpointRequest { + // Required. The resource name of the endpoint, in the format + // `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for listing agents active within the localized dataplane. +message ListAiApplicationAgentsRequest { + // Required. The parent resource name, in the format + // `projects/{project}/locations/{location}/aiApplications/{ai_application}`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of agents to return. The service may return + // fewer than this value. If unspecified or set to `0`, at most 50 agents are + // returned. The maximum value is 100; values above 100 are coerced to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAiApplicationAgents` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListAiApplicationAgents` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing agents active within the localized dataplane. +message ListAiApplicationAgentsResponse { + // The list of agents. + repeated google.cloud.agentregistry.v1.Agent agents = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for listing MCP servers active within the localized +// dataplane. +message ListAiApplicationMcpServersRequest { + // Required. The parent resource name, in the format + // `projects/{project}/locations/{location}/aiApplications/{ai_application}`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of MCP servers to return. The service may + // return fewer than this value. If unspecified or set to `0`, at most 50 MCP + // servers are returned. The maximum value is 100; values above 100 are + // coerced to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListAiApplicationMcpServers` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `ListAiApplicationMcpServers` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing MCP servers active within the localized +// dataplane. +message ListAiApplicationMcpServersResponse { + // The list of MCP servers. + repeated google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for listing endpoints active within the localized +// dataplane. +message ListAiApplicationEndpointsRequest { + // Required. The parent resource name, in the format + // `projects/{project}/locations/{location}/aiApplications/{ai_application}`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of endpoints to return. The service may return + // fewer than this value. If unspecified or set to `0`, at most 50 endpoints + // are returned. The maximum value is 100; values above 100 are coerced to + // 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListAiApplicationEndpoints` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `ListAiApplicationEndpoints` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing endpoints active within the localized +// dataplane. +message ListAiApplicationEndpointsResponse { + // The list of endpoints. + repeated google.cloud.agentregistry.v1.Endpoint endpoints = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/create/SyncCreateSetCredentialsProvider.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..49d309b869e1 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointSettings; +import com.google.cloud.agentregistryendpoint.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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); + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_Create_SetCredentialsProvider_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/create/SyncCreateSetEndpoint.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..cbd979338b7f --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_Create_SetEndpoint_sync] +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointSettings; +import com.google.cloud.agentregistryendpoint.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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); + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_Create_SetEndpoint_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/create/SyncCreateUseHttpJsonTransport.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..e09f48879cba --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_Create_UseHttpJsonTransport_sync] +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // 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); + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_Create_UseHttpJsonTransport_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationendpoint/AsyncGetAiApplicationEndpoint.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationendpoint/AsyncGetAiApplicationEndpoint.java new file mode 100644 index 000000000000..0551cc4eb02c --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationendpoint/AsyncGetAiApplicationEndpoint.java @@ -0,0 +1,48 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationEndpoint_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest; + +public class AsyncGetAiApplicationEndpoint { + + public static void main(String[] args) throws Exception { + asyncGetAiApplicationEndpoint(); + } + + public static void asyncGetAiApplicationEndpoint() throws Exception { + // 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(); + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationEndpoint_async] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationendpoint/SyncGetAiApplicationEndpoint.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationendpoint/SyncGetAiApplicationEndpoint.java new file mode 100644 index 000000000000..c35431de936b --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationendpoint/SyncGetAiApplicationEndpoint.java @@ -0,0 +1,44 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationEndpoint_sync] +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.GetAiApplicationEndpointRequest; + +public class SyncGetAiApplicationEndpoint { + + public static void main(String[] args) throws Exception { + syncGetAiApplicationEndpoint(); + } + + public static void syncGetAiApplicationEndpoint() throws Exception { + // 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); + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationEndpoint_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationendpoint/SyncGetAiApplicationEndpointString.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationendpoint/SyncGetAiApplicationEndpointString.java new file mode 100644 index 000000000000..50a94c8d70db --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationendpoint/SyncGetAiApplicationEndpointString.java @@ -0,0 +1,42 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationEndpoint_String_sync] +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; + +public class SyncGetAiApplicationEndpointString { + + public static void main(String[] args) throws Exception { + syncGetAiApplicationEndpointString(); + } + + public static void syncGetAiApplicationEndpointString() throws Exception { + // 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); + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationEndpoint_String_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationmcpserver/AsyncGetAiApplicationMcpServer.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationmcpserver/AsyncGetAiApplicationMcpServer.java new file mode 100644 index 000000000000..ca24881dd1ee --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationmcpserver/AsyncGetAiApplicationMcpServer.java @@ -0,0 +1,48 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationMcpServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest; + +public class AsyncGetAiApplicationMcpServer { + + public static void main(String[] args) throws Exception { + asyncGetAiApplicationMcpServer(); + } + + public static void asyncGetAiApplicationMcpServer() throws Exception { + // 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(); + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationMcpServer_async] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationmcpserver/SyncGetAiApplicationMcpServer.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationmcpserver/SyncGetAiApplicationMcpServer.java new file mode 100644 index 000000000000..20d3b084f8c6 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationmcpserver/SyncGetAiApplicationMcpServer.java @@ -0,0 +1,44 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationMcpServer_sync] +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.GetAiApplicationMcpServerRequest; + +public class SyncGetAiApplicationMcpServer { + + public static void main(String[] args) throws Exception { + syncGetAiApplicationMcpServer(); + } + + public static void syncGetAiApplicationMcpServer() throws Exception { + // 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); + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationMcpServer_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationmcpserver/SyncGetAiApplicationMcpServerString.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationmcpserver/SyncGetAiApplicationMcpServerString.java new file mode 100644 index 000000000000..55145a196be5 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/getaiapplicationmcpserver/SyncGetAiApplicationMcpServerString.java @@ -0,0 +1,42 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationMcpServer_String_sync] +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; + +public class SyncGetAiApplicationMcpServerString { + + public static void main(String[] args) throws Exception { + syncGetAiApplicationMcpServerString(); + } + + public static void syncGetAiApplicationMcpServerString() throws Exception { + // 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); + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_GetAiApplicationMcpServer_String_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/AsyncListAiApplicationAgents.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/AsyncListAiApplicationAgents.java new file mode 100644 index 000000000000..24a6050e1da9 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/AsyncListAiApplicationAgents.java @@ -0,0 +1,54 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationAgents_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest; + +public class AsyncListAiApplicationAgents { + + public static void main(String[] args) throws Exception { + asyncListAiApplicationAgents(); + } + + public static void asyncListAiApplicationAgents() throws Exception { + // 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); + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationAgents_async] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/AsyncListAiApplicationAgentsPaged.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/AsyncListAiApplicationAgentsPaged.java new file mode 100644 index 000000000000..7d734c871594 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/AsyncListAiApplicationAgentsPaged.java @@ -0,0 +1,62 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationAgents_Paged_async] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsResponse; +import com.google.common.base.Strings; + +public class AsyncListAiApplicationAgentsPaged { + + public static void main(String[] args) throws Exception { + asyncListAiApplicationAgentsPaged(); + } + + public static void asyncListAiApplicationAgentsPaged() throws Exception { + // 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; + } + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationAgents_Paged_async] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/SyncListAiApplicationAgents.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/SyncListAiApplicationAgents.java new file mode 100644 index 000000000000..555c30052f5e --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/SyncListAiApplicationAgents.java @@ -0,0 +1,51 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationAgents_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationAgentsRequest; + +public class SyncListAiApplicationAgents { + + public static void main(String[] args) throws Exception { + syncListAiApplicationAgents(); + } + + public static void syncListAiApplicationAgents() throws Exception { + // 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); + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationAgents_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/SyncListAiApplicationAgentsString.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/SyncListAiApplicationAgentsString.java new file mode 100644 index 000000000000..e00c6dae4e38 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationagents/SyncListAiApplicationAgentsString.java @@ -0,0 +1,45 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationAgents_String_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; + +public class SyncListAiApplicationAgentsString { + + public static void main(String[] args) throws Exception { + syncListAiApplicationAgentsString(); + } + + public static void syncListAiApplicationAgentsString() throws Exception { + // 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); + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationAgents_String_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/AsyncListAiApplicationEndpoints.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/AsyncListAiApplicationEndpoints.java new file mode 100644 index 000000000000..d9810ae2bf7e --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/AsyncListAiApplicationEndpoints.java @@ -0,0 +1,54 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationEndpoints_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest; + +public class AsyncListAiApplicationEndpoints { + + public static void main(String[] args) throws Exception { + asyncListAiApplicationEndpoints(); + } + + public static void asyncListAiApplicationEndpoints() throws Exception { + // 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); + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationEndpoints_async] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/AsyncListAiApplicationEndpointsPaged.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/AsyncListAiApplicationEndpointsPaged.java new file mode 100644 index 000000000000..f9115ac26017 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/AsyncListAiApplicationEndpointsPaged.java @@ -0,0 +1,62 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationEndpoints_Paged_async] +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsResponse; +import com.google.common.base.Strings; + +public class AsyncListAiApplicationEndpointsPaged { + + public static void main(String[] args) throws Exception { + asyncListAiApplicationEndpointsPaged(); + } + + public static void asyncListAiApplicationEndpointsPaged() throws Exception { + // 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; + } + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationEndpoints_Paged_async] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/SyncListAiApplicationEndpoints.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/SyncListAiApplicationEndpoints.java new file mode 100644 index 000000000000..02e3d160c6f1 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/SyncListAiApplicationEndpoints.java @@ -0,0 +1,51 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationEndpoints_sync] +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationEndpointsRequest; + +public class SyncListAiApplicationEndpoints { + + public static void main(String[] args) throws Exception { + syncListAiApplicationEndpoints(); + } + + public static void syncListAiApplicationEndpoints() throws Exception { + // 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); + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationEndpoints_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/SyncListAiApplicationEndpointsString.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/SyncListAiApplicationEndpointsString.java new file mode 100644 index 000000000000..4809f752f974 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationendpoints/SyncListAiApplicationEndpointsString.java @@ -0,0 +1,45 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationEndpoints_String_sync] +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; + +public class SyncListAiApplicationEndpointsString { + + public static void main(String[] args) throws Exception { + syncListAiApplicationEndpointsString(); + } + + public static void syncListAiApplicationEndpointsString() throws Exception { + // 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); + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationEndpoints_String_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/AsyncListAiApplicationMcpServers.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/AsyncListAiApplicationMcpServers.java new file mode 100644 index 000000000000..215047076edd --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/AsyncListAiApplicationMcpServers.java @@ -0,0 +1,56 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationMcpServers_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest; + +public class AsyncListAiApplicationMcpServers { + + public static void main(String[] args) throws Exception { + asyncListAiApplicationMcpServers(); + } + + public static void asyncListAiApplicationMcpServers() throws Exception { + // 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); + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationMcpServers_async] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/AsyncListAiApplicationMcpServersPaged.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/AsyncListAiApplicationMcpServersPaged.java new file mode 100644 index 000000000000..af30fe3409f3 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/AsyncListAiApplicationMcpServersPaged.java @@ -0,0 +1,62 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationMcpServers_Paged_async] +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersResponse; +import com.google.common.base.Strings; + +public class AsyncListAiApplicationMcpServersPaged { + + public static void main(String[] args) throws Exception { + asyncListAiApplicationMcpServersPaged(); + } + + public static void asyncListAiApplicationMcpServersPaged() throws Exception { + // 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; + } + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationMcpServers_Paged_async] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/SyncListAiApplicationMcpServers.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/SyncListAiApplicationMcpServers.java new file mode 100644 index 000000000000..91b0286dd60a --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/SyncListAiApplicationMcpServers.java @@ -0,0 +1,51 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationMcpServers_sync] +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; +import com.google.cloud.agentregistryendpoint.v1.ListAiApplicationMcpServersRequest; + +public class SyncListAiApplicationMcpServers { + + public static void main(String[] args) throws Exception { + syncListAiApplicationMcpServers(); + } + + public static void syncListAiApplicationMcpServers() throws Exception { + // 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); + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationMcpServers_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/SyncListAiApplicationMcpServersString.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/SyncListAiApplicationMcpServersString.java new file mode 100644 index 000000000000..09c2bd5a0199 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpoint/listaiapplicationmcpservers/SyncListAiApplicationMcpServersString.java @@ -0,0 +1,45 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationMcpServers_String_sync] +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointClient; + +public class SyncListAiApplicationMcpServersString { + + public static void main(String[] args) throws Exception { + syncListAiApplicationMcpServersString(); + } + + public static void syncListAiApplicationMcpServersString() throws Exception { + // 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); + } + } + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpoint_ListAiApplicationMcpServers_String_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpointsettings/getaiapplicationmcpserver/SyncGetAiApplicationMcpServer.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpointsettings/getaiapplicationmcpserver/SyncGetAiApplicationMcpServer.java new file mode 100644 index 000000000000..805ecc423631 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/agentregistryendpointsettings/getaiapplicationmcpserver/SyncGetAiApplicationMcpServer.java @@ -0,0 +1,57 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpointSettings_GetAiApplicationMcpServer_sync] +import com.google.cloud.agentregistryendpoint.v1.AgentRegistryEndpointSettings; +import java.time.Duration; + +public class SyncGetAiApplicationMcpServer { + + public static void main(String[] args) throws Exception { + syncGetAiApplicationMcpServer(); + } + + public static void syncGetAiApplicationMcpServer() throws Exception { + // 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(); + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpointSettings_GetAiApplicationMcpServer_sync] diff --git a/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/stub/agentregistryendpointstubsettings/getaiapplicationmcpserver/SyncGetAiApplicationMcpServer.java b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/stub/agentregistryendpointstubsettings/getaiapplicationmcpserver/SyncGetAiApplicationMcpServer.java new file mode 100644 index 000000000000..deee5f3f2283 --- /dev/null +++ b/java-agentregistryendpoint/samples/snippets/generated/com/google/cloud/agentregistryendpoint/v1/stub/agentregistryendpointstubsettings/getaiapplicationmcpserver/SyncGetAiApplicationMcpServer.java @@ -0,0 +1,57 @@ +/* + * 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.samples; + +// [START agentregistryendpoint_v1_generated_AgentRegistryEndpointStubSettings_GetAiApplicationMcpServer_sync] +import com.google.cloud.agentregistryendpoint.v1.stub.AgentRegistryEndpointStubSettings; +import java.time.Duration; + +public class SyncGetAiApplicationMcpServer { + + public static void main(String[] args) throws Exception { + syncGetAiApplicationMcpServer(); + } + + public static void syncGetAiApplicationMcpServer() throws Exception { + // 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(); + } +} +// [END agentregistryendpoint_v1_generated_AgentRegistryEndpointStubSettings_GetAiApplicationMcpServer_sync] diff --git a/librarian.yaml b/librarian.yaml index 45270f4c7a50..464a3aff2cb9 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -118,6 +118,10 @@ libraries: java: additional_protos: - path: google/cloud/location/locations.proto + - name: agentregistryendpoint + version: 0.1.0-SNAPSHOT + apis: + - path: google/cloud/agentregistryendpoint/v1 - name: aiplatform version: 3.105.0-SNAPSHOT apis: diff --git a/pom.xml b/pom.xml index 6b65bcca60c6..4abc5180256c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,7 @@ java-advisorynotifications java-agentidentity java-agentregistry + java-agentregistryendpoint java-aiplatform java-alloydb java-alloydb-connectors diff --git a/versions.txt b/versions.txt index 769e17ebfb8d..0bacdcc635de 100644 --- a/versions.txt +++ b/versions.txt @@ -1095,3 +1095,8 @@ google-cloud-universalledger-bom:0.0.0:0.1.0-SNAPSHOT proto-google-cloud-universalledger-v1:0.0.0:0.1.0-SNAPSHOT grpc-google-cloud-universalledger-v1:0.0.0:0.1.0-SNAPSHOT google-cloud-universalledger:0.0.0:0.1.0-SNAPSHOT +google-cloud-agentregistryendpoint-parent:0.0.0:0.1.0-SNAPSHOT +google-cloud-agentregistryendpoint-bom:0.0.0:0.1.0-SNAPSHOT +proto-google-cloud-agentregistryendpoint-v1:0.0.0:0.1.0-SNAPSHOT +grpc-google-cloud-agentregistryendpoint-v1:0.0.0:0.1.0-SNAPSHOT +google-cloud-agentregistryendpoint:0.0.0:0.1.0-SNAPSHOT