From 27c149c4f25b45fff27dcc647bb0d141021bc529 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Wed, 17 Jun 2026 14:31:03 -0400 Subject: [PATCH] feat(google/cloud/agentregistry/v1): onboard a new library --- gapic-libraries-bom/pom.xml | 7 + java-agentregistry/.repo-metadata.json | 16 + java-agentregistry/README.md | 207 + .../google-cloud-agentregistry-bom/pom.xml | 45 + .../google-cloud-agentregistry/pom.xml | 119 + .../agentregistry/v1/AgentRegistryClient.java | 4283 ++++++++ .../v1/AgentRegistrySettings.java | 562 ++ .../agentregistry/v1/gapic_metadata.json | 81 + .../cloud/agentregistry/v1/package-info.java | 44 + .../v1/stub/AgentRegistryStub.java | 251 + .../v1/stub/AgentRegistryStubSettings.java | 1706 ++++ .../GrpcAgentRegistryCallableFactory.java | 113 + .../v1/stub/GrpcAgentRegistryStub.java | 1012 ++ .../HttpJsonAgentRegistryCallableFactory.java | 101 + .../v1/stub/HttpJsonAgentRegistryStub.java | 1668 ++++ .../cloud/agentregistry/v1/stub/Version.java | 27 + .../reflect-config.json | 2567 +++++ .../v1/AgentRegistryClientHttpJsonTest.java | 2098 ++++ .../v1/AgentRegistryClientTest.java | 1880 ++++ .../agentregistry/v1/MockAgentRegistry.java | 59 + .../v1/MockAgentRegistryImpl.java | 458 + .../cloud/agentregistry/v1/MockLocations.java | 59 + .../agentregistry/v1/MockLocationsImpl.java | 105 + .../pom.xml | 45 + .../agentregistry/v1/AgentRegistryGrpc.java | 2775 ++++++ java-agentregistry/owlbot.py | 38 + java-agentregistry/pom.xml | 58 + .../clirr-ignored-differences.xml | 80 + .../pom.xml | 37 + .../google/cloud/agentregistry/v1/Agent.java | 8826 +++++++++++++++++ .../cloud/agentregistry/v1/AgentName.java | 223 + .../agentregistry/v1/AgentOrBuilder.java | 607 ++ .../cloud/agentregistry/v1/AgentProto.java | 214 + .../v1/AgentRegistryServiceProto.java | 679 ++ .../cloud/agentregistry/v1/Binding.java | 5460 ++++++++++ .../cloud/agentregistry/v1/BindingName.java | 223 + .../agentregistry/v1/BindingOrBuilder.java | 325 + .../cloud/agentregistry/v1/BindingProto.java | 164 + .../v1/CreateBindingRequest.java | 1444 +++ .../v1/CreateBindingRequestOrBuilder.java | 193 + .../v1/CreateServiceRequest.java | 1449 +++ .../v1/CreateServiceRequestOrBuilder.java | 194 + .../v1/DeleteBindingRequest.java | 905 ++ .../v1/DeleteBindingRequestOrBuilder.java | 114 + .../v1/DeleteServiceRequest.java | 905 ++ .../v1/DeleteServiceRequestOrBuilder.java | 114 + .../cloud/agentregistry/v1/Endpoint.java | 2855 ++++++ .../cloud/agentregistry/v1/EndpointName.java | 223 + .../agentregistry/v1/EndpointOrBuilder.java | 383 + .../cloud/agentregistry/v1/EndpointProto.java | 139 + .../v1/FetchAvailableBindingsRequest.java | 1634 +++ ...etchAvailableBindingsRequestOrBuilder.java | 207 + .../v1/FetchAvailableBindingsResponse.java | 1119 +++ ...tchAvailableBindingsResponseOrBuilder.java | 110 + .../agentregistry/v1/GetAgentRequest.java | 610 ++ .../v1/GetAgentRequestOrBuilder.java | 58 + .../agentregistry/v1/GetBindingRequest.java | 617 ++ .../v1/GetBindingRequestOrBuilder.java | 60 + .../agentregistry/v1/GetEndpointRequest.java | 617 ++ .../v1/GetEndpointRequestOrBuilder.java | 60 + .../agentregistry/v1/GetMcpServerRequest.java | 611 ++ .../v1/GetMcpServerRequestOrBuilder.java | 58 + .../agentregistry/v1/GetServiceRequest.java | 617 ++ .../v1/GetServiceRequestOrBuilder.java | 60 + .../cloud/agentregistry/v1/Interface.java | 967 ++ .../agentregistry/v1/InterfaceOrBuilder.java | 84 + .../agentregistry/v1/ListAgentsRequest.java | 1278 +++ .../v1/ListAgentsRequestOrBuilder.java | 150 + .../agentregistry/v1/ListAgentsResponse.java | 1110 +++ .../v1/ListAgentsResponseOrBuilder.java | 110 + .../agentregistry/v1/ListBindingsRequest.java | 1297 +++ .../v1/ListBindingsRequestOrBuilder.java | 155 + .../v1/ListBindingsResponse.java | 1172 +++ .../v1/ListBindingsResponseOrBuilder.java | 124 + .../v1/ListEndpointsRequest.java | 1181 +++ .../v1/ListEndpointsRequestOrBuilder.java | 150 + .../v1/ListEndpointsResponse.java | 1174 +++ .../v1/ListEndpointsResponseOrBuilder.java | 124 + .../v1/ListMcpServersRequest.java | 1286 +++ .../v1/ListMcpServersRequestOrBuilder.java | 152 + .../v1/ListMcpServersResponse.java | 1114 +++ .../v1/ListMcpServersResponseOrBuilder.java | 110 + .../agentregistry/v1/ListServicesRequest.java | 1174 +++ .../v1/ListServicesRequestOrBuilder.java | 148 + .../v1/ListServicesResponse.java | 1172 +++ .../v1/ListServicesResponseOrBuilder.java | 124 + .../cloud/agentregistry/v1/LocationName.java | 192 + .../cloud/agentregistry/v1/McpServer.java | 5725 +++++++++++ .../cloud/agentregistry/v1/McpServerName.java | 223 + .../agentregistry/v1/McpServerOrBuilder.java | 454 + .../agentregistry/v1/McpServerProto.java | 177 + .../agentregistry/v1/OperationMetadata.java | 1873 ++++ .../v1/OperationMetadataOrBuilder.java | 230 + .../agentregistry/v1/PropertiesProto.java | 96 + .../agentregistry/v1/SearchAgentsRequest.java | 1382 +++ .../v1/SearchAgentsRequestOrBuilder.java | 207 + .../v1/SearchAgentsResponse.java | 1125 +++ .../v1/SearchAgentsResponseOrBuilder.java | 114 + .../v1/SearchMcpServersRequest.java | 1361 +++ .../v1/SearchMcpServersRequestOrBuilder.java | 201 + .../v1/SearchMcpServersResponse.java | 1128 +++ .../v1/SearchMcpServersResponseOrBuilder.java | 114 + .../cloud/agentregistry/v1/Service.java | 6841 +++++++++++++ .../cloud/agentregistry/v1/ServiceName.java | 223 + .../agentregistry/v1/ServiceOrBuilder.java | 434 + .../cloud/agentregistry/v1/ServiceProto.java | 191 + .../v1/UpdateBindingRequest.java | 1359 +++ .../v1/UpdateBindingRequestOrBuilder.java | 180 + .../v1/UpdateServiceRequest.java | 1371 +++ .../v1/UpdateServiceRequestOrBuilder.java | 183 + .../google/cloud/agentregistry/v1/agent.proto | 168 + .../v1/agentregistry_service.proto | 934 ++ .../cloud/agentregistry/v1/binding.proto | 120 + .../cloud/agentregistry/v1/endpoint.proto | 75 + .../cloud/agentregistry/v1/mcp_server.proto | 120 + .../cloud/agentregistry/v1/properties.proto | 51 + .../cloud/agentregistry/v1/service.proto | 154 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../SyncCreateUseHttpJsonTransport.java | 40 + .../createbinding/AsyncCreateBinding.java | 53 + .../createbinding/AsyncCreateBindingLRO.java | 54 + .../createbinding/SyncCreateBinding.java | 49 + ...reateBindingLocationnameBindingString.java | 44 + .../SyncCreateBindingStringBindingString.java | 44 + .../createservice/AsyncCreateService.java | 53 + .../createservice/AsyncCreateServiceLRO.java | 54 + .../createservice/SyncCreateService.java | 49 + ...reateServiceLocationnameServiceString.java | 44 + .../SyncCreateServiceStringServiceString.java | 44 + .../deletebinding/AsyncDeleteBinding.java | 50 + .../deletebinding/AsyncDeleteBindingLRO.java | 52 + .../deletebinding/SyncDeleteBinding.java | 47 + .../SyncDeleteBindingBindingname.java | 42 + .../SyncDeleteBindingString.java | 42 + .../deleteservice/AsyncDeleteService.java | 50 + .../deleteservice/AsyncDeleteServiceLRO.java | 52 + .../deleteservice/SyncDeleteService.java | 47 + .../SyncDeleteServiceServicename.java | 42 + .../SyncDeleteServiceString.java | 42 + .../AsyncFetchAvailableBindings.java | 54 + .../AsyncFetchAvailableBindingsPaged.java | 62 + .../SyncFetchAvailableBindings.java | 50 + ...yncFetchAvailableBindingsLocationname.java | 44 + .../SyncFetchAvailableBindingsString.java | 44 + .../agentregistry/getagent/AsyncGetAgent.java | 49 + .../agentregistry/getagent/SyncGetAgent.java | 46 + .../getagent/SyncGetAgentAgentname.java | 42 + .../getagent/SyncGetAgentString.java | 42 + .../getbinding/AsyncGetBinding.java | 49 + .../getbinding/SyncGetBinding.java | 46 + .../getbinding/SyncGetBindingBindingname.java | 42 + .../getbinding/SyncGetBindingString.java | 42 + .../getendpoint/AsyncGetEndpoint.java | 49 + .../getendpoint/SyncGetEndpoint.java | 46 + .../SyncGetEndpointEndpointname.java | 42 + .../getendpoint/SyncGetEndpointString.java | 42 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../getmcpserver/AsyncGetMcpServer.java | 49 + .../getmcpserver/SyncGetMcpServer.java | 46 + .../SyncGetMcpServerMcpservername.java | 42 + .../getmcpserver/SyncGetMcpServerString.java | 42 + .../getservice/AsyncGetService.java | 49 + .../getservice/SyncGetService.java | 46 + .../getservice/SyncGetServiceServicename.java | 42 + .../getservice/SyncGetServiceString.java | 42 + .../listagents/AsyncListAgents.java | 55 + .../listagents/AsyncListAgentsPaged.java | 63 + .../listagents/SyncListAgents.java | 52 + .../SyncListAgentsLocationname.java | 44 + .../listagents/SyncListAgentsString.java | 44 + .../listbindings/AsyncListBindings.java | 56 + .../listbindings/AsyncListBindingsPaged.java | 63 + .../listbindings/SyncListBindings.java | 52 + .../SyncListBindingsLocationname.java | 44 + .../listbindings/SyncListBindingsString.java | 44 + .../listendpoints/AsyncListEndpoints.java | 55 + .../AsyncListEndpointsPaged.java | 62 + .../listendpoints/SyncListEndpoints.java | 51 + .../SyncListEndpointsLocationname.java | 44 + .../SyncListEndpointsString.java | 44 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 61 + .../listlocations/SyncListLocations.java | 50 + .../listmcpservers/AsyncListMcpServers.java | 56 + .../AsyncListMcpServersPaged.java | 64 + .../listmcpservers/SyncListMcpServers.java | 52 + .../SyncListMcpServersLocationname.java | 44 + .../SyncListMcpServersString.java | 44 + .../listservices/AsyncListServices.java | 55 + .../listservices/AsyncListServicesPaged.java | 62 + .../listservices/SyncListServices.java | 51 + .../SyncListServicesLocationname.java | 44 + .../listservices/SyncListServicesString.java | 44 + .../searchagents/AsyncSearchAgents.java | 54 + .../searchagents/AsyncSearchAgentsPaged.java | 62 + .../searchagents/SyncSearchAgents.java | 51 + .../SyncSearchAgentsLocationname.java | 44 + .../searchagents/SyncSearchAgentsString.java | 44 + .../AsyncSearchMcpServers.java | 55 + .../AsyncSearchMcpServersPaged.java | 63 + .../SyncSearchMcpServers.java | 51 + .../SyncSearchMcpServersLocationname.java | 44 + .../SyncSearchMcpServersString.java | 44 + .../updatebinding/AsyncUpdateBinding.java | 52 + .../updatebinding/AsyncUpdateBindingLRO.java | 53 + .../updatebinding/SyncUpdateBinding.java | 48 + .../SyncUpdateBindingBindingFieldmask.java | 43 + .../updateservice/AsyncUpdateService.java | 52 + .../updateservice/AsyncUpdateServiceLRO.java | 53 + .../updateservice/SyncUpdateService.java | 48 + .../SyncUpdateServiceServiceFieldmask.java | 43 + .../createservice/SyncCreateService.java | 53 + .../getagent/SyncGetAgent.java | 55 + .../createservice/SyncCreateService.java | 54 + .../getagent/SyncGetAgent.java | 56 + librarian.yaml | 7 + pom.xml | 1 + versions.txt | 5 + 220 files changed, 98844 insertions(+) create mode 100644 java-agentregistry/.repo-metadata.json create mode 100644 java-agentregistry/README.md create mode 100644 java-agentregistry/google-cloud-agentregistry-bom/pom.xml create mode 100644 java-agentregistry/google-cloud-agentregistry/pom.xml create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryClient.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistrySettings.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/gapic_metadata.json create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/package-info.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStub.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStubSettings.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/GrpcAgentRegistryCallableFactory.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/GrpcAgentRegistryStub.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/HttpJsonAgentRegistryCallableFactory.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/HttpJsonAgentRegistryStub.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/Version.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/main/resources/META-INF/native-image/com.google.cloud.agentregistry.v1/reflect-config.json create mode 100644 java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/AgentRegistryClientHttpJsonTest.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/AgentRegistryClientTest.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockAgentRegistry.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockAgentRegistryImpl.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockLocations.java create mode 100644 java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockLocationsImpl.java create mode 100644 java-agentregistry/grpc-google-cloud-agentregistry-v1/pom.xml create mode 100644 java-agentregistry/grpc-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryGrpc.java create mode 100755 java-agentregistry/owlbot.py create mode 100644 java-agentregistry/pom.xml create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/clirr-ignored-differences.xml create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/pom.xml create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Agent.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentName.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentProto.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryServiceProto.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Binding.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingName.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingProto.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateBindingRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateBindingRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateServiceRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateServiceRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteBindingRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteBindingRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteServiceRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteServiceRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Endpoint.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointName.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointProto.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsResponse.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsResponseOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetAgentRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetAgentRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetBindingRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetBindingRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetEndpointRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetEndpointRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetMcpServerRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetMcpServerRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetServiceRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetServiceRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Interface.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/InterfaceOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsResponse.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsResponseOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsResponse.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsResponseOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsResponse.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsResponseOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersResponse.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersResponseOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesResponse.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesResponseOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/LocationName.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServer.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerName.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerProto.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/OperationMetadata.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/OperationMetadataOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/PropertiesProto.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsResponse.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsResponseOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersResponse.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersResponseOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Service.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceName.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceProto.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateBindingRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateBindingRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateServiceRequest.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateServiceRequestOrBuilder.java create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agent.proto create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agentregistry_service.proto create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/binding.proto create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/endpoint.proto create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/mcp_server.proto create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/properties.proto create mode 100644 java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/service.proto create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateSetEndpoint.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/AsyncCreateBinding.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/AsyncCreateBindingLRO.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBinding.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBindingLocationnameBindingString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBindingStringBindingString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/AsyncCreateService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/AsyncCreateServiceLRO.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateServiceLocationnameServiceString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateServiceStringServiceString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/AsyncDeleteBinding.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/AsyncDeleteBindingLRO.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBinding.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBindingBindingname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBindingString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/AsyncDeleteService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/AsyncDeleteServiceLRO.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteServiceServicename.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteServiceString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/AsyncFetchAvailableBindings.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/AsyncFetchAvailableBindingsPaged.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindings.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindingsLocationname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindingsString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/AsyncGetAgent.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgent.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgentAgentname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgentString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/AsyncGetBinding.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBinding.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBindingBindingname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBindingString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/AsyncGetEndpoint.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpoint.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpointEndpointname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpointString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getlocation/AsyncGetLocation.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getlocation/SyncGetLocation.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/AsyncGetMcpServer.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServer.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServerMcpservername.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServerString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/AsyncGetService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetServiceServicename.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetServiceString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/AsyncListAgents.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/AsyncListAgentsPaged.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgents.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgentsLocationname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgentsString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/AsyncListBindings.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/AsyncListBindingsPaged.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindings.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindingsLocationname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindingsString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/AsyncListEndpoints.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/AsyncListEndpointsPaged.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpoints.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpointsLocationname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpointsString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/AsyncListLocations.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/AsyncListLocationsPaged.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/SyncListLocations.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/AsyncListMcpServers.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/AsyncListMcpServersPaged.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServers.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServersLocationname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServersString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/AsyncListServices.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/AsyncListServicesPaged.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServices.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServicesLocationname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServicesString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/AsyncSearchAgents.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/AsyncSearchAgentsPaged.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgents.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgentsLocationname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgentsString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/AsyncSearchMcpServers.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/AsyncSearchMcpServersPaged.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServers.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServersLocationname.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServersString.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/AsyncUpdateBinding.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/AsyncUpdateBindingLRO.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/SyncUpdateBinding.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/SyncUpdateBindingBindingFieldmask.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/AsyncUpdateService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/AsyncUpdateServiceLRO.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/SyncUpdateService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/SyncUpdateServiceServiceFieldmask.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistrysettings/createservice/SyncCreateService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistrysettings/getagent/SyncGetAgent.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/stub/agentregistrystubsettings/createservice/SyncCreateService.java create mode 100644 java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/stub/agentregistrystubsettings/getagent/SyncGetAgent.java diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 4df82569ba73..abf38236727a 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -56,6 +56,13 @@ pom import + + com.google.cloud + google-cloud-agentregistry-bom + 0.1.0-SNAPSHOT + pom + import + com.google.cloud google-cloud-aiplatform-bom diff --git a/java-agentregistry/.repo-metadata.json b/java-agentregistry/.repo-metadata.json new file mode 100644 index 000000000000..3a25ccc9bbac --- /dev/null +++ b/java-agentregistry/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "agentregistry", + "name_pretty": "Agent Registry", + "product_documentation": "https://docs.cloud.google.com/agent-registry/overview", + "api_description": "Agent Registry is a centralized, unified catalog that lets you store,\ndiscover, and govern Model Context Protocol (MCP) servers, tools, and AI\nagents within Google Cloud.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-agentregistry/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-agentregistry", + "distribution_name": "com.google.cloud:google-cloud-agentregistry", + "api_id": "agentregistry.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-agentregistry/README.md b/java-agentregistry/README.md new file mode 100644 index 000000000000..64496d92e1c3 --- /dev/null +++ b/java-agentregistry/README.md @@ -0,0 +1,207 @@ +# Google Agent Registry Client for Java + +Java idiomatic client for [Agent Registry][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.83.0 + pom + import + + + + + + + com.google.cloud + google-cloud-agentregistry + + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + +```xml + + com.google.cloud + google-cloud-agentregistry + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-agentregistry:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-agentregistry" % "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 APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Agent Registry API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Agent Registry [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Agent Registry. +[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-agentregistry` library. See the [Quickstart](#quickstart) section +to add `google-cloud-agentregistry` as a dependency in your code. + +## About Agent Registry + + +[Agent Registry][product-docs] Agent Registry is a centralized, unified catalog that lets you store, +discover, and govern Model Context Protocol (MCP) servers, tools, and AI +agents within Google Cloud. + +See the [Agent Registry client library docs][javadocs] to learn how to +use this Agent Registry Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Agent Registry 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/overview +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-agentregistry/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-agentregistry.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-agentregistry/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=agentregistry.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-agentregistry/google-cloud-agentregistry-bom/pom.xml b/java-agentregistry/google-cloud-agentregistry-bom/pom.xml new file mode 100644 index 000000000000..14a75375df8a --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry-bom/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + com.google.cloud + google-cloud-agentregistry-bom + 0.1.0-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.88.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Agent Registry BOM + + BOM for Agent Registry + + + + true + + + + + + + com.google.cloud + google-cloud-agentregistry + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-agentregistry-v1 + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-agentregistry-v1 + 0.1.0-SNAPSHOT + + + + + \ No newline at end of file diff --git a/java-agentregistry/google-cloud-agentregistry/pom.xml b/java-agentregistry/google-cloud-agentregistry/pom.xml new file mode 100644 index 000000000000..74c789dbd674 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/pom.xml @@ -0,0 +1,119 @@ + + + 4.0.0 + com.google.cloud + google-cloud-agentregistry + 0.1.0-SNAPSHOT + jar + Google Agent Registry + Agent Registry Agent Registry is a centralized, unified catalog that lets you store, +discover, and govern Model Context Protocol (MCP) servers, tools, and AI +agents within Google Cloud. + + com.google.cloud + google-cloud-agentregistry-parent + 0.1.0-SNAPSHOT + + + google-cloud-agentregistry + + + + 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-agentregistry-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-agentregistry-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-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryClient.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryClient.java new file mode 100644 index 000000000000..daa0139ea6b8 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryClient.java @@ -0,0 +1,4283 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.agentregistry.v1.stub.AgentRegistryStub; +import com.google.cloud.agentregistry.v1.stub.AgentRegistryStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing Agents, Endpoints, McpServers, Services, and Bindings. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Agent response = agentRegistryClient.getAgent(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the AgentRegistryClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

ListAgents

Lists Agents in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAgents(ListAgentsRequest request) + *

+ *

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

+ *
    + *
  • listAgents(LocationName parent) + *

  • listAgents(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.

+ *
    + *
  • listAgentsPagedCallable() + *

  • listAgentsCallable() + *

+ *

SearchAgents

Searches Agents in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • searchAgents(SearchAgentsRequest request) + *

+ *

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

+ *
    + *
  • searchAgents(LocationName parent) + *

  • searchAgents(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.

+ *
    + *
  • searchAgentsPagedCallable() + *

  • searchAgentsCallable() + *

+ *

GetAgent

Gets details of a single Agent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAgent(GetAgentRequest request) + *

+ *

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

+ *
    + *
  • getAgent(AgentName name) + *

  • getAgent(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.

+ *
    + *
  • getAgentCallable() + *

+ *

ListEndpoints

Lists Endpoints in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listEndpoints(ListEndpointsRequest request) + *

+ *

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

+ *
    + *
  • listEndpoints(LocationName parent) + *

  • listEndpoints(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.

+ *
    + *
  • listEndpointsPagedCallable() + *

  • listEndpointsCallable() + *

+ *

GetEndpoint

Gets details of a single Endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getEndpoint(GetEndpointRequest request) + *

+ *

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

+ *
    + *
  • getEndpoint(EndpointName name) + *

  • getEndpoint(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.

+ *
    + *
  • getEndpointCallable() + *

+ *

ListMcpServers

Lists McpServers in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listMcpServers(ListMcpServersRequest request) + *

+ *

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

+ *
    + *
  • listMcpServers(LocationName parent) + *

  • listMcpServers(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.

+ *
    + *
  • listMcpServersPagedCallable() + *

  • listMcpServersCallable() + *

+ *

SearchMcpServers

Searches McpServers in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • searchMcpServers(SearchMcpServersRequest request) + *

+ *

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

+ *
    + *
  • searchMcpServers(LocationName parent) + *

  • searchMcpServers(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.

+ *
    + *
  • searchMcpServersPagedCallable() + *

  • searchMcpServersCallable() + *

+ *

GetMcpServer

Gets details of a single McpServer.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getMcpServer(GetMcpServerRequest request) + *

+ *

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

+ *
    + *
  • getMcpServer(McpServerName name) + *

  • getMcpServer(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.

+ *
    + *
  • getMcpServerCallable() + *

+ *

ListServices

Lists Services in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServices(ListServicesRequest request) + *

+ *

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

+ *
    + *
  • listServices(LocationName parent) + *

  • listServices(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.

+ *
    + *
  • listServicesPagedCallable() + *

  • listServicesCallable() + *

+ *

GetService

Gets details of a single Service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getService(GetServiceRequest request) + *

+ *

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

+ *
    + *
  • getService(ServiceName name) + *

  • getService(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.

+ *
    + *
  • getServiceCallable() + *

+ *

CreateService

Creates a new Service in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createServiceAsync(CreateServiceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createServiceAsync(LocationName parent, Service service, String serviceId) + *

  • createServiceAsync(String parent, Service service, String serviceId) + *

+ *

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

+ *
    + *
  • createServiceOperationCallable() + *

  • createServiceCallable() + *

+ *

UpdateService

Updates the parameters of a single Service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateServiceAsync(UpdateServiceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateServiceAsync(Service service, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateServiceOperationCallable() + *

  • updateServiceCallable() + *

+ *

DeleteService

Deletes a single Service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteServiceAsync(DeleteServiceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteServiceAsync(ServiceName name) + *

  • deleteServiceAsync(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.

+ *
    + *
  • deleteServiceOperationCallable() + *

  • deleteServiceCallable() + *

+ *

ListBindings

Lists Bindings in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBindings(ListBindingsRequest request) + *

+ *

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

+ *
    + *
  • listBindings(LocationName parent) + *

  • listBindings(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.

+ *
    + *
  • listBindingsPagedCallable() + *

  • listBindingsCallable() + *

+ *

GetBinding

Gets details of a single Binding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBinding(GetBindingRequest request) + *

+ *

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

+ *
    + *
  • getBinding(BindingName name) + *

  • getBinding(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.

+ *
    + *
  • getBindingCallable() + *

+ *

CreateBinding

Creates a new Binding in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createBindingAsync(CreateBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createBindingAsync(LocationName parent, Binding binding, String bindingId) + *

  • createBindingAsync(String parent, Binding binding, String bindingId) + *

+ *

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

+ *
    + *
  • createBindingOperationCallable() + *

  • createBindingCallable() + *

+ *

UpdateBinding

Updates the parameters of a single Binding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateBindingAsync(UpdateBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateBindingAsync(Binding binding, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateBindingOperationCallable() + *

  • updateBindingCallable() + *

+ *

DeleteBinding

Deletes a single Binding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteBindingAsync(DeleteBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteBindingAsync(BindingName name) + *

  • deleteBindingAsync(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.

+ *
    + *
  • deleteBindingOperationCallable() + *

  • deleteBindingCallable() + *

+ *

FetchAvailableBindings

Fetches available Bindings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • fetchAvailableBindings(FetchAvailableBindingsRequest request) + *

+ *

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

+ *
    + *
  • fetchAvailableBindings(LocationName parent) + *

  • fetchAvailableBindings(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.

+ *
    + *
  • fetchAvailableBindingsPagedCallable() + *

  • fetchAvailableBindingsCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service. + *

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of AgentRegistrySettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AgentRegistrySettings agentRegistrySettings =
+ *     AgentRegistrySettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AgentRegistryClient agentRegistryClient = AgentRegistryClient.create(agentRegistrySettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AgentRegistrySettings agentRegistrySettings =
+ *     AgentRegistrySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AgentRegistryClient agentRegistryClient = AgentRegistryClient.create(agentRegistrySettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AgentRegistrySettings agentRegistrySettings =
+ *     AgentRegistrySettings.newHttpJsonBuilder().build();
+ * AgentRegistryClient agentRegistryClient = AgentRegistryClient.create(agentRegistrySettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class AgentRegistryClient implements BackgroundResource { + private final AgentRegistrySettings settings; + private final AgentRegistryStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of AgentRegistryClient with default settings. */ + public static final AgentRegistryClient create() throws IOException { + return create(AgentRegistrySettings.newBuilder().build()); + } + + /** + * Constructs an instance of AgentRegistryClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AgentRegistryClient create(AgentRegistrySettings settings) + throws IOException { + return new AgentRegistryClient(settings); + } + + /** + * Constructs an instance of AgentRegistryClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AgentRegistrySettings). + */ + public static final AgentRegistryClient create(AgentRegistryStub stub) { + return new AgentRegistryClient(stub); + } + + /** + * Constructs an instance of AgentRegistryClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected AgentRegistryClient(AgentRegistrySettings settings) throws IOException { + this.settings = settings; + this.stub = ((AgentRegistryStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected AgentRegistryClient(AgentRegistryStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final AgentRegistrySettings getSettings() { + return settings; + } + + public AgentRegistryStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Agent element : agentRegistryClient.listAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListAgentsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAgentsPagedResponse listAgents(LocationName parent) { + ListAgentsRequest request = + ListAgentsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listAgents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Agent element : agentRegistryClient.listAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListAgentsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAgentsPagedResponse listAgents(String parent) { + ListAgentsRequest request = ListAgentsRequest.newBuilder().setParent(parent).build(); + return listAgents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListAgentsRequest request =
+   *       ListAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Agent element : agentRegistryClient.listAgents(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAgentsPagedResponse listAgents(ListAgentsRequest request) { + return listAgentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListAgentsRequest request =
+   *       ListAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.listAgentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Agent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAgentsPagedCallable() { + return stub.listAgentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListAgentsRequest request =
+   *       ListAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListAgentsResponse response = agentRegistryClient.listAgentsCallable().call(request);
+   *     for (Agent element : response.getAgentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAgentsCallable() { + return stub.listAgentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Agent element : agentRegistryClient.searchAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for SearchAgentsRequest. Format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAgentsPagedResponse searchAgents(LocationName parent) { + SearchAgentsRequest request = + SearchAgentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return searchAgents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Agent element : agentRegistryClient.searchAgents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for SearchAgentsRequest. Format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAgentsPagedResponse searchAgents(String parent) { + SearchAgentsRequest request = SearchAgentsRequest.newBuilder().setParent(parent).build(); + return searchAgents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   SearchAgentsRequest request =
+   *       SearchAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSearchString("searchString120312793")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Agent element : agentRegistryClient.searchAgents(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAgentsPagedResponse searchAgents(SearchAgentsRequest request) { + return searchAgentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   SearchAgentsRequest request =
+   *       SearchAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSearchString("searchString120312793")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.searchAgentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Agent element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAgentsPagedCallable() { + return stub.searchAgentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches Agents in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   SearchAgentsRequest request =
+   *       SearchAgentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSearchString("searchString120312793")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchAgentsResponse response = agentRegistryClient.searchAgentsCallable().call(request);
+   *     for (Agent element : response.getAgentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable searchAgentsCallable() { + return stub.searchAgentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Agent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Agent response = agentRegistryClient.getAgent(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Agent getAgent(AgentName name) { + GetAgentRequest request = + GetAgentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAgent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Agent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   Agent response = agentRegistryClient.getAgent(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Agent getAgent(String name) { + GetAgentRequest request = GetAgentRequest.newBuilder().setName(name).build(); + return getAgent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Agent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetAgentRequest request =
+   *       GetAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   Agent response = agentRegistryClient.getAgent(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Agent getAgent(GetAgentRequest request) { + return getAgentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Agent. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetAgentRequest request =
+   *       GetAgentRequest.newBuilder()
+   *           .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.getAgentCallable().futureCall(request);
+   *   // Do something.
+   *   Agent response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAgentCallable() { + return stub.getAgentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Endpoint element : agentRegistryClient.listEndpoints(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list endpoints in. Expected format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEndpointsPagedResponse listEndpoints(LocationName parent) { + ListEndpointsRequest request = + ListEndpointsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEndpoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Endpoint element : agentRegistryClient.listEndpoints(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list endpoints in. Expected format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEndpointsPagedResponse listEndpoints(String parent) { + ListEndpointsRequest request = ListEndpointsRequest.newBuilder().setParent(parent).build(); + return listEndpoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListEndpointsRequest request =
+   *       ListEndpointsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Endpoint element : agentRegistryClient.listEndpoints(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEndpointsPagedResponse listEndpoints(ListEndpointsRequest request) { + return listEndpointsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListEndpointsRequest request =
+   *       ListEndpointsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       agentRegistryClient.listEndpointsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Endpoint element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEndpointsPagedCallable() { + return stub.listEndpointsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Endpoints in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListEndpointsRequest request =
+   *       ListEndpointsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListEndpointsResponse response = agentRegistryClient.listEndpointsCallable().call(request);
+   *     for (Endpoint element : response.getEndpointsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listEndpointsCallable() { + return stub.listEndpointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+   *   Endpoint response = agentRegistryClient.getEndpoint(name);
+   * }
+   * }
+ * + * @param name Required. The name of the endpoint to retrieve. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Endpoint getEndpoint(EndpointName name) { + GetEndpointRequest request = + GetEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getEndpoint(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+   *   Endpoint response = agentRegistryClient.getEndpoint(name);
+   * }
+   * }
+ * + * @param name Required. The name of the endpoint to retrieve. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Endpoint getEndpoint(String name) { + GetEndpointRequest request = GetEndpointRequest.newBuilder().setName(name).build(); + return getEndpoint(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetEndpointRequest request =
+   *       GetEndpointRequest.newBuilder()
+   *           .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .build();
+   *   Endpoint response = agentRegistryClient.getEndpoint(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Endpoint getEndpoint(GetEndpointRequest request) { + return getEndpointCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetEndpointRequest request =
+   *       GetEndpointRequest.newBuilder()
+   *           .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.getEndpointCallable().futureCall(request);
+   *   // Do something.
+   *   Endpoint response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getEndpointCallable() { + return stub.getEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (McpServer element : agentRegistryClient.listMcpServers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListMcpServersRequest. Format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMcpServersPagedResponse listMcpServers(LocationName parent) { + ListMcpServersRequest request = + ListMcpServersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMcpServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (McpServer element : agentRegistryClient.listMcpServers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListMcpServersRequest. Format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMcpServersPagedResponse listMcpServers(String parent) { + ListMcpServersRequest request = ListMcpServersRequest.newBuilder().setParent(parent).build(); + return listMcpServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListMcpServersRequest request =
+   *       ListMcpServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (McpServer element : agentRegistryClient.listMcpServers(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMcpServersPagedResponse listMcpServers(ListMcpServersRequest request) { + return listMcpServersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListMcpServersRequest request =
+   *       ListMcpServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       agentRegistryClient.listMcpServersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (McpServer element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMcpServersPagedCallable() { + return stub.listMcpServersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListMcpServersRequest request =
+   *       ListMcpServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListMcpServersResponse response =
+   *         agentRegistryClient.listMcpServersCallable().call(request);
+   *     for (McpServer element : response.getMcpServersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMcpServersCallable() { + return stub.listMcpServersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (McpServer element : agentRegistryClient.searchMcpServers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for SearchMcpServersRequest. Format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchMcpServersPagedResponse searchMcpServers(LocationName parent) { + SearchMcpServersRequest request = + SearchMcpServersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return searchMcpServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (McpServer element : agentRegistryClient.searchMcpServers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for SearchMcpServersRequest. Format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchMcpServersPagedResponse searchMcpServers(String parent) { + SearchMcpServersRequest request = + SearchMcpServersRequest.newBuilder().setParent(parent).build(); + return searchMcpServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   SearchMcpServersRequest request =
+   *       SearchMcpServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSearchString("searchString120312793")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (McpServer element : agentRegistryClient.searchMcpServers(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchMcpServersPagedResponse searchMcpServers(SearchMcpServersRequest request) { + return searchMcpServersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   SearchMcpServersRequest request =
+   *       SearchMcpServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSearchString("searchString120312793")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       agentRegistryClient.searchMcpServersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (McpServer element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchMcpServersPagedCallable() { + return stub.searchMcpServersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches McpServers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   SearchMcpServersRequest request =
+   *       SearchMcpServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSearchString("searchString120312793")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchMcpServersResponse response =
+   *         agentRegistryClient.searchMcpServersCallable().call(request);
+   *     for (McpServer element : response.getMcpServersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchMcpServersCallable() { + return stub.searchMcpServersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single McpServer. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   McpServerName name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]");
+   *   McpServer response = agentRegistryClient.getMcpServer(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final McpServer getMcpServer(McpServerName name) { + GetMcpServerRequest request = + GetMcpServerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getMcpServer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single McpServer. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString();
+   *   McpServer response = agentRegistryClient.getMcpServer(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final McpServer getMcpServer(String name) { + GetMcpServerRequest request = GetMcpServerRequest.newBuilder().setName(name).build(); + return getMcpServer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single McpServer. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetMcpServerRequest request =
+   *       GetMcpServerRequest.newBuilder()
+   *           .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString())
+   *           .build();
+   *   McpServer response = agentRegistryClient.getMcpServer(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final McpServer getMcpServer(GetMcpServerRequest request) { + return getMcpServerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single McpServer. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetMcpServerRequest request =
+   *       GetMcpServerRequest.newBuilder()
+   *           .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString())
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.getMcpServerCallable().futureCall(request);
+   *   // Do something.
+   *   McpServer response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getMcpServerCallable() { + return stub.getMcpServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Services in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Service element : agentRegistryClient.listServices(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list services in. Expected format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServicesPagedResponse listServices(LocationName parent) { + ListServicesRequest request = + ListServicesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listServices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Services in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Service element : agentRegistryClient.listServices(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list services in. Expected format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServicesPagedResponse listServices(String parent) { + ListServicesRequest request = ListServicesRequest.newBuilder().setParent(parent).build(); + return listServices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Services in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListServicesRequest request =
+   *       ListServicesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Service element : agentRegistryClient.listServices(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServicesPagedResponse listServices(ListServicesRequest request) { + return listServicesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Services in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListServicesRequest request =
+   *       ListServicesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       agentRegistryClient.listServicesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Service element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServicesPagedCallable() { + return stub.listServicesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Services in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListServicesRequest request =
+   *       ListServicesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListServicesResponse response = agentRegistryClient.listServicesCallable().call(request);
+   *     for (Service element : response.getServicesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listServicesCallable() { + return stub.listServicesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+   *   Service response = agentRegistryClient.getService(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Service. Format: + * `projects/{project}/locations/{location}/services/{service}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Service getService(ServiceName name) { + GetServiceRequest request = + GetServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getService(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+   *   Service response = agentRegistryClient.getService(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Service. Format: + * `projects/{project}/locations/{location}/services/{service}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Service getService(String name) { + GetServiceRequest request = GetServiceRequest.newBuilder().setName(name).build(); + return getService(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetServiceRequest request =
+   *       GetServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .build();
+   *   Service response = agentRegistryClient.getService(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Service getService(GetServiceRequest request) { + return getServiceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetServiceRequest request =
+   *       GetServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.getServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getServiceCallable() { + return stub.getServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Service in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Service service = Service.newBuilder().build();
+   *   String serviceId = "serviceId-194185552";
+   *   Service response = agentRegistryClient.createServiceAsync(parent, service, serviceId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the Service in. Expected format: + * `projects/{project}/locations/{location}`. + * @param service Required. The Service resource that is being created. Format: + * `projects/{project}/locations/{location}/services/{service}`. + * @param serviceId Required. The ID to use for the service, which will become the final component + * of the service's resource name. + *

This value should be 4-63 characters, and valid characters are `/[a-z][0-9]-/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createServiceAsync( + LocationName parent, Service service, String serviceId) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setService(service) + .setServiceId(serviceId) + .build(); + return createServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Service in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Service service = Service.newBuilder().build();
+   *   String serviceId = "serviceId-194185552";
+   *   Service response = agentRegistryClient.createServiceAsync(parent, service, serviceId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the Service in. Expected format: + * `projects/{project}/locations/{location}`. + * @param service Required. The Service resource that is being created. Format: + * `projects/{project}/locations/{location}/services/{service}`. + * @param serviceId Required. The ID to use for the service, which will become the final component + * of the service's resource name. + *

This value should be 4-63 characters, and valid characters are `/[a-z][0-9]-/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createServiceAsync( + String parent, Service service, String serviceId) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(parent) + .setService(service) + .setServiceId(serviceId) + .build(); + return createServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Service in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServiceId("serviceId-194185552")
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Service response = agentRegistryClient.createServiceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createServiceAsync( + CreateServiceRequest request) { + return createServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Service in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServiceId("serviceId-194185552")
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       agentRegistryClient.createServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createServiceOperationCallable() { + return stub.createServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Service in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServiceId("serviceId-194185552")
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.createServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createServiceCallable() { + return stub.createServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   Service service = Service.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Service response = agentRegistryClient.updateServiceAsync(service, updateMask).get();
+   * }
+   * }
+ * + * @param service Required. The Service resource that is being updated. Format: + * `projects/{project}/locations/{location}/services/{service}`. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Service resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields present in the request will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateServiceAsync( + Service service, FieldMask updateMask) { + UpdateServiceRequest request = + UpdateServiceRequest.newBuilder().setService(service).setUpdateMask(updateMask).build(); + return updateServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Service response = agentRegistryClient.updateServiceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateServiceAsync( + UpdateServiceRequest request) { + return updateServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       agentRegistryClient.updateServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateServiceOperationCallable() { + return stub.updateServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.updateServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateServiceCallable() { + return stub.updateServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+   *   agentRegistryClient.deleteServiceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Service. Format: + * `projects/{project}/locations/{location}/services/{service}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServiceAsync(ServiceName name) { + DeleteServiceRequest request = + DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+   *   agentRegistryClient.deleteServiceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Service. Format: + * `projects/{project}/locations/{location}/services/{service}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServiceAsync(String name) { + DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build(); + return deleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   agentRegistryClient.deleteServiceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServiceAsync( + DeleteServiceRequest request) { + return deleteServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       agentRegistryClient.deleteServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteServiceOperationCallable() { + return stub.deleteServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.deleteServiceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteServiceCallable() { + return stub.deleteServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Bindings in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Binding element : agentRegistryClient.listBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list bindings in. Expected format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBindingsPagedResponse listBindings(LocationName parent) { + ListBindingsRequest request = + ListBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Bindings in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Binding element : agentRegistryClient.listBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list bindings in. Expected format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBindingsPagedResponse listBindings(String parent) { + ListBindingsRequest request = ListBindingsRequest.newBuilder().setParent(parent).build(); + return listBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Bindings in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListBindingsRequest request =
+   *       ListBindingsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Binding element : agentRegistryClient.listBindings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBindingsPagedResponse listBindings(ListBindingsRequest request) { + return listBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Bindings in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListBindingsRequest request =
+   *       ListBindingsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       agentRegistryClient.listBindingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Binding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBindingsPagedCallable() { + return stub.listBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Bindings in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListBindingsRequest request =
+   *       ListBindingsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListBindingsResponse response = agentRegistryClient.listBindingsCallable().call(request);
+   *     for (Binding element : response.getBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listBindingsCallable() { + return stub.listBindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]");
+   *   Binding response = agentRegistryClient.getBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Binding. Format: + * `projects/{project}/locations/{location}/bindings/{binding}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Binding getBinding(BindingName name) { + GetBindingRequest request = + GetBindingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString();
+   *   Binding response = agentRegistryClient.getBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Binding. Format: + * `projects/{project}/locations/{location}/bindings/{binding}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Binding getBinding(String name) { + GetBindingRequest request = GetBindingRequest.newBuilder().setName(name).build(); + return getBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetBindingRequest request =
+   *       GetBindingRequest.newBuilder()
+   *           .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+   *           .build();
+   *   Binding response = agentRegistryClient.getBinding(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Binding getBinding(GetBindingRequest request) { + return getBindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetBindingRequest request =
+   *       GetBindingRequest.newBuilder()
+   *           .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.getBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Binding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBindingCallable() { + return stub.getBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Binding in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Binding binding = Binding.newBuilder().build();
+   *   String bindingId = "bindingId-920966528";
+   *   Binding response = agentRegistryClient.createBindingAsync(parent, binding, bindingId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the Binding in. Expected format: + * `projects/{project}/locations/{location}`. + * @param binding Required. The Binding resource that is being created. + * @param bindingId Required. The ID to use for the binding, which will become the final component + * of the binding's resource name. + *

This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it + * must match the regular expression `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBindingAsync( + LocationName parent, Binding binding, String bindingId) { + CreateBindingRequest request = + CreateBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBinding(binding) + .setBindingId(bindingId) + .build(); + return createBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Binding in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Binding binding = Binding.newBuilder().build();
+   *   String bindingId = "bindingId-920966528";
+   *   Binding response = agentRegistryClient.createBindingAsync(parent, binding, bindingId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the Binding in. Expected format: + * `projects/{project}/locations/{location}`. + * @param binding Required. The Binding resource that is being created. + * @param bindingId Required. The ID to use for the binding, which will become the final component + * of the binding's resource name. + *

This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it + * must match the regular expression `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBindingAsync( + String parent, Binding binding, String bindingId) { + CreateBindingRequest request = + CreateBindingRequest.newBuilder() + .setParent(parent) + .setBinding(binding) + .setBindingId(bindingId) + .build(); + return createBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Binding in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   CreateBindingRequest request =
+   *       CreateBindingRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBindingId("bindingId-920966528")
+   *           .setBinding(Binding.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Binding response = agentRegistryClient.createBindingAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBindingAsync( + CreateBindingRequest request) { + return createBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Binding in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   CreateBindingRequest request =
+   *       CreateBindingRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBindingId("bindingId-920966528")
+   *           .setBinding(Binding.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       agentRegistryClient.createBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Binding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBindingOperationCallable() { + return stub.createBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Binding in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   CreateBindingRequest request =
+   *       CreateBindingRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBindingId("bindingId-920966528")
+   *           .setBinding(Binding.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.createBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBindingCallable() { + return stub.createBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   Binding binding = Binding.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Binding response = agentRegistryClient.updateBindingAsync(binding, updateMask).get();
+   * }
+   * }
+ * + * @param binding Required. The Binding resource that is being updated. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Binding resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields present in the request will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateBindingAsync( + Binding binding, FieldMask updateMask) { + UpdateBindingRequest request = + UpdateBindingRequest.newBuilder().setBinding(binding).setUpdateMask(updateMask).build(); + return updateBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   UpdateBindingRequest request =
+   *       UpdateBindingRequest.newBuilder()
+   *           .setBinding(Binding.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Binding response = agentRegistryClient.updateBindingAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateBindingAsync( + UpdateBindingRequest request) { + return updateBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   UpdateBindingRequest request =
+   *       UpdateBindingRequest.newBuilder()
+   *           .setBinding(Binding.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       agentRegistryClient.updateBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Binding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateBindingOperationCallable() { + return stub.updateBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   UpdateBindingRequest request =
+   *       UpdateBindingRequest.newBuilder()
+   *           .setBinding(Binding.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.updateBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateBindingCallable() { + return stub.updateBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]");
+   *   agentRegistryClient.deleteBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Binding. Format: + * `projects/{project}/locations/{location}/bindings/{binding}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBindingAsync(BindingName name) { + DeleteBindingRequest request = + DeleteBindingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString();
+   *   agentRegistryClient.deleteBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the Binding. Format: + * `projects/{project}/locations/{location}/bindings/{binding}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBindingAsync(String name) { + DeleteBindingRequest request = DeleteBindingRequest.newBuilder().setName(name).build(); + return deleteBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   DeleteBindingRequest request =
+   *       DeleteBindingRequest.newBuilder()
+   *           .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   agentRegistryClient.deleteBindingAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBindingAsync( + DeleteBindingRequest request) { + return deleteBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   DeleteBindingRequest request =
+   *       DeleteBindingRequest.newBuilder()
+   *           .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       agentRegistryClient.deleteBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBindingOperationCallable() { + return stub.deleteBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Binding. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   DeleteBindingRequest request =
+   *       DeleteBindingRequest.newBuilder()
+   *           .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = agentRegistryClient.deleteBindingCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBindingCallable() { + return stub.deleteBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches available Bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Binding element : agentRegistryClient.fetchAvailableBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, in the format `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchAvailableBindingsPagedResponse fetchAvailableBindings(LocationName parent) { + FetchAvailableBindingsRequest request = + FetchAvailableBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return fetchAvailableBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches available Bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Binding element : agentRegistryClient.fetchAvailableBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, in the format `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchAvailableBindingsPagedResponse fetchAvailableBindings(String parent) { + FetchAvailableBindingsRequest request = + FetchAvailableBindingsRequest.newBuilder().setParent(parent).build(); + return fetchAvailableBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches available Bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   FetchAvailableBindingsRequest request =
+   *       FetchAvailableBindingsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Binding element : agentRegistryClient.fetchAvailableBindings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchAvailableBindingsPagedResponse fetchAvailableBindings( + FetchAvailableBindingsRequest request) { + return fetchAvailableBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches available Bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   FetchAvailableBindingsRequest request =
+   *       FetchAvailableBindingsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       agentRegistryClient.fetchAvailableBindingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Binding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + fetchAvailableBindingsPagedCallable() { + return stub.fetchAvailableBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches available Bindings. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   FetchAvailableBindingsRequest request =
+   *       FetchAvailableBindingsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     FetchAvailableBindingsResponse response =
+   *         agentRegistryClient.fetchAvailableBindingsCallable().call(request);
+   *     for (Binding element : response.getBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + fetchAvailableBindingsCallable() { + return stub.fetchAvailableBindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : agentRegistryClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       agentRegistryClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = agentRegistryClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = agentRegistryClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = agentRegistryClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAgentsPagedResponse + extends AbstractPagedListResponse< + ListAgentsRequest, + ListAgentsResponse, + Agent, + ListAgentsPage, + ListAgentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAgentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListAgentsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListAgentsPagedResponse(ListAgentsPage page) { + super(page, ListAgentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAgentsPage + extends AbstractPage { + + private ListAgentsPage( + PageContext context, + ListAgentsResponse response) { + super(context, response); + } + + private static ListAgentsPage createEmptyPage() { + return new ListAgentsPage(null, null); + } + + @Override + protected ListAgentsPage createPage( + PageContext context, + ListAgentsResponse response) { + return new ListAgentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAgentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAgentsRequest, + ListAgentsResponse, + Agent, + ListAgentsPage, + ListAgentsFixedSizeCollection> { + + private ListAgentsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAgentsFixedSizeCollection createEmptyCollection() { + return new ListAgentsFixedSizeCollection(null, 0); + } + + @Override + protected ListAgentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAgentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchAgentsPagedResponse + extends AbstractPagedListResponse< + SearchAgentsRequest, + SearchAgentsResponse, + Agent, + SearchAgentsPage, + SearchAgentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchAgentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchAgentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchAgentsPagedResponse(SearchAgentsPage page) { + super(page, SearchAgentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchAgentsPage + extends AbstractPage { + + private SearchAgentsPage( + PageContext context, + SearchAgentsResponse response) { + super(context, response); + } + + private static SearchAgentsPage createEmptyPage() { + return new SearchAgentsPage(null, null); + } + + @Override + protected SearchAgentsPage createPage( + PageContext context, + SearchAgentsResponse response) { + return new SearchAgentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchAgentsFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchAgentsRequest, + SearchAgentsResponse, + Agent, + SearchAgentsPage, + SearchAgentsFixedSizeCollection> { + + private SearchAgentsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchAgentsFixedSizeCollection createEmptyCollection() { + return new SearchAgentsFixedSizeCollection(null, 0); + } + + @Override + protected SearchAgentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchAgentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListEndpointsPagedResponse + extends AbstractPagedListResponse< + ListEndpointsRequest, + ListEndpointsResponse, + Endpoint, + ListEndpointsPage, + ListEndpointsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListEndpointsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListEndpointsPagedResponse(ListEndpointsPage page) { + super(page, ListEndpointsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEndpointsPage + extends AbstractPage< + ListEndpointsRequest, ListEndpointsResponse, Endpoint, ListEndpointsPage> { + + private ListEndpointsPage( + PageContext context, + ListEndpointsResponse response) { + super(context, response); + } + + private static ListEndpointsPage createEmptyPage() { + return new ListEndpointsPage(null, null); + } + + @Override + protected ListEndpointsPage createPage( + PageContext context, + ListEndpointsResponse response) { + return new ListEndpointsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEndpointsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEndpointsRequest, + ListEndpointsResponse, + Endpoint, + ListEndpointsPage, + ListEndpointsFixedSizeCollection> { + + private ListEndpointsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEndpointsFixedSizeCollection createEmptyCollection() { + return new ListEndpointsFixedSizeCollection(null, 0); + } + + @Override + protected ListEndpointsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEndpointsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListMcpServersPagedResponse + extends AbstractPagedListResponse< + ListMcpServersRequest, + ListMcpServersResponse, + McpServer, + ListMcpServersPage, + ListMcpServersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMcpServersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMcpServersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMcpServersPagedResponse(ListMcpServersPage page) { + super(page, ListMcpServersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMcpServersPage + extends AbstractPage< + ListMcpServersRequest, ListMcpServersResponse, McpServer, ListMcpServersPage> { + + private ListMcpServersPage( + PageContext context, + ListMcpServersResponse response) { + super(context, response); + } + + private static ListMcpServersPage createEmptyPage() { + return new ListMcpServersPage(null, null); + } + + @Override + protected ListMcpServersPage createPage( + PageContext context, + ListMcpServersResponse response) { + return new ListMcpServersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMcpServersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMcpServersRequest, + ListMcpServersResponse, + McpServer, + ListMcpServersPage, + ListMcpServersFixedSizeCollection> { + + private ListMcpServersFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMcpServersFixedSizeCollection createEmptyCollection() { + return new ListMcpServersFixedSizeCollection(null, 0); + } + + @Override + protected ListMcpServersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMcpServersFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchMcpServersPagedResponse + extends AbstractPagedListResponse< + SearchMcpServersRequest, + SearchMcpServersResponse, + McpServer, + SearchMcpServersPage, + SearchMcpServersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchMcpServersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchMcpServersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchMcpServersPagedResponse(SearchMcpServersPage page) { + super(page, SearchMcpServersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchMcpServersPage + extends AbstractPage< + SearchMcpServersRequest, SearchMcpServersResponse, McpServer, SearchMcpServersPage> { + + private SearchMcpServersPage( + PageContext context, + SearchMcpServersResponse response) { + super(context, response); + } + + private static SearchMcpServersPage createEmptyPage() { + return new SearchMcpServersPage(null, null); + } + + @Override + protected SearchMcpServersPage createPage( + PageContext context, + SearchMcpServersResponse response) { + return new SearchMcpServersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchMcpServersFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchMcpServersRequest, + SearchMcpServersResponse, + McpServer, + SearchMcpServersPage, + SearchMcpServersFixedSizeCollection> { + + private SearchMcpServersFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchMcpServersFixedSizeCollection createEmptyCollection() { + return new SearchMcpServersFixedSizeCollection(null, 0); + } + + @Override + protected SearchMcpServersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchMcpServersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListServicesPagedResponse + extends AbstractPagedListResponse< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListServicesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListServicesPagedResponse(ListServicesPage page) { + super(page, ListServicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListServicesPage + extends AbstractPage { + + private ListServicesPage( + PageContext context, + ListServicesResponse response) { + super(context, response); + } + + private static ListServicesPage createEmptyPage() { + return new ListServicesPage(null, null); + } + + @Override + protected ListServicesPage createPage( + PageContext context, + ListServicesResponse response) { + return new ListServicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListServicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + private ListServicesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListServicesFixedSizeCollection createEmptyCollection() { + return new ListServicesFixedSizeCollection(null, 0); + } + + @Override + protected ListServicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListServicesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBindingsPagedResponse + extends AbstractPagedListResponse< + ListBindingsRequest, + ListBindingsResponse, + Binding, + ListBindingsPage, + ListBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListBindingsPagedResponse(ListBindingsPage page) { + super(page, ListBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBindingsPage + extends AbstractPage { + + private ListBindingsPage( + PageContext context, + ListBindingsResponse response) { + super(context, response); + } + + private static ListBindingsPage createEmptyPage() { + return new ListBindingsPage(null, null); + } + + @Override + protected ListBindingsPage createPage( + PageContext context, + ListBindingsResponse response) { + return new ListBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBindingsRequest, + ListBindingsResponse, + Binding, + ListBindingsPage, + ListBindingsFixedSizeCollection> { + + private ListBindingsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBindingsFixedSizeCollection createEmptyCollection() { + return new ListBindingsFixedSizeCollection(null, 0); + } + + @Override + protected ListBindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListBindingsFixedSizeCollection(pages, collectionSize); + } + } + + public static class FetchAvailableBindingsPagedResponse + extends AbstractPagedListResponse< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + Binding, + FetchAvailableBindingsPage, + FetchAvailableBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + FetchAvailableBindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new FetchAvailableBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private FetchAvailableBindingsPagedResponse(FetchAvailableBindingsPage page) { + super(page, FetchAvailableBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class FetchAvailableBindingsPage + extends AbstractPage< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + Binding, + FetchAvailableBindingsPage> { + + private FetchAvailableBindingsPage( + PageContext context, + FetchAvailableBindingsResponse response) { + super(context, response); + } + + private static FetchAvailableBindingsPage createEmptyPage() { + return new FetchAvailableBindingsPage(null, null); + } + + @Override + protected FetchAvailableBindingsPage createPage( + PageContext context, + FetchAvailableBindingsResponse response) { + return new FetchAvailableBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class FetchAvailableBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + Binding, + FetchAvailableBindingsPage, + FetchAvailableBindingsFixedSizeCollection> { + + private FetchAvailableBindingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static FetchAvailableBindingsFixedSizeCollection createEmptyCollection() { + return new FetchAvailableBindingsFixedSizeCollection(null, 0); + } + + @Override + protected FetchAvailableBindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new FetchAvailableBindingsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistrySettings.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistrySettings.java new file mode 100644 index 000000000000..e9eb5a028d3c --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistrySettings.java @@ -0,0 +1,562 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.FetchAvailableBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListEndpointsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListLocationsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListMcpServersPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListServicesPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchMcpServersPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.agentregistry.v1.stub.AgentRegistryStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AgentRegistryClient}. + * + *

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

    + *
  • The default service address (agentregistry.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 getAgent: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AgentRegistrySettings.Builder agentRegistrySettingsBuilder = AgentRegistrySettings.newBuilder();
+ * agentRegistrySettingsBuilder
+ *     .getAgentSettings()
+ *     .setRetrySettings(
+ *         agentRegistrySettingsBuilder
+ *             .getAgentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * AgentRegistrySettings agentRegistrySettings = agentRegistrySettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createService: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AgentRegistrySettings.Builder agentRegistrySettingsBuilder = AgentRegistrySettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * agentRegistrySettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AgentRegistrySettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listAgents. */ + public PagedCallSettings + listAgentsSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).listAgentsSettings(); + } + + /** Returns the object with the settings used for calls to searchAgents. */ + public PagedCallSettings + searchAgentsSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).searchAgentsSettings(); + } + + /** Returns the object with the settings used for calls to getAgent. */ + public UnaryCallSettings getAgentSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).getAgentSettings(); + } + + /** Returns the object with the settings used for calls to listEndpoints. */ + public PagedCallSettings + listEndpointsSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).listEndpointsSettings(); + } + + /** Returns the object with the settings used for calls to getEndpoint. */ + public UnaryCallSettings getEndpointSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).getEndpointSettings(); + } + + /** Returns the object with the settings used for calls to listMcpServers. */ + public PagedCallSettings< + ListMcpServersRequest, ListMcpServersResponse, ListMcpServersPagedResponse> + listMcpServersSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).listMcpServersSettings(); + } + + /** Returns the object with the settings used for calls to searchMcpServers. */ + public PagedCallSettings< + SearchMcpServersRequest, SearchMcpServersResponse, SearchMcpServersPagedResponse> + searchMcpServersSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).searchMcpServersSettings(); + } + + /** Returns the object with the settings used for calls to getMcpServer. */ + public UnaryCallSettings getMcpServerSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).getMcpServerSettings(); + } + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).listServicesSettings(); + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).getServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).createServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).createServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).updateServiceSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).updateServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).deleteServiceSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).deleteServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listBindings. */ + public PagedCallSettings + listBindingsSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).listBindingsSettings(); + } + + /** Returns the object with the settings used for calls to getBinding. */ + public UnaryCallSettings getBindingSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).getBindingSettings(); + } + + /** Returns the object with the settings used for calls to createBinding. */ + public UnaryCallSettings createBindingSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).createBindingSettings(); + } + + /** Returns the object with the settings used for calls to createBinding. */ + public OperationCallSettings + createBindingOperationSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).createBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateBinding. */ + public UnaryCallSettings updateBindingSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).updateBindingSettings(); + } + + /** Returns the object with the settings used for calls to updateBinding. */ + public OperationCallSettings + updateBindingOperationSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).updateBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteBinding. */ + public UnaryCallSettings deleteBindingSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).deleteBindingSettings(); + } + + /** Returns the object with the settings used for calls to deleteBinding. */ + public OperationCallSettings + deleteBindingOperationSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).deleteBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to fetchAvailableBindings. */ + public PagedCallSettings< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + FetchAvailableBindingsPagedResponse> + fetchAvailableBindingsSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).fetchAvailableBindingsSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((AgentRegistryStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final AgentRegistrySettings create(AgentRegistryStubSettings stub) + throws IOException { + return new AgentRegistrySettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AgentRegistryStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AgentRegistryStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AgentRegistryStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AgentRegistryStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AgentRegistryStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AgentRegistryStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AgentRegistryStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AgentRegistryStubSettings.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(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 AgentRegistrySettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AgentRegistrySettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AgentRegistryStubSettings.newBuilder(clientContext)); + } + + protected Builder(AgentRegistrySettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AgentRegistryStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AgentRegistryStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(AgentRegistryStubSettings.newHttpJsonBuilder()); + } + + public AgentRegistryStubSettings.Builder getStubSettingsBuilder() { + return ((AgentRegistryStubSettings.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 listAgents. */ + public PagedCallSettings.Builder + listAgentsSettings() { + return getStubSettingsBuilder().listAgentsSettings(); + } + + /** Returns the builder for the settings used for calls to searchAgents. */ + public PagedCallSettings.Builder< + SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse> + searchAgentsSettings() { + return getStubSettingsBuilder().searchAgentsSettings(); + } + + /** Returns the builder for the settings used for calls to getAgent. */ + public UnaryCallSettings.Builder getAgentSettings() { + return getStubSettingsBuilder().getAgentSettings(); + } + + /** Returns the builder for the settings used for calls to listEndpoints. */ + public PagedCallSettings.Builder< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + listEndpointsSettings() { + return getStubSettingsBuilder().listEndpointsSettings(); + } + + /** Returns the builder for the settings used for calls to getEndpoint. */ + public UnaryCallSettings.Builder getEndpointSettings() { + return getStubSettingsBuilder().getEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to listMcpServers. */ + public PagedCallSettings.Builder< + ListMcpServersRequest, ListMcpServersResponse, ListMcpServersPagedResponse> + listMcpServersSettings() { + return getStubSettingsBuilder().listMcpServersSettings(); + } + + /** Returns the builder for the settings used for calls to searchMcpServers. */ + public PagedCallSettings.Builder< + SearchMcpServersRequest, SearchMcpServersResponse, SearchMcpServersPagedResponse> + searchMcpServersSettings() { + return getStubSettingsBuilder().searchMcpServersSettings(); + } + + /** Returns the builder for the settings used for calls to getMcpServer. */ + public UnaryCallSettings.Builder getMcpServerSettings() { + return getStubSettingsBuilder().getMcpServerSettings(); + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return getStubSettingsBuilder().listServicesSettings(); + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getStubSettingsBuilder().getServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return getStubSettingsBuilder().createServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public OperationCallSettings.Builder + createServiceOperationSettings() { + return getStubSettingsBuilder().createServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return getStubSettingsBuilder().updateServiceSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return getStubSettingsBuilder().updateServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return getStubSettingsBuilder().deleteServiceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return getStubSettingsBuilder().deleteServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listBindings. */ + public PagedCallSettings.Builder< + ListBindingsRequest, ListBindingsResponse, ListBindingsPagedResponse> + listBindingsSettings() { + return getStubSettingsBuilder().listBindingsSettings(); + } + + /** Returns the builder for the settings used for calls to getBinding. */ + public UnaryCallSettings.Builder getBindingSettings() { + return getStubSettingsBuilder().getBindingSettings(); + } + + /** Returns the builder for the settings used for calls to createBinding. */ + public UnaryCallSettings.Builder createBindingSettings() { + return getStubSettingsBuilder().createBindingSettings(); + } + + /** Returns the builder for the settings used for calls to createBinding. */ + public OperationCallSettings.Builder + createBindingOperationSettings() { + return getStubSettingsBuilder().createBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateBinding. */ + public UnaryCallSettings.Builder updateBindingSettings() { + return getStubSettingsBuilder().updateBindingSettings(); + } + + /** Returns the builder for the settings used for calls to updateBinding. */ + public OperationCallSettings.Builder + updateBindingOperationSettings() { + return getStubSettingsBuilder().updateBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBinding. */ + public UnaryCallSettings.Builder deleteBindingSettings() { + return getStubSettingsBuilder().deleteBindingSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBinding. */ + public OperationCallSettings.Builder + deleteBindingOperationSettings() { + return getStubSettingsBuilder().deleteBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to fetchAvailableBindings. */ + public PagedCallSettings.Builder< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + FetchAvailableBindingsPagedResponse> + fetchAvailableBindingsSettings() { + return getStubSettingsBuilder().fetchAvailableBindingsSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public AgentRegistrySettings build() throws IOException { + return new AgentRegistrySettings(this); + } + } +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/gapic_metadata.json b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/gapic_metadata.json new file mode 100644 index 000000000000..27dc690c6170 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/gapic_metadata.json @@ -0,0 +1,81 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.agentregistry.v1", + "libraryPackage": "com.google.cloud.agentregistry.v1", + "services": { + "AgentRegistry": { + "clients": { + "grpc": { + "libraryClient": "AgentRegistryClient", + "rpcs": { + "CreateBinding": { + "methods": ["createBindingAsync", "createBindingAsync", "createBindingAsync", "createBindingOperationCallable", "createBindingCallable"] + }, + "CreateService": { + "methods": ["createServiceAsync", "createServiceAsync", "createServiceAsync", "createServiceOperationCallable", "createServiceCallable"] + }, + "DeleteBinding": { + "methods": ["deleteBindingAsync", "deleteBindingAsync", "deleteBindingAsync", "deleteBindingOperationCallable", "deleteBindingCallable"] + }, + "DeleteService": { + "methods": ["deleteServiceAsync", "deleteServiceAsync", "deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"] + }, + "FetchAvailableBindings": { + "methods": ["fetchAvailableBindings", "fetchAvailableBindings", "fetchAvailableBindings", "fetchAvailableBindingsPagedCallable", "fetchAvailableBindingsCallable"] + }, + "GetAgent": { + "methods": ["getAgent", "getAgent", "getAgent", "getAgentCallable"] + }, + "GetBinding": { + "methods": ["getBinding", "getBinding", "getBinding", "getBindingCallable"] + }, + "GetEndpoint": { + "methods": ["getEndpoint", "getEndpoint", "getEndpoint", "getEndpointCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetMcpServer": { + "methods": ["getMcpServer", "getMcpServer", "getMcpServer", "getMcpServerCallable"] + }, + "GetService": { + "methods": ["getService", "getService", "getService", "getServiceCallable"] + }, + "ListAgents": { + "methods": ["listAgents", "listAgents", "listAgents", "listAgentsPagedCallable", "listAgentsCallable"] + }, + "ListBindings": { + "methods": ["listBindings", "listBindings", "listBindings", "listBindingsPagedCallable", "listBindingsCallable"] + }, + "ListEndpoints": { + "methods": ["listEndpoints", "listEndpoints", "listEndpoints", "listEndpointsPagedCallable", "listEndpointsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListMcpServers": { + "methods": ["listMcpServers", "listMcpServers", "listMcpServers", "listMcpServersPagedCallable", "listMcpServersCallable"] + }, + "ListServices": { + "methods": ["listServices", "listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"] + }, + "SearchAgents": { + "methods": ["searchAgents", "searchAgents", "searchAgents", "searchAgentsPagedCallable", "searchAgentsCallable"] + }, + "SearchMcpServers": { + "methods": ["searchMcpServers", "searchMcpServers", "searchMcpServers", "searchMcpServersPagedCallable", "searchMcpServersCallable"] + }, + "UpdateBinding": { + "methods": ["updateBindingAsync", "updateBindingAsync", "updateBindingOperationCallable", "updateBindingCallable"] + }, + "UpdateService": { + "methods": ["updateServiceAsync", "updateServiceAsync", "updateServiceOperationCallable", "updateServiceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/package-info.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/package-info.java new file mode 100644 index 000000000000..d21ff3ab2b69 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/package-info.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. + */ + +/** + * A client to Agent Registry API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= AgentRegistryClient ======================= + * + *

Service Description: Service for managing Agents, Endpoints, McpServers, Services, and + * Bindings. + * + *

Sample for AgentRegistryClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) {
+ *   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Agent response = agentRegistryClient.getAgent(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.agentregistry.v1; + +import javax.annotation.Generated; diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStub.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStub.java new file mode 100644 index 000000000000..c2523ee90dfa --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStub.java @@ -0,0 +1,251 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.stub; + +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.FetchAvailableBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListEndpointsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListLocationsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListMcpServersPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListServicesPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchMcpServersPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.CreateBindingRequest; +import com.google.cloud.agentregistry.v1.CreateServiceRequest; +import com.google.cloud.agentregistry.v1.DeleteBindingRequest; +import com.google.cloud.agentregistry.v1.DeleteServiceRequest; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse; +import com.google.cloud.agentregistry.v1.GetAgentRequest; +import com.google.cloud.agentregistry.v1.GetBindingRequest; +import com.google.cloud.agentregistry.v1.GetEndpointRequest; +import com.google.cloud.agentregistry.v1.GetMcpServerRequest; +import com.google.cloud.agentregistry.v1.GetServiceRequest; +import com.google.cloud.agentregistry.v1.ListAgentsRequest; +import com.google.cloud.agentregistry.v1.ListAgentsResponse; +import com.google.cloud.agentregistry.v1.ListBindingsRequest; +import com.google.cloud.agentregistry.v1.ListBindingsResponse; +import com.google.cloud.agentregistry.v1.ListEndpointsRequest; +import com.google.cloud.agentregistry.v1.ListEndpointsResponse; +import com.google.cloud.agentregistry.v1.ListMcpServersRequest; +import com.google.cloud.agentregistry.v1.ListMcpServersResponse; +import com.google.cloud.agentregistry.v1.ListServicesRequest; +import com.google.cloud.agentregistry.v1.ListServicesResponse; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.OperationMetadata; +import com.google.cloud.agentregistry.v1.SearchAgentsRequest; +import com.google.cloud.agentregistry.v1.SearchAgentsResponse; +import com.google.cloud.agentregistry.v1.SearchMcpServersRequest; +import com.google.cloud.agentregistry.v1.SearchMcpServersResponse; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.UpdateBindingRequest; +import com.google.cloud.agentregistry.v1.UpdateServiceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AgentRegistry service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class AgentRegistryStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listAgentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAgentsPagedCallable()"); + } + + public UnaryCallable listAgentsCallable() { + throw new UnsupportedOperationException("Not implemented: listAgentsCallable()"); + } + + public UnaryCallable searchAgentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchAgentsPagedCallable()"); + } + + public UnaryCallable searchAgentsCallable() { + throw new UnsupportedOperationException("Not implemented: searchAgentsCallable()"); + } + + public UnaryCallable getAgentCallable() { + throw new UnsupportedOperationException("Not implemented: getAgentCallable()"); + } + + public UnaryCallable + listEndpointsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEndpointsPagedCallable()"); + } + + public UnaryCallable listEndpointsCallable() { + throw new UnsupportedOperationException("Not implemented: listEndpointsCallable()"); + } + + public UnaryCallable getEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: getEndpointCallable()"); + } + + public UnaryCallable + listMcpServersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listMcpServersPagedCallable()"); + } + + public UnaryCallable listMcpServersCallable() { + throw new UnsupportedOperationException("Not implemented: listMcpServersCallable()"); + } + + public UnaryCallable + searchMcpServersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchMcpServersPagedCallable()"); + } + + public UnaryCallable + searchMcpServersCallable() { + throw new UnsupportedOperationException("Not implemented: searchMcpServersCallable()"); + } + + public UnaryCallable getMcpServerCallable() { + throw new UnsupportedOperationException("Not implemented: getMcpServerCallable()"); + } + + public UnaryCallable listServicesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesPagedCallable()"); + } + + public UnaryCallable listServicesCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesCallable()"); + } + + public UnaryCallable getServiceCallable() { + throw new UnsupportedOperationException("Not implemented: getServiceCallable()"); + } + + public OperationCallable + createServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceOperationCallable()"); + } + + public UnaryCallable createServiceCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceCallable()"); + } + + public OperationCallable + updateServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceOperationCallable()"); + } + + public UnaryCallable updateServiceCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceCallable()"); + } + + public OperationCallable + deleteServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceOperationCallable()"); + } + + public UnaryCallable deleteServiceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceCallable()"); + } + + public UnaryCallable listBindingsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBindingsPagedCallable()"); + } + + public UnaryCallable listBindingsCallable() { + throw new UnsupportedOperationException("Not implemented: listBindingsCallable()"); + } + + public UnaryCallable getBindingCallable() { + throw new UnsupportedOperationException("Not implemented: getBindingCallable()"); + } + + public OperationCallable + createBindingOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createBindingOperationCallable()"); + } + + public UnaryCallable createBindingCallable() { + throw new UnsupportedOperationException("Not implemented: createBindingCallable()"); + } + + public OperationCallable + updateBindingOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateBindingOperationCallable()"); + } + + public UnaryCallable updateBindingCallable() { + throw new UnsupportedOperationException("Not implemented: updateBindingCallable()"); + } + + public OperationCallable + deleteBindingOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBindingOperationCallable()"); + } + + public UnaryCallable deleteBindingCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBindingCallable()"); + } + + public UnaryCallable + fetchAvailableBindingsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: fetchAvailableBindingsPagedCallable()"); + } + + public UnaryCallable + fetchAvailableBindingsCallable() { + throw new UnsupportedOperationException("Not implemented: fetchAvailableBindingsCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStubSettings.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStubSettings.java new file mode 100644 index 000000000000..0584f40b5516 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/AgentRegistryStubSettings.java @@ -0,0 +1,1706 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.stub; + +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.FetchAvailableBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListEndpointsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListLocationsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListMcpServersPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListServicesPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchMcpServersPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.CreateBindingRequest; +import com.google.cloud.agentregistry.v1.CreateServiceRequest; +import com.google.cloud.agentregistry.v1.DeleteBindingRequest; +import com.google.cloud.agentregistry.v1.DeleteServiceRequest; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse; +import com.google.cloud.agentregistry.v1.GetAgentRequest; +import com.google.cloud.agentregistry.v1.GetBindingRequest; +import com.google.cloud.agentregistry.v1.GetEndpointRequest; +import com.google.cloud.agentregistry.v1.GetMcpServerRequest; +import com.google.cloud.agentregistry.v1.GetServiceRequest; +import com.google.cloud.agentregistry.v1.ListAgentsRequest; +import com.google.cloud.agentregistry.v1.ListAgentsResponse; +import com.google.cloud.agentregistry.v1.ListBindingsRequest; +import com.google.cloud.agentregistry.v1.ListBindingsResponse; +import com.google.cloud.agentregistry.v1.ListEndpointsRequest; +import com.google.cloud.agentregistry.v1.ListEndpointsResponse; +import com.google.cloud.agentregistry.v1.ListMcpServersRequest; +import com.google.cloud.agentregistry.v1.ListMcpServersResponse; +import com.google.cloud.agentregistry.v1.ListServicesRequest; +import com.google.cloud.agentregistry.v1.ListServicesResponse; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.OperationMetadata; +import com.google.cloud.agentregistry.v1.SearchAgentsRequest; +import com.google.cloud.agentregistry.v1.SearchAgentsResponse; +import com.google.cloud.agentregistry.v1.SearchMcpServersRequest; +import com.google.cloud.agentregistry.v1.SearchMcpServersResponse; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.UpdateBindingRequest; +import com.google.cloud.agentregistry.v1.UpdateServiceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AgentRegistryStub}. + * + *

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

    + *
  • The default service address (agentregistry.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 getAgent: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AgentRegistryStubSettings.Builder agentRegistrySettingsBuilder =
+ *     AgentRegistryStubSettings.newBuilder();
+ * agentRegistrySettingsBuilder
+ *     .getAgentSettings()
+ *     .setRetrySettings(
+ *         agentRegistrySettingsBuilder
+ *             .getAgentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * AgentRegistryStubSettings agentRegistrySettings = agentRegistrySettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createService: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AgentRegistryStubSettings.Builder agentRegistrySettingsBuilder =
+ *     AgentRegistryStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * agentRegistrySettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class AgentRegistryStubSettings extends StubSettings { + /** 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 PagedCallSettings + listAgentsSettings; + private final PagedCallSettings< + SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse> + searchAgentsSettings; + private final UnaryCallSettings getAgentSettings; + private final PagedCallSettings< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + listEndpointsSettings; + private final UnaryCallSettings getEndpointSettings; + private final PagedCallSettings< + ListMcpServersRequest, ListMcpServersResponse, ListMcpServersPagedResponse> + listMcpServersSettings; + private final PagedCallSettings< + SearchMcpServersRequest, SearchMcpServersResponse, SearchMcpServersPagedResponse> + searchMcpServersSettings; + private final UnaryCallSettings getMcpServerSettings; + private final PagedCallSettings< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings getServiceSettings; + private final UnaryCallSettings createServiceSettings; + private final OperationCallSettings + createServiceOperationSettings; + private final UnaryCallSettings updateServiceSettings; + private final OperationCallSettings + updateServiceOperationSettings; + private final UnaryCallSettings deleteServiceSettings; + private final OperationCallSettings + deleteServiceOperationSettings; + private final PagedCallSettings< + ListBindingsRequest, ListBindingsResponse, ListBindingsPagedResponse> + listBindingsSettings; + private final UnaryCallSettings getBindingSettings; + private final UnaryCallSettings createBindingSettings; + private final OperationCallSettings + createBindingOperationSettings; + private final UnaryCallSettings updateBindingSettings; + private final OperationCallSettings + updateBindingOperationSettings; + private final UnaryCallSettings deleteBindingSettings; + private final OperationCallSettings + deleteBindingOperationSettings; + private final PagedCallSettings< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + FetchAvailableBindingsPagedResponse> + fetchAvailableBindingsSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_AGENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAgentsRequest injectToken(ListAgentsRequest payload, String token) { + return ListAgentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAgentsRequest injectPageSize(ListAgentsRequest payload, int pageSize) { + return ListAgentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAgentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAgentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAgentsResponse payload) { + return payload.getAgentsList(); + } + }; + + private static final PagedListDescriptor + SEARCH_AGENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchAgentsRequest injectToken(SearchAgentsRequest payload, String token) { + return SearchAgentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchAgentsRequest injectPageSize(SearchAgentsRequest payload, int pageSize) { + return SearchAgentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchAgentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchAgentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchAgentsResponse payload) { + return payload.getAgentsList(); + } + }; + + private static final PagedListDescriptor + LIST_ENDPOINTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEndpointsRequest injectToken(ListEndpointsRequest payload, String token) { + return ListEndpointsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEndpointsRequest injectPageSize(ListEndpointsRequest payload, int pageSize) { + return ListEndpointsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEndpointsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEndpointsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEndpointsResponse payload) { + return payload.getEndpointsList(); + } + }; + + private static final PagedListDescriptor + LIST_MCP_SERVERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMcpServersRequest injectToken(ListMcpServersRequest payload, String token) { + return ListMcpServersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMcpServersRequest injectPageSize( + ListMcpServersRequest payload, int pageSize) { + return ListMcpServersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMcpServersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMcpServersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListMcpServersResponse payload) { + return payload.getMcpServersList(); + } + }; + + private static final PagedListDescriptor< + SearchMcpServersRequest, SearchMcpServersResponse, McpServer> + SEARCH_MCP_SERVERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchMcpServersRequest injectToken( + SearchMcpServersRequest payload, String token) { + return SearchMcpServersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchMcpServersRequest injectPageSize( + SearchMcpServersRequest payload, int pageSize) { + return SearchMcpServersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchMcpServersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchMcpServersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchMcpServersResponse payload) { + return payload.getMcpServersList(); + } + }; + + private static final PagedListDescriptor + LIST_SERVICES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListServicesRequest injectToken(ListServicesRequest payload, String token) { + return ListServicesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListServicesRequest injectPageSize(ListServicesRequest payload, int pageSize) { + return ListServicesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListServicesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListServicesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListServicesResponse payload) { + return payload.getServicesList(); + } + }; + + private static final PagedListDescriptor + LIST_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBindingsRequest injectToken(ListBindingsRequest payload, String token) { + return ListBindingsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBindingsRequest injectPageSize(ListBindingsRequest payload, int pageSize) { + return ListBindingsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBindingsResponse payload) { + return payload.getBindingsList(); + } + }; + + private static final PagedListDescriptor< + FetchAvailableBindingsRequest, FetchAvailableBindingsResponse, Binding> + FETCH_AVAILABLE_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + FetchAvailableBindingsRequest, FetchAvailableBindingsResponse, Binding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public FetchAvailableBindingsRequest injectToken( + FetchAvailableBindingsRequest payload, String token) { + return FetchAvailableBindingsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public FetchAvailableBindingsRequest injectPageSize( + FetchAvailableBindingsRequest payload, int pageSize) { + return FetchAvailableBindingsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(FetchAvailableBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(FetchAvailableBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(FetchAvailableBindingsResponse payload) { + return payload.getBindingsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListAgentsRequest, ListAgentsResponse, ListAgentsPagedResponse> + LIST_AGENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAgentsRequest, ListAgentsResponse, ListAgentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAgentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_AGENTS_PAGE_STR_DESC, request, context); + return ListAgentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse> + SEARCH_AGENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchAgentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, SEARCH_AGENTS_PAGE_STR_DESC, request, context); + return SearchAgentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + LIST_ENDPOINTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEndpointsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ENDPOINTS_PAGE_STR_DESC, request, context); + return ListEndpointsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListMcpServersRequest, ListMcpServersResponse, ListMcpServersPagedResponse> + LIST_MCP_SERVERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMcpServersRequest, ListMcpServersResponse, ListMcpServersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMcpServersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_MCP_SERVERS_PAGE_STR_DESC, request, context); + return ListMcpServersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchMcpServersRequest, SearchMcpServersResponse, SearchMcpServersPagedResponse> + SEARCH_MCP_SERVERS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchMcpServersRequest, SearchMcpServersResponse, SearchMcpServersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchMcpServersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, SEARCH_MCP_SERVERS_PAGE_STR_DESC, request, context); + return SearchMcpServersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + LIST_SERVICES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListServicesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SERVICES_PAGE_STR_DESC, request, context); + return ListServicesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBindingsRequest, ListBindingsResponse, ListBindingsPagedResponse> + LIST_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBindingsRequest, ListBindingsResponse, ListBindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_BINDINGS_PAGE_STR_DESC, request, context); + return ListBindingsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + FetchAvailableBindingsPagedResponse> + FETCH_AVAILABLE_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + FetchAvailableBindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + FetchAvailableBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, FETCH_AVAILABLE_BINDINGS_PAGE_STR_DESC, request, context); + return FetchAvailableBindingsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listAgents. */ + public PagedCallSettings + listAgentsSettings() { + return listAgentsSettings; + } + + /** Returns the object with the settings used for calls to searchAgents. */ + public PagedCallSettings + searchAgentsSettings() { + return searchAgentsSettings; + } + + /** Returns the object with the settings used for calls to getAgent. */ + public UnaryCallSettings getAgentSettings() { + return getAgentSettings; + } + + /** Returns the object with the settings used for calls to listEndpoints. */ + public PagedCallSettings + listEndpointsSettings() { + return listEndpointsSettings; + } + + /** Returns the object with the settings used for calls to getEndpoint. */ + public UnaryCallSettings getEndpointSettings() { + return getEndpointSettings; + } + + /** Returns the object with the settings used for calls to listMcpServers. */ + public PagedCallSettings< + ListMcpServersRequest, ListMcpServersResponse, ListMcpServersPagedResponse> + listMcpServersSettings() { + return listMcpServersSettings; + } + + /** Returns the object with the settings used for calls to searchMcpServers. */ + public PagedCallSettings< + SearchMcpServersRequest, SearchMcpServersResponse, SearchMcpServersPagedResponse> + searchMcpServersSettings() { + return searchMcpServersSettings; + } + + /** Returns the object with the settings used for calls to getMcpServer. */ + public UnaryCallSettings getMcpServerSettings() { + return getMcpServerSettings; + } + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return getServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return createServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to listBindings. */ + public PagedCallSettings + listBindingsSettings() { + return listBindingsSettings; + } + + /** Returns the object with the settings used for calls to getBinding. */ + public UnaryCallSettings getBindingSettings() { + return getBindingSettings; + } + + /** Returns the object with the settings used for calls to createBinding. */ + public UnaryCallSettings createBindingSettings() { + return createBindingSettings; + } + + /** Returns the object with the settings used for calls to createBinding. */ + public OperationCallSettings + createBindingOperationSettings() { + return createBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to updateBinding. */ + public UnaryCallSettings updateBindingSettings() { + return updateBindingSettings; + } + + /** Returns the object with the settings used for calls to updateBinding. */ + public OperationCallSettings + updateBindingOperationSettings() { + return updateBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteBinding. */ + public UnaryCallSettings deleteBindingSettings() { + return deleteBindingSettings; + } + + /** Returns the object with the settings used for calls to deleteBinding. */ + public OperationCallSettings + deleteBindingOperationSettings() { + return deleteBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to fetchAvailableBindings. */ + public PagedCallSettings< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + FetchAvailableBindingsPagedResponse> + fetchAvailableBindingsSettings() { + return fetchAvailableBindingsSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public AgentRegistryStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAgentRegistryStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAgentRegistryStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "agentregistry"; + } + + /** 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 "agentregistry.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "agentregistry.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(AgentRegistryStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AgentRegistryStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AgentRegistryStubSettings.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(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 AgentRegistryStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listAgentsSettings = settingsBuilder.listAgentsSettings().build(); + searchAgentsSettings = settingsBuilder.searchAgentsSettings().build(); + getAgentSettings = settingsBuilder.getAgentSettings().build(); + listEndpointsSettings = settingsBuilder.listEndpointsSettings().build(); + getEndpointSettings = settingsBuilder.getEndpointSettings().build(); + listMcpServersSettings = settingsBuilder.listMcpServersSettings().build(); + searchMcpServersSettings = settingsBuilder.searchMcpServersSettings().build(); + getMcpServerSettings = settingsBuilder.getMcpServerSettings().build(); + listServicesSettings = settingsBuilder.listServicesSettings().build(); + getServiceSettings = settingsBuilder.getServiceSettings().build(); + createServiceSettings = settingsBuilder.createServiceSettings().build(); + createServiceOperationSettings = settingsBuilder.createServiceOperationSettings().build(); + updateServiceSettings = settingsBuilder.updateServiceSettings().build(); + updateServiceOperationSettings = settingsBuilder.updateServiceOperationSettings().build(); + deleteServiceSettings = settingsBuilder.deleteServiceSettings().build(); + deleteServiceOperationSettings = settingsBuilder.deleteServiceOperationSettings().build(); + listBindingsSettings = settingsBuilder.listBindingsSettings().build(); + getBindingSettings = settingsBuilder.getBindingSettings().build(); + createBindingSettings = settingsBuilder.createBindingSettings().build(); + createBindingOperationSettings = settingsBuilder.createBindingOperationSettings().build(); + updateBindingSettings = settingsBuilder.updateBindingSettings().build(); + updateBindingOperationSettings = settingsBuilder.updateBindingOperationSettings().build(); + deleteBindingSettings = settingsBuilder.deleteBindingSettings().build(); + deleteBindingOperationSettings = settingsBuilder.deleteBindingOperationSettings().build(); + fetchAvailableBindingsSettings = settingsBuilder.fetchAvailableBindingsSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-agentregistry") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for AgentRegistryStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListAgentsRequest, ListAgentsResponse, ListAgentsPagedResponse> + listAgentsSettings; + private final PagedCallSettings.Builder< + SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse> + searchAgentsSettings; + private final UnaryCallSettings.Builder getAgentSettings; + private final PagedCallSettings.Builder< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + listEndpointsSettings; + private final UnaryCallSettings.Builder getEndpointSettings; + private final PagedCallSettings.Builder< + ListMcpServersRequest, ListMcpServersResponse, ListMcpServersPagedResponse> + listMcpServersSettings; + private final PagedCallSettings.Builder< + SearchMcpServersRequest, SearchMcpServersResponse, SearchMcpServersPagedResponse> + searchMcpServersSettings; + private final UnaryCallSettings.Builder getMcpServerSettings; + private final PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings.Builder getServiceSettings; + private final UnaryCallSettings.Builder createServiceSettings; + private final OperationCallSettings.Builder + createServiceOperationSettings; + private final UnaryCallSettings.Builder updateServiceSettings; + private final OperationCallSettings.Builder + updateServiceOperationSettings; + private final UnaryCallSettings.Builder deleteServiceSettings; + private final OperationCallSettings.Builder + deleteServiceOperationSettings; + private final PagedCallSettings.Builder< + ListBindingsRequest, ListBindingsResponse, ListBindingsPagedResponse> + listBindingsSettings; + private final UnaryCallSettings.Builder getBindingSettings; + private final UnaryCallSettings.Builder createBindingSettings; + private final OperationCallSettings.Builder + createBindingOperationSettings; + private final UnaryCallSettings.Builder updateBindingSettings; + private final OperationCallSettings.Builder + updateBindingOperationSettings; + private final UnaryCallSettings.Builder deleteBindingSettings; + private final OperationCallSettings.Builder + deleteBindingOperationSettings; + private final PagedCallSettings.Builder< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + FetchAvailableBindingsPagedResponse> + fetchAvailableBindingsSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listAgentsSettings = PagedCallSettings.newBuilder(LIST_AGENTS_PAGE_STR_FACT); + searchAgentsSettings = PagedCallSettings.newBuilder(SEARCH_AGENTS_PAGE_STR_FACT); + getAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listEndpointsSettings = PagedCallSettings.newBuilder(LIST_ENDPOINTS_PAGE_STR_FACT); + getEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listMcpServersSettings = PagedCallSettings.newBuilder(LIST_MCP_SERVERS_PAGE_STR_FACT); + searchMcpServersSettings = PagedCallSettings.newBuilder(SEARCH_MCP_SERVERS_PAGE_STR_FACT); + getMcpServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listServicesSettings = PagedCallSettings.newBuilder(LIST_SERVICES_PAGE_STR_FACT); + getServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceOperationSettings = OperationCallSettings.newBuilder(); + updateServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateServiceOperationSettings = OperationCallSettings.newBuilder(); + deleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteServiceOperationSettings = OperationCallSettings.newBuilder(); + listBindingsSettings = PagedCallSettings.newBuilder(LIST_BINDINGS_PAGE_STR_FACT); + getBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBindingOperationSettings = OperationCallSettings.newBuilder(); + updateBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBindingOperationSettings = OperationCallSettings.newBuilder(); + deleteBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBindingOperationSettings = OperationCallSettings.newBuilder(); + fetchAvailableBindingsSettings = + PagedCallSettings.newBuilder(FETCH_AVAILABLE_BINDINGS_PAGE_STR_FACT); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAgentsSettings, + searchAgentsSettings, + getAgentSettings, + listEndpointsSettings, + getEndpointSettings, + listMcpServersSettings, + searchMcpServersSettings, + getMcpServerSettings, + listServicesSettings, + getServiceSettings, + createServiceSettings, + updateServiceSettings, + deleteServiceSettings, + listBindingsSettings, + getBindingSettings, + createBindingSettings, + updateBindingSettings, + deleteBindingSettings, + fetchAvailableBindingsSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(AgentRegistryStubSettings settings) { + super(settings); + + listAgentsSettings = settings.listAgentsSettings.toBuilder(); + searchAgentsSettings = settings.searchAgentsSettings.toBuilder(); + getAgentSettings = settings.getAgentSettings.toBuilder(); + listEndpointsSettings = settings.listEndpointsSettings.toBuilder(); + getEndpointSettings = settings.getEndpointSettings.toBuilder(); + listMcpServersSettings = settings.listMcpServersSettings.toBuilder(); + searchMcpServersSettings = settings.searchMcpServersSettings.toBuilder(); + getMcpServerSettings = settings.getMcpServerSettings.toBuilder(); + listServicesSettings = settings.listServicesSettings.toBuilder(); + getServiceSettings = settings.getServiceSettings.toBuilder(); + createServiceSettings = settings.createServiceSettings.toBuilder(); + createServiceOperationSettings = settings.createServiceOperationSettings.toBuilder(); + updateServiceSettings = settings.updateServiceSettings.toBuilder(); + updateServiceOperationSettings = settings.updateServiceOperationSettings.toBuilder(); + deleteServiceSettings = settings.deleteServiceSettings.toBuilder(); + deleteServiceOperationSettings = settings.deleteServiceOperationSettings.toBuilder(); + listBindingsSettings = settings.listBindingsSettings.toBuilder(); + getBindingSettings = settings.getBindingSettings.toBuilder(); + createBindingSettings = settings.createBindingSettings.toBuilder(); + createBindingOperationSettings = settings.createBindingOperationSettings.toBuilder(); + updateBindingSettings = settings.updateBindingSettings.toBuilder(); + updateBindingOperationSettings = settings.updateBindingOperationSettings.toBuilder(); + deleteBindingSettings = settings.deleteBindingSettings.toBuilder(); + deleteBindingOperationSettings = settings.deleteBindingOperationSettings.toBuilder(); + fetchAvailableBindingsSettings = settings.fetchAvailableBindingsSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAgentsSettings, + searchAgentsSettings, + getAgentSettings, + listEndpointsSettings, + getEndpointSettings, + listMcpServersSettings, + searchMcpServersSettings, + getMcpServerSettings, + listServicesSettings, + getServiceSettings, + createServiceSettings, + updateServiceSettings, + deleteServiceSettings, + listBindingsSettings, + getBindingSettings, + createBindingSettings, + updateBindingSettings, + deleteBindingSettings, + fetchAvailableBindingsSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listAgentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchAgentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getAgentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listEndpointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listMcpServersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchMcpServersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getMcpServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listServicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .fetchAvailableBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Service.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Service.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Binding.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Binding.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + 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 listAgents. */ + public PagedCallSettings.Builder + listAgentsSettings() { + return listAgentsSettings; + } + + /** Returns the builder for the settings used for calls to searchAgents. */ + public PagedCallSettings.Builder< + SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse> + searchAgentsSettings() { + return searchAgentsSettings; + } + + /** Returns the builder for the settings used for calls to getAgent. */ + public UnaryCallSettings.Builder getAgentSettings() { + return getAgentSettings; + } + + /** Returns the builder for the settings used for calls to listEndpoints. */ + public PagedCallSettings.Builder< + ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> + listEndpointsSettings() { + return listEndpointsSettings; + } + + /** Returns the builder for the settings used for calls to getEndpoint. */ + public UnaryCallSettings.Builder getEndpointSettings() { + return getEndpointSettings; + } + + /** Returns the builder for the settings used for calls to listMcpServers. */ + public PagedCallSettings.Builder< + ListMcpServersRequest, ListMcpServersResponse, ListMcpServersPagedResponse> + listMcpServersSettings() { + return listMcpServersSettings; + } + + /** Returns the builder for the settings used for calls to searchMcpServers. */ + public PagedCallSettings.Builder< + SearchMcpServersRequest, SearchMcpServersResponse, SearchMcpServersPagedResponse> + searchMcpServersSettings() { + return searchMcpServersSettings; + } + + /** Returns the builder for the settings used for calls to getMcpServer. */ + public UnaryCallSettings.Builder getMcpServerSettings() { + return getMcpServerSettings; + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return createServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + public OperationCallSettings.Builder + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listBindings. */ + public PagedCallSettings.Builder< + ListBindingsRequest, ListBindingsResponse, ListBindingsPagedResponse> + listBindingsSettings() { + return listBindingsSettings; + } + + /** Returns the builder for the settings used for calls to getBinding. */ + public UnaryCallSettings.Builder getBindingSettings() { + return getBindingSettings; + } + + /** Returns the builder for the settings used for calls to createBinding. */ + public UnaryCallSettings.Builder createBindingSettings() { + return createBindingSettings; + } + + /** Returns the builder for the settings used for calls to createBinding. */ + public OperationCallSettings.Builder + createBindingOperationSettings() { + return createBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateBinding. */ + public UnaryCallSettings.Builder updateBindingSettings() { + return updateBindingSettings; + } + + /** Returns the builder for the settings used for calls to updateBinding. */ + public OperationCallSettings.Builder + updateBindingOperationSettings() { + return updateBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteBinding. */ + public UnaryCallSettings.Builder deleteBindingSettings() { + return deleteBindingSettings; + } + + /** Returns the builder for the settings used for calls to deleteBinding. */ + public OperationCallSettings.Builder + deleteBindingOperationSettings() { + return deleteBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to fetchAvailableBindings. */ + public PagedCallSettings.Builder< + FetchAvailableBindingsRequest, + FetchAvailableBindingsResponse, + FetchAvailableBindingsPagedResponse> + fetchAvailableBindingsSettings() { + return fetchAvailableBindingsSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public AgentRegistryStubSettings build() throws IOException { + return new AgentRegistryStubSettings(this); + } + } +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/GrpcAgentRegistryCallableFactory.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/GrpcAgentRegistryCallableFactory.java new file mode 100644 index 000000000000..a682ec0da295 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/GrpcAgentRegistryCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.stub; + +import 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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AgentRegistry service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcAgentRegistryCallableFactory 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-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/GrpcAgentRegistryStub.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/GrpcAgentRegistryStub.java new file mode 100644 index 000000000000..2759de2c93a5 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/GrpcAgentRegistryStub.java @@ -0,0 +1,1012 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.stub; + +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.FetchAvailableBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListEndpointsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListLocationsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListMcpServersPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListServicesPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchMcpServersPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.CreateBindingRequest; +import com.google.cloud.agentregistry.v1.CreateServiceRequest; +import com.google.cloud.agentregistry.v1.DeleteBindingRequest; +import com.google.cloud.agentregistry.v1.DeleteServiceRequest; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse; +import com.google.cloud.agentregistry.v1.GetAgentRequest; +import com.google.cloud.agentregistry.v1.GetBindingRequest; +import com.google.cloud.agentregistry.v1.GetEndpointRequest; +import com.google.cloud.agentregistry.v1.GetMcpServerRequest; +import com.google.cloud.agentregistry.v1.GetServiceRequest; +import com.google.cloud.agentregistry.v1.ListAgentsRequest; +import com.google.cloud.agentregistry.v1.ListAgentsResponse; +import com.google.cloud.agentregistry.v1.ListBindingsRequest; +import com.google.cloud.agentregistry.v1.ListBindingsResponse; +import com.google.cloud.agentregistry.v1.ListEndpointsRequest; +import com.google.cloud.agentregistry.v1.ListEndpointsResponse; +import com.google.cloud.agentregistry.v1.ListMcpServersRequest; +import com.google.cloud.agentregistry.v1.ListMcpServersResponse; +import com.google.cloud.agentregistry.v1.ListServicesRequest; +import com.google.cloud.agentregistry.v1.ListServicesResponse; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.OperationMetadata; +import com.google.cloud.agentregistry.v1.SearchAgentsRequest; +import com.google.cloud.agentregistry.v1.SearchAgentsResponse; +import com.google.cloud.agentregistry.v1.SearchMcpServersRequest; +import com.google.cloud.agentregistry.v1.SearchMcpServersResponse; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.UpdateBindingRequest; +import com.google.cloud.agentregistry.v1.UpdateServiceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AgentRegistry service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcAgentRegistryStub extends AgentRegistryStub { + private static final MethodDescriptor + listAgentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListAgents") + .setRequestMarshaller(ProtoUtils.marshaller(ListAgentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListAgentsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + searchAgentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/SearchAgents") + .setRequestMarshaller(ProtoUtils.marshaller(SearchAgentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchAgentsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getAgentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetAgent") + .setRequestMarshaller(ProtoUtils.marshaller(GetAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Agent.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listEndpointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListEndpoints") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEndpointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEndpointsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetEndpoint") + .setRequestMarshaller(ProtoUtils.marshaller(GetEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Endpoint.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listMcpServersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListMcpServers") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMcpServersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMcpServersResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + searchMcpServersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/SearchMcpServers") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchMcpServersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchMcpServersResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getMcpServerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetMcpServer") + .setRequestMarshaller(ProtoUtils.marshaller(GetMcpServerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(McpServer.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listServicesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListServices") + .setRequestMarshaller(ProtoUtils.marshaller(ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListServicesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetService") + .setRequestMarshaller(ProtoUtils.marshaller(GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/CreateService") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/UpdateService") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/DeleteService") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listBindingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListBindings") + .setRequestMarshaller(ProtoUtils.marshaller(ListBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetBinding") + .setRequestMarshaller(ProtoUtils.marshaller(GetBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Binding.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/CreateBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/UpdateBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/DeleteBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + FetchAvailableBindingsRequest, FetchAvailableBindingsResponse> + fetchAvailableBindingsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.agentregistry.v1.AgentRegistry/FetchAvailableBindings") + .setRequestMarshaller( + ProtoUtils.marshaller(FetchAvailableBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FetchAvailableBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable listAgentsCallable; + private final UnaryCallable listAgentsPagedCallable; + private final UnaryCallable searchAgentsCallable; + private final UnaryCallable + searchAgentsPagedCallable; + private final UnaryCallable getAgentCallable; + private final UnaryCallable listEndpointsCallable; + private final UnaryCallable + listEndpointsPagedCallable; + private final UnaryCallable getEndpointCallable; + private final UnaryCallable listMcpServersCallable; + private final UnaryCallable + listMcpServersPagedCallable; + private final UnaryCallable + searchMcpServersCallable; + private final UnaryCallable + searchMcpServersPagedCallable; + private final UnaryCallable getMcpServerCallable; + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable createServiceCallable; + private final OperationCallable + createServiceOperationCallable; + private final UnaryCallable updateServiceCallable; + private final OperationCallable + updateServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + private final UnaryCallable listBindingsCallable; + private final UnaryCallable + listBindingsPagedCallable; + private final UnaryCallable getBindingCallable; + private final UnaryCallable createBindingCallable; + private final OperationCallable + createBindingOperationCallable; + private final UnaryCallable updateBindingCallable; + private final OperationCallable + updateBindingOperationCallable; + private final UnaryCallable deleteBindingCallable; + private final OperationCallable + deleteBindingOperationCallable; + private final UnaryCallable + fetchAvailableBindingsCallable; + private final UnaryCallable + fetchAvailableBindingsPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAgentRegistryStub create(AgentRegistryStubSettings settings) + throws IOException { + return new GrpcAgentRegistryStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAgentRegistryStub create(ClientContext clientContext) throws IOException { + return new GrpcAgentRegistryStub(AgentRegistryStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAgentRegistryStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAgentRegistryStub( + AgentRegistryStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAgentRegistryStub, 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 GrpcAgentRegistryStub(AgentRegistryStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAgentRegistryCallableFactory()); + } + + /** + * Constructs an instance of GrpcAgentRegistryStub, 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 GrpcAgentRegistryStub( + AgentRegistryStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listAgentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAgentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings searchAgentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchAgentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAgentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings listEndpointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEndpointsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEndpointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listMcpServersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMcpServersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + searchMcpServersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchMcpServersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getMcpServerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMcpServerMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings listServicesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createServiceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateServiceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("service.name", String.valueOf(request.getService().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings listBindingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("binding.name", String.valueOf(request.getBinding().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + fetchAvailableBindingsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(fetchAvailableBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listAgentsCallable = + callableFactory.createUnaryCallable( + listAgentsTransportSettings, settings.listAgentsSettings(), clientContext); + this.listAgentsPagedCallable = + callableFactory.createPagedCallable( + listAgentsTransportSettings, settings.listAgentsSettings(), clientContext); + this.searchAgentsCallable = + callableFactory.createUnaryCallable( + searchAgentsTransportSettings, settings.searchAgentsSettings(), clientContext); + this.searchAgentsPagedCallable = + callableFactory.createPagedCallable( + searchAgentsTransportSettings, settings.searchAgentsSettings(), clientContext); + this.getAgentCallable = + callableFactory.createUnaryCallable( + getAgentTransportSettings, settings.getAgentSettings(), clientContext); + this.listEndpointsCallable = + callableFactory.createUnaryCallable( + listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); + this.listEndpointsPagedCallable = + callableFactory.createPagedCallable( + listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); + this.getEndpointCallable = + callableFactory.createUnaryCallable( + getEndpointTransportSettings, settings.getEndpointSettings(), clientContext); + this.listMcpServersCallable = + callableFactory.createUnaryCallable( + listMcpServersTransportSettings, settings.listMcpServersSettings(), clientContext); + this.listMcpServersPagedCallable = + callableFactory.createPagedCallable( + listMcpServersTransportSettings, settings.listMcpServersSettings(), clientContext); + this.searchMcpServersCallable = + callableFactory.createUnaryCallable( + searchMcpServersTransportSettings, settings.searchMcpServersSettings(), clientContext); + this.searchMcpServersPagedCallable = + callableFactory.createPagedCallable( + searchMcpServersTransportSettings, settings.searchMcpServersSettings(), clientContext); + this.getMcpServerCallable = + callableFactory.createUnaryCallable( + getMcpServerTransportSettings, settings.getMcpServerSettings(), clientContext); + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.createServiceCallable = + callableFactory.createUnaryCallable( + createServiceTransportSettings, settings.createServiceSettings(), clientContext); + this.createServiceOperationCallable = + callableFactory.createOperationCallable( + createServiceTransportSettings, + settings.createServiceOperationSettings(), + clientContext, + operationsStub); + this.updateServiceCallable = + callableFactory.createUnaryCallable( + updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); + this.updateServiceOperationCallable = + callableFactory.createOperationCallable( + updateServiceTransportSettings, + settings.updateServiceOperationSettings(), + clientContext, + operationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + operationsStub); + this.listBindingsCallable = + callableFactory.createUnaryCallable( + listBindingsTransportSettings, settings.listBindingsSettings(), clientContext); + this.listBindingsPagedCallable = + callableFactory.createPagedCallable( + listBindingsTransportSettings, settings.listBindingsSettings(), clientContext); + this.getBindingCallable = + callableFactory.createUnaryCallable( + getBindingTransportSettings, settings.getBindingSettings(), clientContext); + this.createBindingCallable = + callableFactory.createUnaryCallable( + createBindingTransportSettings, settings.createBindingSettings(), clientContext); + this.createBindingOperationCallable = + callableFactory.createOperationCallable( + createBindingTransportSettings, + settings.createBindingOperationSettings(), + clientContext, + operationsStub); + this.updateBindingCallable = + callableFactory.createUnaryCallable( + updateBindingTransportSettings, settings.updateBindingSettings(), clientContext); + this.updateBindingOperationCallable = + callableFactory.createOperationCallable( + updateBindingTransportSettings, + settings.updateBindingOperationSettings(), + clientContext, + operationsStub); + this.deleteBindingCallable = + callableFactory.createUnaryCallable( + deleteBindingTransportSettings, settings.deleteBindingSettings(), clientContext); + this.deleteBindingOperationCallable = + callableFactory.createOperationCallable( + deleteBindingTransportSettings, + settings.deleteBindingOperationSettings(), + clientContext, + operationsStub); + this.fetchAvailableBindingsCallable = + callableFactory.createUnaryCallable( + fetchAvailableBindingsTransportSettings, + settings.fetchAvailableBindingsSettings(), + clientContext); + this.fetchAvailableBindingsPagedCallable = + callableFactory.createPagedCallable( + fetchAvailableBindingsTransportSettings, + settings.fetchAvailableBindingsSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listAgentsCallable() { + return listAgentsCallable; + } + + @Override + public UnaryCallable listAgentsPagedCallable() { + return listAgentsPagedCallable; + } + + @Override + public UnaryCallable searchAgentsCallable() { + return searchAgentsCallable; + } + + @Override + public UnaryCallable searchAgentsPagedCallable() { + return searchAgentsPagedCallable; + } + + @Override + public UnaryCallable getAgentCallable() { + return getAgentCallable; + } + + @Override + public UnaryCallable listEndpointsCallable() { + return listEndpointsCallable; + } + + @Override + public UnaryCallable + listEndpointsPagedCallable() { + return listEndpointsPagedCallable; + } + + @Override + public UnaryCallable getEndpointCallable() { + return getEndpointCallable; + } + + @Override + public UnaryCallable listMcpServersCallable() { + return listMcpServersCallable; + } + + @Override + public UnaryCallable + listMcpServersPagedCallable() { + return listMcpServersPagedCallable; + } + + @Override + public UnaryCallable + searchMcpServersCallable() { + return searchMcpServersCallable; + } + + @Override + public UnaryCallable + searchMcpServersPagedCallable() { + return searchMcpServersPagedCallable; + } + + @Override + public UnaryCallable getMcpServerCallable() { + return getMcpServerCallable; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable createServiceCallable() { + return createServiceCallable; + } + + @Override + public OperationCallable + createServiceOperationCallable() { + return createServiceOperationCallable; + } + + @Override + public UnaryCallable updateServiceCallable() { + return updateServiceCallable; + } + + @Override + public OperationCallable + updateServiceOperationCallable() { + return updateServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @Override + public UnaryCallable listBindingsCallable() { + return listBindingsCallable; + } + + @Override + public UnaryCallable listBindingsPagedCallable() { + return listBindingsPagedCallable; + } + + @Override + public UnaryCallable getBindingCallable() { + return getBindingCallable; + } + + @Override + public UnaryCallable createBindingCallable() { + return createBindingCallable; + } + + @Override + public OperationCallable + createBindingOperationCallable() { + return createBindingOperationCallable; + } + + @Override + public UnaryCallable updateBindingCallable() { + return updateBindingCallable; + } + + @Override + public OperationCallable + updateBindingOperationCallable() { + return updateBindingOperationCallable; + } + + @Override + public UnaryCallable deleteBindingCallable() { + return deleteBindingCallable; + } + + @Override + public OperationCallable + deleteBindingOperationCallable() { + return deleteBindingOperationCallable; + } + + @Override + public UnaryCallable + fetchAvailableBindingsCallable() { + return fetchAvailableBindingsCallable; + } + + @Override + public UnaryCallable + fetchAvailableBindingsPagedCallable() { + return fetchAvailableBindingsPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/HttpJsonAgentRegistryCallableFactory.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/HttpJsonAgentRegistryCallableFactory.java new file mode 100644 index 000000000000..2f41b6daa6cd --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/HttpJsonAgentRegistryCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.stub; + +import 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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AgentRegistry service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonAgentRegistryCallableFactory + 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-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/HttpJsonAgentRegistryStub.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/HttpJsonAgentRegistryStub.java new file mode 100644 index 000000000000..fb544297bf6f --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/HttpJsonAgentRegistryStub.java @@ -0,0 +1,1668 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.stub; + +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.FetchAvailableBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListEndpointsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListLocationsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListMcpServersPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListServicesPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchMcpServersPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.CreateBindingRequest; +import com.google.cloud.agentregistry.v1.CreateServiceRequest; +import com.google.cloud.agentregistry.v1.DeleteBindingRequest; +import com.google.cloud.agentregistry.v1.DeleteServiceRequest; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse; +import com.google.cloud.agentregistry.v1.GetAgentRequest; +import com.google.cloud.agentregistry.v1.GetBindingRequest; +import com.google.cloud.agentregistry.v1.GetEndpointRequest; +import com.google.cloud.agentregistry.v1.GetMcpServerRequest; +import com.google.cloud.agentregistry.v1.GetServiceRequest; +import com.google.cloud.agentregistry.v1.ListAgentsRequest; +import com.google.cloud.agentregistry.v1.ListAgentsResponse; +import com.google.cloud.agentregistry.v1.ListBindingsRequest; +import com.google.cloud.agentregistry.v1.ListBindingsResponse; +import com.google.cloud.agentregistry.v1.ListEndpointsRequest; +import com.google.cloud.agentregistry.v1.ListEndpointsResponse; +import com.google.cloud.agentregistry.v1.ListMcpServersRequest; +import com.google.cloud.agentregistry.v1.ListMcpServersResponse; +import com.google.cloud.agentregistry.v1.ListServicesRequest; +import com.google.cloud.agentregistry.v1.ListServicesResponse; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.OperationMetadata; +import com.google.cloud.agentregistry.v1.SearchAgentsRequest; +import com.google.cloud.agentregistry.v1.SearchAgentsResponse; +import com.google.cloud.agentregistry.v1.SearchMcpServersRequest; +import com.google.cloud.agentregistry.v1.SearchMcpServersResponse; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.UpdateBindingRequest; +import com.google.cloud.agentregistry.v1.UpdateServiceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AgentRegistry service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonAgentRegistryStub extends AgentRegistryStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Binding.getDescriptor()) + .add(Service.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listAgentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListAgents") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + 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(ListAgentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + searchAgentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/SearchAgents") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/agents:search", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchAgentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getAgentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetAgent") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/agents/*}", + 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(Agent.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listEndpointsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListEndpoints") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/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, "filter", request.getFilter()); + 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(ListEndpointsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getEndpointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetEndpoint") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/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 + listMcpServersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListMcpServers") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + 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(ListMcpServersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + searchMcpServersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/SearchMcpServers") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/mcpServers:search", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchMcpServersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getMcpServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetMcpServer") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/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 + listServicesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListServices") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/services", + 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, "filter", request.getFilter()); + 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(ListServicesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetService") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/services/*}", + 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(Service.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/CreateService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/services", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "serviceId", request.getServiceId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("service", request.getService(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/UpdateService") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{service.name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "service.name", request.getService().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("service", request.getService(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/DeleteService") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/services/*}", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listBindingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/ListBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/bindings", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + 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(ListBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/GetBinding") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/bindings/*}", + 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(Binding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/CreateBinding") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/bindings", + 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, "bindingId", request.getBindingId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("binding", request.getBinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/UpdateBinding") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{binding.name=projects/*/locations/*/bindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "binding.name", request.getBinding().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("binding", request.getBinding(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.agentregistry.v1.AgentRegistry/DeleteBinding") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/bindings/*}", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + FetchAvailableBindingsRequest, FetchAvailableBindingsResponse> + fetchAvailableBindingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.agentregistry.v1.AgentRegistry/FetchAvailableBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/bindings:fetchAvailable", + 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, "sourceIdentifier", request.getSourceIdentifier()); + serializer.putQueryParam( + fields, "targetIdentifier", request.getTargetIdentifier()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(FetchAvailableBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listAgentsCallable; + private final UnaryCallable listAgentsPagedCallable; + private final UnaryCallable searchAgentsCallable; + private final UnaryCallable + searchAgentsPagedCallable; + private final UnaryCallable getAgentCallable; + private final UnaryCallable listEndpointsCallable; + private final UnaryCallable + listEndpointsPagedCallable; + private final UnaryCallable getEndpointCallable; + private final UnaryCallable listMcpServersCallable; + private final UnaryCallable + listMcpServersPagedCallable; + private final UnaryCallable + searchMcpServersCallable; + private final UnaryCallable + searchMcpServersPagedCallable; + private final UnaryCallable getMcpServerCallable; + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable createServiceCallable; + private final OperationCallable + createServiceOperationCallable; + private final UnaryCallable updateServiceCallable; + private final OperationCallable + updateServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + private final UnaryCallable listBindingsCallable; + private final UnaryCallable + listBindingsPagedCallable; + private final UnaryCallable getBindingCallable; + private final UnaryCallable createBindingCallable; + private final OperationCallable + createBindingOperationCallable; + private final UnaryCallable updateBindingCallable; + private final OperationCallable + updateBindingOperationCallable; + private final UnaryCallable deleteBindingCallable; + private final OperationCallable + deleteBindingOperationCallable; + private final UnaryCallable + fetchAvailableBindingsCallable; + private final UnaryCallable + fetchAvailableBindingsPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAgentRegistryStub create(AgentRegistryStubSettings settings) + throws IOException { + return new HttpJsonAgentRegistryStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAgentRegistryStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAgentRegistryStub( + AgentRegistryStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAgentRegistryStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAgentRegistryStub( + AgentRegistryStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonAgentRegistryStub, 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 HttpJsonAgentRegistryStub( + AgentRegistryStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonAgentRegistryCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAgentRegistryStub, 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 HttpJsonAgentRegistryStub( + AgentRegistryStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listAgentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAgentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings searchAgentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchAgentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getAgentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAgentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listEndpointsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listEndpointsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getEndpointTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getEndpointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listMcpServersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listMcpServersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + searchMcpServersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchMcpServersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getMcpServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getMcpServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings listServicesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("service.name", String.valueOf(request.getService().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings listBindingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("binding.name", String.valueOf(request.getBinding().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + fetchAvailableBindingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(fetchAvailableBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listAgentsCallable = + callableFactory.createUnaryCallable( + listAgentsTransportSettings, settings.listAgentsSettings(), clientContext); + this.listAgentsPagedCallable = + callableFactory.createPagedCallable( + listAgentsTransportSettings, settings.listAgentsSettings(), clientContext); + this.searchAgentsCallable = + callableFactory.createUnaryCallable( + searchAgentsTransportSettings, settings.searchAgentsSettings(), clientContext); + this.searchAgentsPagedCallable = + callableFactory.createPagedCallable( + searchAgentsTransportSettings, settings.searchAgentsSettings(), clientContext); + this.getAgentCallable = + callableFactory.createUnaryCallable( + getAgentTransportSettings, settings.getAgentSettings(), clientContext); + this.listEndpointsCallable = + callableFactory.createUnaryCallable( + listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); + this.listEndpointsPagedCallable = + callableFactory.createPagedCallable( + listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); + this.getEndpointCallable = + callableFactory.createUnaryCallable( + getEndpointTransportSettings, settings.getEndpointSettings(), clientContext); + this.listMcpServersCallable = + callableFactory.createUnaryCallable( + listMcpServersTransportSettings, settings.listMcpServersSettings(), clientContext); + this.listMcpServersPagedCallable = + callableFactory.createPagedCallable( + listMcpServersTransportSettings, settings.listMcpServersSettings(), clientContext); + this.searchMcpServersCallable = + callableFactory.createUnaryCallable( + searchMcpServersTransportSettings, settings.searchMcpServersSettings(), clientContext); + this.searchMcpServersPagedCallable = + callableFactory.createPagedCallable( + searchMcpServersTransportSettings, settings.searchMcpServersSettings(), clientContext); + this.getMcpServerCallable = + callableFactory.createUnaryCallable( + getMcpServerTransportSettings, settings.getMcpServerSettings(), clientContext); + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.createServiceCallable = + callableFactory.createUnaryCallable( + createServiceTransportSettings, settings.createServiceSettings(), clientContext); + this.createServiceOperationCallable = + callableFactory.createOperationCallable( + createServiceTransportSettings, + settings.createServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateServiceCallable = + callableFactory.createUnaryCallable( + updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); + this.updateServiceOperationCallable = + callableFactory.createOperationCallable( + updateServiceTransportSettings, + settings.updateServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listBindingsCallable = + callableFactory.createUnaryCallable( + listBindingsTransportSettings, settings.listBindingsSettings(), clientContext); + this.listBindingsPagedCallable = + callableFactory.createPagedCallable( + listBindingsTransportSettings, settings.listBindingsSettings(), clientContext); + this.getBindingCallable = + callableFactory.createUnaryCallable( + getBindingTransportSettings, settings.getBindingSettings(), clientContext); + this.createBindingCallable = + callableFactory.createUnaryCallable( + createBindingTransportSettings, settings.createBindingSettings(), clientContext); + this.createBindingOperationCallable = + callableFactory.createOperationCallable( + createBindingTransportSettings, + settings.createBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateBindingCallable = + callableFactory.createUnaryCallable( + updateBindingTransportSettings, settings.updateBindingSettings(), clientContext); + this.updateBindingOperationCallable = + callableFactory.createOperationCallable( + updateBindingTransportSettings, + settings.updateBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteBindingCallable = + callableFactory.createUnaryCallable( + deleteBindingTransportSettings, settings.deleteBindingSettings(), clientContext); + this.deleteBindingOperationCallable = + callableFactory.createOperationCallable( + deleteBindingTransportSettings, + settings.deleteBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.fetchAvailableBindingsCallable = + callableFactory.createUnaryCallable( + fetchAvailableBindingsTransportSettings, + settings.fetchAvailableBindingsSettings(), + clientContext); + this.fetchAvailableBindingsPagedCallable = + callableFactory.createPagedCallable( + fetchAvailableBindingsTransportSettings, + settings.fetchAvailableBindingsSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listAgentsMethodDescriptor); + methodDescriptors.add(searchAgentsMethodDescriptor); + methodDescriptors.add(getAgentMethodDescriptor); + methodDescriptors.add(listEndpointsMethodDescriptor); + methodDescriptors.add(getEndpointMethodDescriptor); + methodDescriptors.add(listMcpServersMethodDescriptor); + methodDescriptors.add(searchMcpServersMethodDescriptor); + methodDescriptors.add(getMcpServerMethodDescriptor); + methodDescriptors.add(listServicesMethodDescriptor); + methodDescriptors.add(getServiceMethodDescriptor); + methodDescriptors.add(createServiceMethodDescriptor); + methodDescriptors.add(updateServiceMethodDescriptor); + methodDescriptors.add(deleteServiceMethodDescriptor); + methodDescriptors.add(listBindingsMethodDescriptor); + methodDescriptors.add(getBindingMethodDescriptor); + methodDescriptors.add(createBindingMethodDescriptor); + methodDescriptors.add(updateBindingMethodDescriptor); + methodDescriptors.add(deleteBindingMethodDescriptor); + methodDescriptors.add(fetchAvailableBindingsMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listAgentsCallable() { + return listAgentsCallable; + } + + @Override + public UnaryCallable listAgentsPagedCallable() { + return listAgentsPagedCallable; + } + + @Override + public UnaryCallable searchAgentsCallable() { + return searchAgentsCallable; + } + + @Override + public UnaryCallable searchAgentsPagedCallable() { + return searchAgentsPagedCallable; + } + + @Override + public UnaryCallable getAgentCallable() { + return getAgentCallable; + } + + @Override + public UnaryCallable listEndpointsCallable() { + return listEndpointsCallable; + } + + @Override + public UnaryCallable + listEndpointsPagedCallable() { + return listEndpointsPagedCallable; + } + + @Override + public UnaryCallable getEndpointCallable() { + return getEndpointCallable; + } + + @Override + public UnaryCallable listMcpServersCallable() { + return listMcpServersCallable; + } + + @Override + public UnaryCallable + listMcpServersPagedCallable() { + return listMcpServersPagedCallable; + } + + @Override + public UnaryCallable + searchMcpServersCallable() { + return searchMcpServersCallable; + } + + @Override + public UnaryCallable + searchMcpServersPagedCallable() { + return searchMcpServersPagedCallable; + } + + @Override + public UnaryCallable getMcpServerCallable() { + return getMcpServerCallable; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable createServiceCallable() { + return createServiceCallable; + } + + @Override + public OperationCallable + createServiceOperationCallable() { + return createServiceOperationCallable; + } + + @Override + public UnaryCallable updateServiceCallable() { + return updateServiceCallable; + } + + @Override + public OperationCallable + updateServiceOperationCallable() { + return updateServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @Override + public UnaryCallable listBindingsCallable() { + return listBindingsCallable; + } + + @Override + public UnaryCallable listBindingsPagedCallable() { + return listBindingsPagedCallable; + } + + @Override + public UnaryCallable getBindingCallable() { + return getBindingCallable; + } + + @Override + public UnaryCallable createBindingCallable() { + return createBindingCallable; + } + + @Override + public OperationCallable + createBindingOperationCallable() { + return createBindingOperationCallable; + } + + @Override + public UnaryCallable updateBindingCallable() { + return updateBindingCallable; + } + + @Override + public OperationCallable + updateBindingOperationCallable() { + return updateBindingOperationCallable; + } + + @Override + public UnaryCallable deleteBindingCallable() { + return deleteBindingCallable; + } + + @Override + public OperationCallable + deleteBindingOperationCallable() { + return deleteBindingOperationCallable; + } + + @Override + public UnaryCallable + fetchAvailableBindingsCallable() { + return fetchAvailableBindingsCallable; + } + + @Override + public UnaryCallable + fetchAvailableBindingsPagedCallable() { + return fetchAvailableBindingsPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/Version.java b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/v1/stub/Version.java new file mode 100644 index 000000000000..c62f0e440774 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/java/com/google/cloud/agentregistry/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.agentregistry.v1.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-agentregistry:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/main/resources/META-INF/native-image/com.google.cloud.agentregistry.v1/reflect-config.json b/java-agentregistry/google-cloud-agentregistry/src/main/resources/META-INF/native-image/com.google.cloud.agentregistry.v1/reflect-config.json new file mode 100644 index 000000000000..56a42f75c994 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/main/resources/META-INF/native-image/com.google.cloud.agentregistry.v1/reflect-config.json @@ -0,0 +1,2567 @@ +[ + { + "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.Binding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Binding$AuthProviderBinding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Binding$AuthProviderBinding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Binding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Binding$Source", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Binding$Source$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Binding$Target", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Binding$Target$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.CreateBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.CreateBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.CreateServiceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.CreateServiceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.DeleteBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.DeleteBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.DeleteServiceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.DeleteServiceRequest$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.FetchAvailableBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetAgentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetAgentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetEndpointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetEndpointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetMcpServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetMcpServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetServiceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.GetServiceRequest$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.ListAgentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListAgentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListAgentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListAgentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListEndpointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListEndpointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListEndpointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListEndpointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListMcpServersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListMcpServersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListMcpServersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListMcpServersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListServicesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListServicesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListServicesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.ListServicesResponse$Builder", + "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.agentregistry.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.SearchAgentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.SearchAgentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.SearchAgentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.SearchAgentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.SearchMcpServersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.SearchMcpServersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.SearchMcpServersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.SearchMcpServersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$AgentSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$AgentSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$AgentSpec$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$EndpointSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$EndpointSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$EndpointSpec$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$McpServerSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$McpServerSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.Service$McpServerSpec$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.UpdateBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.UpdateBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.UpdateServiceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.agentregistry.v1.UpdateServiceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$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.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$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 + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/AgentRegistryClientHttpJsonTest.java b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/AgentRegistryClientHttpJsonTest.java new file mode 100644 index 000000000000..af744bb879bc --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/AgentRegistryClientHttpJsonTest.java @@ -0,0 +1,2098 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.FetchAvailableBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListEndpointsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListLocationsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListMcpServersPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListServicesPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchMcpServersPagedResponse; + +import com.google.api.gax.core.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.stub.HttpJsonAgentRegistryStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +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 java.util.concurrent.ExecutionException; +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 AgentRegistryClientHttpJsonTest { + private static MockHttpService mockService; + private static AgentRegistryClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAgentRegistryStub.getMethodDescriptors(), + AgentRegistrySettings.getDefaultEndpoint()); + AgentRegistrySettings settings = + AgentRegistrySettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AgentRegistrySettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AgentRegistryClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listAgentsTest() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + ListAgentsResponse expectedResponse = + ListAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAgentsPagedResponse pagedListResponse = client.listAgents(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 listAgentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAgentsTest2() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + ListAgentsResponse expectedResponse = + ListAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListAgentsPagedResponse pagedListResponse = client.listAgents(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 listAgentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAgentsTest() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + SearchAgentsResponse expectedResponse = + SearchAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + SearchAgentsPagedResponse pagedListResponse = client.searchAgents(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 searchAgentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.searchAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAgentsTest2() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + SearchAgentsResponse expectedResponse = + SearchAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + SearchAgentsPagedResponse pagedListResponse = client.searchAgents(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 searchAgentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.searchAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentTest() throws Exception { + Agent expectedResponse = + Agent.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setAgentId("agentId-1060987136") + .setLocation("location1901043637") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVersion("version351608024") + .addAllProtocols(new ArrayList()) + .addAllSkills(new ArrayList()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .setCard(Agent.Card.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + Agent actualResponse = client.getAgent(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 getAgentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.getAgent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentTest2() throws Exception { + Agent expectedResponse = + Agent.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setAgentId("agentId-1060987136") + .setLocation("location1901043637") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVersion("version351608024") + .addAllProtocols(new ArrayList()) + .addAllSkills(new ArrayList()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .setCard(Agent.Card.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2930/locations/location-2930/agents/agent-2930"; + + Agent actualResponse = client.getAgent(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 getAgentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2930/locations/location-2930/agents/agent-2930"; + client.getAgent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEndpointsTest() throws Exception { + Endpoint responsesElement = Endpoint.newBuilder().build(); + ListEndpointsResponse expectedResponse = + ListEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllEndpoints(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(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 listEndpointsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEndpointsTest2() throws Exception { + Endpoint responsesElement = Endpoint.newBuilder().build(); + ListEndpointsResponse expectedResponse = + ListEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllEndpoints(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(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 listEndpointsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEndpointTest() throws Exception { + Endpoint expectedResponse = + Endpoint.newBuilder() + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .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); + + EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + + Endpoint actualResponse = client.getEndpoint(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 getEndpointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + client.getEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEndpointTest2() throws Exception { + Endpoint expectedResponse = + Endpoint.newBuilder() + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .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-6164/locations/location-6164/endpoints/endpoint-6164"; + + Endpoint actualResponse = client.getEndpoint(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 getEndpointExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6164/locations/location-6164/endpoints/endpoint-6164"; + client.getEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMcpServersTest() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + ListMcpServersResponse expectedResponse = + ListMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListMcpServersPagedResponse pagedListResponse = client.listMcpServers(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 listMcpServersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMcpServersTest2() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + ListMcpServersResponse expectedResponse = + ListMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListMcpServersPagedResponse pagedListResponse = client.listMcpServers(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 listMcpServersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchMcpServersTest() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + SearchMcpServersResponse expectedResponse = + SearchMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + SearchMcpServersPagedResponse pagedListResponse = client.searchMcpServers(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 searchMcpServersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.searchMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchMcpServersTest2() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + SearchMcpServersResponse expectedResponse = + SearchMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + SearchMcpServersPagedResponse pagedListResponse = client.searchMcpServers(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 searchMcpServersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.searchMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMcpServerTest() throws Exception { + McpServer expectedResponse = + McpServer.newBuilder() + .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString()) + .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); + + McpServerName name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]"); + + McpServer actualResponse = client.getMcpServer(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 getMcpServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + McpServerName name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]"); + client.getMcpServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMcpServerTest2() throws Exception { + McpServer expectedResponse = + McpServer.newBuilder() + .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString()) + .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-5974/locations/location-5974/mcpServers/mcpServer-5974"; + + McpServer actualResponse = client.getMcpServer(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 getMcpServerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-5974/locations/location-5974/mcpServers/mcpServer-5974"; + client.getMcpServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().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 listServicesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest2() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().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 listServicesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + Service actualResponse = client.getService(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 getServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + + Service actualResponse = client.getService(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 getServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + 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 createServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + 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 createServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Service service = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Service actualResponse = client.updateServiceAsync(service, updateMask).get(); + 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 updateServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Service service = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateServiceAsync(service, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + client.deleteServiceAsync(name).get(); + + 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 deleteServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServiceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + + client.deleteServiceAsync(name).get(); + + 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 deleteServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listBindingsTest() throws Exception { + Binding responsesElement = Binding.newBuilder().build(); + ListBindingsResponse expectedResponse = + ListBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBindingsPagedResponse pagedListResponse = client.listBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBindingsList().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 listBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBindingsTest2() throws Exception { + Binding responsesElement = Binding.newBuilder().build(); + ListBindingsResponse expectedResponse = + ListBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListBindingsPagedResponse pagedListResponse = client.listBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBindingsList().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 listBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBindingTest() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + + Binding actualResponse = client.getBinding(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 getBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + client.getBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBindingTest2() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5678/locations/location-5678/bindings/binding-5678"; + + Binding actualResponse = client.getBinding(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 getBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-5678/locations/location-5678/bindings/binding-5678"; + client.getBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBindingTest() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + + Binding actualResponse = client.createBindingAsync(parent, binding, bindingId).get(); + 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 createBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + client.createBindingAsync(parent, binding, bindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBindingTest2() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + + Binding actualResponse = client.createBindingAsync(parent, binding, bindingId).get(); + 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 createBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + client.createBindingAsync(parent, binding, bindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateBindingTest() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Binding binding = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Binding actualResponse = client.updateBindingAsync(binding, updateMask).get(); + 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 updateBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Binding binding = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBindingAsync(binding, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + + client.deleteBindingAsync(name).get(); + + 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 deleteBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + client.deleteBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-5678/locations/location-5678/bindings/binding-5678"; + + client.deleteBindingAsync(name).get(); + + 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 deleteBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-5678/locations/location-5678/bindings/binding-5678"; + client.deleteBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void fetchAvailableBindingsTest() throws Exception { + Binding responsesElement = Binding.newBuilder().build(); + FetchAvailableBindingsResponse expectedResponse = + FetchAvailableBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + FetchAvailableBindingsPagedResponse pagedListResponse = client.fetchAvailableBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBindingsList().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 fetchAvailableBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.fetchAvailableBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchAvailableBindingsTest2() throws Exception { + Binding responsesElement = Binding.newBuilder().build(); + FetchAvailableBindingsResponse expectedResponse = + FetchAvailableBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + FetchAvailableBindingsPagedResponse pagedListResponse = client.fetchAvailableBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBindingsList().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 fetchAvailableBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.fetchAvailableBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + 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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/AgentRegistryClientTest.java b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/AgentRegistryClientTest.java new file mode 100644 index 000000000000..80f6d7eb86f1 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/AgentRegistryClientTest.java @@ -0,0 +1,1880 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.FetchAvailableBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListBindingsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListEndpointsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListLocationsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListMcpServersPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.ListServicesPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchAgentsPagedResponse; +import static com.google.cloud.agentregistry.v1.AgentRegistryClient.SearchMcpServersPagedResponse; + +import com.google.api.gax.core.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.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +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 java.util.concurrent.ExecutionException; +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 AgentRegistryClientTest { + private static MockAgentRegistry mockAgentRegistry; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AgentRegistryClient client; + + @BeforeClass + public static void startStaticServer() { + mockAgentRegistry = new MockAgentRegistry(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockAgentRegistry, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AgentRegistrySettings settings = + AgentRegistrySettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AgentRegistryClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listAgentsTest() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + ListAgentsResponse expectedResponse = + ListAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAgentsPagedResponse pagedListResponse = client.listAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAgentsRequest actualRequest = ((ListAgentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAgentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAgentsTest2() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + ListAgentsResponse expectedResponse = + ListAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAgentsPagedResponse pagedListResponse = client.listAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAgentsRequest actualRequest = ((ListAgentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAgentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAgentsTest() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + SearchAgentsResponse expectedResponse = + SearchAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + SearchAgentsPagedResponse pagedListResponse = client.searchAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchAgentsRequest actualRequest = ((SearchAgentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchAgentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.searchAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAgentsTest2() throws Exception { + Agent responsesElement = Agent.newBuilder().build(); + SearchAgentsResponse expectedResponse = + SearchAgentsResponse.newBuilder() + .setNextPageToken("") + .addAllAgents(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + SearchAgentsPagedResponse pagedListResponse = client.searchAgents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchAgentsRequest actualRequest = ((SearchAgentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchAgentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.searchAgents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentTest() throws Exception { + Agent expectedResponse = + Agent.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setAgentId("agentId-1060987136") + .setLocation("location1901043637") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVersion("version351608024") + .addAllProtocols(new ArrayList()) + .addAllSkills(new ArrayList()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .setCard(Agent.Card.newBuilder().build()) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + Agent actualResponse = client.getAgent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAgentRequest actualRequest = ((GetAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAgentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.getAgent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentTest2() throws Exception { + Agent expectedResponse = + Agent.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setAgentId("agentId-1060987136") + .setLocation("location1901043637") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setVersion("version351608024") + .addAllProtocols(new ArrayList()) + .addAllSkills(new ArrayList()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .setCard(Agent.Card.newBuilder().build()) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + Agent actualResponse = client.getAgent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAgentRequest actualRequest = ((GetAgentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAgentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getAgent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEndpointsTest() throws Exception { + Endpoint responsesElement = Endpoint.newBuilder().build(); + ListEndpointsResponse expectedResponse = + ListEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllEndpoints(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEndpointsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEndpointsRequest actualRequest = ((ListEndpointsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEndpointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEndpointsTest2() throws Exception { + Endpoint responsesElement = Endpoint.newBuilder().build(); + ListEndpointsResponse expectedResponse = + ListEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllEndpoints(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEndpointsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEndpointsRequest actualRequest = ((ListEndpointsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEndpointsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEndpointTest() throws Exception { + Endpoint expectedResponse = + Endpoint.newBuilder() + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .setEndpointId("endpointId-1837754992") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + + Endpoint actualResponse = client.getEndpoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEndpointRequest actualRequest = ((GetEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEndpointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + client.getEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEndpointTest2() throws Exception { + Endpoint expectedResponse = + Endpoint.newBuilder() + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .setEndpointId("endpointId-1837754992") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + Endpoint actualResponse = client.getEndpoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEndpointRequest actualRequest = ((GetEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEndpointExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMcpServersTest() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + ListMcpServersResponse expectedResponse = + ListMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListMcpServersPagedResponse pagedListResponse = client.listMcpServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMcpServersList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMcpServersRequest actualRequest = ((ListMcpServersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMcpServersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMcpServersTest2() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + ListMcpServersResponse expectedResponse = + ListMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMcpServersPagedResponse pagedListResponse = client.listMcpServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMcpServersList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMcpServersRequest actualRequest = ((ListMcpServersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMcpServersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchMcpServersTest() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + SearchMcpServersResponse expectedResponse = + SearchMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + SearchMcpServersPagedResponse pagedListResponse = client.searchMcpServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMcpServersList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchMcpServersRequest actualRequest = ((SearchMcpServersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchMcpServersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.searchMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchMcpServersTest2() throws Exception { + McpServer responsesElement = McpServer.newBuilder().build(); + SearchMcpServersResponse expectedResponse = + SearchMcpServersResponse.newBuilder() + .setNextPageToken("") + .addAllMcpServers(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + SearchMcpServersPagedResponse pagedListResponse = client.searchMcpServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMcpServersList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchMcpServersRequest actualRequest = ((SearchMcpServersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchMcpServersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.searchMcpServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMcpServerTest() throws Exception { + McpServer expectedResponse = + McpServer.newBuilder() + .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString()) + .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(); + mockAgentRegistry.addResponse(expectedResponse); + + McpServerName name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]"); + + McpServer actualResponse = client.getMcpServer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMcpServerRequest actualRequest = ((GetMcpServerRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMcpServerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + McpServerName name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]"); + client.getMcpServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMcpServerTest2() throws Exception { + McpServer expectedResponse = + McpServer.newBuilder() + .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString()) + .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(); + mockAgentRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + McpServer actualResponse = client.getMcpServer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMcpServerRequest actualRequest = ((GetMcpServerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMcpServerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getMcpServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest2() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(serviceId, actualRequest.getServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + String parent = "parent-995424086"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(serviceId, actualRequest.getServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInterfaces(new ArrayList()) + .setRegistryResource("registryResource1400949611") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + Service service = Service.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Service actualResponse = client.updateServiceAsync(service, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateServiceRequest actualRequest = ((UpdateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + Service service = Service.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateServiceAsync(service, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteServiceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listBindingsTest() throws Exception { + Binding responsesElement = Binding.newBuilder().build(); + ListBindingsResponse expectedResponse = + ListBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllBindings(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBindingsPagedResponse pagedListResponse = client.listBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBindingsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBindingsRequest actualRequest = ((ListBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBindingsTest2() throws Exception { + Binding responsesElement = Binding.newBuilder().build(); + ListBindingsResponse expectedResponse = + ListBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllBindings(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBindingsPagedResponse pagedListResponse = client.listBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBindingsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBindingsRequest actualRequest = ((ListBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBindingTest() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + + Binding actualResponse = client.getBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBindingRequest actualRequest = ((GetBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + client.getBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBindingTest2() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + Binding actualResponse = client.getBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBindingRequest actualRequest = ((GetBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBindingTest() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + + Binding actualResponse = client.createBindingAsync(parent, binding, bindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBindingRequest actualRequest = ((CreateBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(binding, actualRequest.getBinding()); + Assert.assertEquals(bindingId, actualRequest.getBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + client.createBindingAsync(parent, binding, bindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBindingTest2() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + String parent = "parent-995424086"; + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + + Binding actualResponse = client.createBindingAsync(parent, binding, bindingId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBindingRequest actualRequest = ((CreateBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(binding, actualRequest.getBinding()); + Assert.assertEquals(bindingId, actualRequest.getBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + client.createBindingAsync(parent, binding, bindingId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateBindingTest() throws Exception { + Binding expectedResponse = + Binding.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setSource(Binding.Source.newBuilder().build()) + .setTarget(Binding.Target.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + Binding binding = Binding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Binding actualResponse = client.updateBindingAsync(binding, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateBindingRequest actualRequest = ((UpdateBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(binding, actualRequest.getBinding()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + Binding binding = Binding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBindingAsync(binding, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + + client.deleteBindingAsync(name).get(); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBindingRequest actualRequest = ((DeleteBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + client.deleteBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAgentRegistry.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBindingAsync(name).get(); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBindingRequest actualRequest = ((DeleteBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void fetchAvailableBindingsTest() throws Exception { + Binding responsesElement = Binding.newBuilder().build(); + FetchAvailableBindingsResponse expectedResponse = + FetchAvailableBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllBindings(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + FetchAvailableBindingsPagedResponse pagedListResponse = client.fetchAvailableBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBindingsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchAvailableBindingsRequest actualRequest = + ((FetchAvailableBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchAvailableBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.fetchAvailableBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchAvailableBindingsTest2() throws Exception { + Binding responsesElement = Binding.newBuilder().build(); + FetchAvailableBindingsResponse expectedResponse = + FetchAvailableBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllBindings(Arrays.asList(responsesElement)) + .build(); + mockAgentRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + FetchAvailableBindingsPagedResponse pagedListResponse = client.fetchAvailableBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBindingsList().get(0), resources.get(0)); + + List actualRequests = mockAgentRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchAvailableBindingsRequest actualRequest = + ((FetchAvailableBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchAvailableBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAgentRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.fetchAvailableBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockAgentRegistry.java b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockAgentRegistry.java new file mode 100644 index 000000000000..e5892717b947 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockAgentRegistry.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.agentregistry.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 MockAgentRegistry implements MockGrpcService { + private final MockAgentRegistryImpl serviceImpl; + + public MockAgentRegistry() { + serviceImpl = new MockAgentRegistryImpl(); + } + + @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-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockAgentRegistryImpl.java b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockAgentRegistryImpl.java new file mode 100644 index 000000000000..cd5da34ee8a4 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockAgentRegistryImpl.java @@ -0,0 +1,458 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.agentregistry.v1.AgentRegistryGrpc.AgentRegistryImplBase; +import com.google.longrunning.Operation; +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 MockAgentRegistryImpl extends AgentRegistryImplBase { + private List requests; + private Queue responses; + + public MockAgentRegistryImpl() { + 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 listAgents( + ListAgentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAgentsResponse) { + requests.add(request); + responseObserver.onNext(((ListAgentsResponse) 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 ListAgents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAgentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchAgents( + SearchAgentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchAgentsResponse) { + requests.add(request); + responseObserver.onNext(((SearchAgentsResponse) 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 SearchAgents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchAgentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAgent(GetAgentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Agent) { + requests.add(request); + responseObserver.onNext(((Agent) 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 GetAgent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Agent.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listEndpoints( + ListEndpointsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEndpointsResponse) { + requests.add(request); + responseObserver.onNext(((ListEndpointsResponse) 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 ListEndpoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEndpointsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getEndpoint(GetEndpointRequest 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 GetEndpoint, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Endpoint.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listMcpServers( + ListMcpServersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListMcpServersResponse) { + requests.add(request); + responseObserver.onNext(((ListMcpServersResponse) 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 ListMcpServers, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListMcpServersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchMcpServers( + SearchMcpServersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchMcpServersResponse) { + requests.add(request); + responseObserver.onNext(((SearchMcpServersResponse) 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 SearchMcpServers, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchMcpServersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getMcpServer( + GetMcpServerRequest 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 GetMcpServer, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + McpServer.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listServices( + ListServicesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListServicesResponse) { + requests.add(request); + responseObserver.onNext(((ListServicesResponse) 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 ListServices, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListServicesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getService(GetServiceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Service) { + requests.add(request); + responseObserver.onNext(((Service) 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 GetService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Service.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createService( + CreateServiceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 CreateService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateService( + UpdateServiceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 UpdateService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteService( + DeleteServiceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 DeleteService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBindings( + ListBindingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBindingsResponse) { + requests.add(request); + responseObserver.onNext(((ListBindingsResponse) 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 ListBindings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBinding(GetBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Binding) { + requests.add(request); + responseObserver.onNext(((Binding) 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 GetBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Binding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createBinding( + CreateBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 CreateBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateBinding( + UpdateBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 UpdateBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteBinding( + DeleteBindingRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 DeleteBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void fetchAvailableBindings( + FetchAvailableBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FetchAvailableBindingsResponse) { + requests.add(request); + responseObserver.onNext(((FetchAvailableBindingsResponse) 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 FetchAvailableBindings, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + FetchAvailableBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockLocations.java b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockLocations.java new file mode 100644 index 000000000000..f4ef40e99c77 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockLocations.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.agentregistry.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 MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @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-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockLocationsImpl.java b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..97716dfebb87 --- /dev/null +++ b/java-agentregistry/google-cloud-agentregistry/src/test/java/com/google/cloud/agentregistry/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +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 MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + 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 listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) 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 ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) 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 GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-agentregistry/grpc-google-cloud-agentregistry-v1/pom.xml b/java-agentregistry/grpc-google-cloud-agentregistry-v1/pom.xml new file mode 100644 index 000000000000..ea9668fcd966 --- /dev/null +++ b/java-agentregistry/grpc-google-cloud-agentregistry-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-agentregistry-v1 + 0.1.0-SNAPSHOT + grpc-google-cloud-agentregistry-v1 + GRPC library for google-cloud-agentregistry + + com.google.cloud + google-cloud-agentregistry-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-agentregistry-v1 + + + com.google.guava + guava + + + diff --git a/java-agentregistry/grpc-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryGrpc.java b/java-agentregistry/grpc-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryGrpc.java new file mode 100644 index 000000000000..45abe3ea6a14 --- /dev/null +++ b/java-agentregistry/grpc-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryGrpc.java @@ -0,0 +1,2775 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.agentregistry.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing Agents, Endpoints, McpServers, Services, and Bindings.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class AgentRegistryGrpc { + + private AgentRegistryGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.agentregistry.v1.AgentRegistry"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListAgentsRequest, + com.google.cloud.agentregistry.v1.ListAgentsResponse> + getListAgentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAgents", + requestType = com.google.cloud.agentregistry.v1.ListAgentsRequest.class, + responseType = com.google.cloud.agentregistry.v1.ListAgentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListAgentsRequest, + com.google.cloud.agentregistry.v1.ListAgentsResponse> + getListAgentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListAgentsRequest, + com.google.cloud.agentregistry.v1.ListAgentsResponse> + getListAgentsMethod; + if ((getListAgentsMethod = AgentRegistryGrpc.getListAgentsMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getListAgentsMethod = AgentRegistryGrpc.getListAgentsMethod) == null) { + AgentRegistryGrpc.getListAgentsMethod = + getListAgentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAgents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListAgentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListAgentsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new AgentRegistryMethodDescriptorSupplier("ListAgents")) + .build(); + } + } + } + return getListAgentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.SearchAgentsRequest, + com.google.cloud.agentregistry.v1.SearchAgentsResponse> + getSearchAgentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchAgents", + requestType = com.google.cloud.agentregistry.v1.SearchAgentsRequest.class, + responseType = com.google.cloud.agentregistry.v1.SearchAgentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.SearchAgentsRequest, + com.google.cloud.agentregistry.v1.SearchAgentsResponse> + getSearchAgentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.SearchAgentsRequest, + com.google.cloud.agentregistry.v1.SearchAgentsResponse> + getSearchAgentsMethod; + if ((getSearchAgentsMethod = AgentRegistryGrpc.getSearchAgentsMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getSearchAgentsMethod = AgentRegistryGrpc.getSearchAgentsMethod) == null) { + AgentRegistryGrpc.getSearchAgentsMethod = + getSearchAgentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAgents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.SearchAgentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.SearchAgentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("SearchAgents")) + .build(); + } + } + } + return getSearchAgentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetAgentRequest, + com.google.cloud.agentregistry.v1.Agent> + getGetAgentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAgent", + requestType = com.google.cloud.agentregistry.v1.GetAgentRequest.class, + responseType = com.google.cloud.agentregistry.v1.Agent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetAgentRequest, + com.google.cloud.agentregistry.v1.Agent> + getGetAgentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetAgentRequest, + com.google.cloud.agentregistry.v1.Agent> + getGetAgentMethod; + if ((getGetAgentMethod = AgentRegistryGrpc.getGetAgentMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getGetAgentMethod = AgentRegistryGrpc.getGetAgentMethod) == null) { + AgentRegistryGrpc.getGetAgentMethod = + getGetAgentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAgent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.GetAgentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.Agent.getDefaultInstance())) + .setSchemaDescriptor(new AgentRegistryMethodDescriptorSupplier("GetAgent")) + .build(); + } + } + } + return getGetAgentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListEndpointsRequest, + com.google.cloud.agentregistry.v1.ListEndpointsResponse> + getListEndpointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEndpoints", + requestType = com.google.cloud.agentregistry.v1.ListEndpointsRequest.class, + responseType = com.google.cloud.agentregistry.v1.ListEndpointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListEndpointsRequest, + com.google.cloud.agentregistry.v1.ListEndpointsResponse> + getListEndpointsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListEndpointsRequest, + com.google.cloud.agentregistry.v1.ListEndpointsResponse> + getListEndpointsMethod; + if ((getListEndpointsMethod = AgentRegistryGrpc.getListEndpointsMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getListEndpointsMethod = AgentRegistryGrpc.getListEndpointsMethod) == null) { + AgentRegistryGrpc.getListEndpointsMethod = + getListEndpointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEndpoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListEndpointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListEndpointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("ListEndpoints")) + .build(); + } + } + } + return getListEndpointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetEndpointRequest, + com.google.cloud.agentregistry.v1.Endpoint> + getGetEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEndpoint", + requestType = com.google.cloud.agentregistry.v1.GetEndpointRequest.class, + responseType = com.google.cloud.agentregistry.v1.Endpoint.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetEndpointRequest, + com.google.cloud.agentregistry.v1.Endpoint> + getGetEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetEndpointRequest, + com.google.cloud.agentregistry.v1.Endpoint> + getGetEndpointMethod; + if ((getGetEndpointMethod = AgentRegistryGrpc.getGetEndpointMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getGetEndpointMethod = AgentRegistryGrpc.getGetEndpointMethod) == null) { + AgentRegistryGrpc.getGetEndpointMethod = + getGetEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.GetEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.Endpoint.getDefaultInstance())) + .setSchemaDescriptor(new AgentRegistryMethodDescriptorSupplier("GetEndpoint")) + .build(); + } + } + } + return getGetEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListMcpServersRequest, + com.google.cloud.agentregistry.v1.ListMcpServersResponse> + getListMcpServersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMcpServers", + requestType = com.google.cloud.agentregistry.v1.ListMcpServersRequest.class, + responseType = com.google.cloud.agentregistry.v1.ListMcpServersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListMcpServersRequest, + com.google.cloud.agentregistry.v1.ListMcpServersResponse> + getListMcpServersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListMcpServersRequest, + com.google.cloud.agentregistry.v1.ListMcpServersResponse> + getListMcpServersMethod; + if ((getListMcpServersMethod = AgentRegistryGrpc.getListMcpServersMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getListMcpServersMethod = AgentRegistryGrpc.getListMcpServersMethod) == null) { + AgentRegistryGrpc.getListMcpServersMethod = + getListMcpServersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMcpServers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListMcpServersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListMcpServersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("ListMcpServers")) + .build(); + } + } + } + return getListMcpServersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.SearchMcpServersRequest, + com.google.cloud.agentregistry.v1.SearchMcpServersResponse> + getSearchMcpServersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchMcpServers", + requestType = com.google.cloud.agentregistry.v1.SearchMcpServersRequest.class, + responseType = com.google.cloud.agentregistry.v1.SearchMcpServersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.SearchMcpServersRequest, + com.google.cloud.agentregistry.v1.SearchMcpServersResponse> + getSearchMcpServersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.SearchMcpServersRequest, + com.google.cloud.agentregistry.v1.SearchMcpServersResponse> + getSearchMcpServersMethod; + if ((getSearchMcpServersMethod = AgentRegistryGrpc.getSearchMcpServersMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getSearchMcpServersMethod = AgentRegistryGrpc.getSearchMcpServersMethod) == null) { + AgentRegistryGrpc.getSearchMcpServersMethod = + getSearchMcpServersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchMcpServers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.SearchMcpServersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.SearchMcpServersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("SearchMcpServers")) + .build(); + } + } + } + return getSearchMcpServersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetMcpServerRequest, + com.google.cloud.agentregistry.v1.McpServer> + getGetMcpServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMcpServer", + requestType = com.google.cloud.agentregistry.v1.GetMcpServerRequest.class, + responseType = com.google.cloud.agentregistry.v1.McpServer.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetMcpServerRequest, + com.google.cloud.agentregistry.v1.McpServer> + getGetMcpServerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetMcpServerRequest, + com.google.cloud.agentregistry.v1.McpServer> + getGetMcpServerMethod; + if ((getGetMcpServerMethod = AgentRegistryGrpc.getGetMcpServerMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getGetMcpServerMethod = AgentRegistryGrpc.getGetMcpServerMethod) == null) { + AgentRegistryGrpc.getGetMcpServerMethod = + getGetMcpServerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMcpServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.GetMcpServerRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.McpServer.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("GetMcpServer")) + .build(); + } + } + } + return getGetMcpServerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListServicesRequest, + com.google.cloud.agentregistry.v1.ListServicesResponse> + getListServicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListServices", + requestType = com.google.cloud.agentregistry.v1.ListServicesRequest.class, + responseType = com.google.cloud.agentregistry.v1.ListServicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListServicesRequest, + com.google.cloud.agentregistry.v1.ListServicesResponse> + getListServicesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListServicesRequest, + com.google.cloud.agentregistry.v1.ListServicesResponse> + getListServicesMethod; + if ((getListServicesMethod = AgentRegistryGrpc.getListServicesMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getListServicesMethod = AgentRegistryGrpc.getListServicesMethod) == null) { + AgentRegistryGrpc.getListServicesMethod = + getListServicesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListServicesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListServicesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("ListServices")) + .build(); + } + } + } + return getListServicesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetServiceRequest, + com.google.cloud.agentregistry.v1.Service> + getGetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetService", + requestType = com.google.cloud.agentregistry.v1.GetServiceRequest.class, + responseType = com.google.cloud.agentregistry.v1.Service.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetServiceRequest, + com.google.cloud.agentregistry.v1.Service> + getGetServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetServiceRequest, + com.google.cloud.agentregistry.v1.Service> + getGetServiceMethod; + if ((getGetServiceMethod = AgentRegistryGrpc.getGetServiceMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getGetServiceMethod = AgentRegistryGrpc.getGetServiceMethod) == null) { + AgentRegistryGrpc.getGetServiceMethod = + getGetServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.GetServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.Service.getDefaultInstance())) + .setSchemaDescriptor(new AgentRegistryMethodDescriptorSupplier("GetService")) + .build(); + } + } + } + return getGetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.CreateServiceRequest, com.google.longrunning.Operation> + getCreateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateService", + requestType = com.google.cloud.agentregistry.v1.CreateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.CreateServiceRequest, com.google.longrunning.Operation> + getCreateServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.CreateServiceRequest, + com.google.longrunning.Operation> + getCreateServiceMethod; + if ((getCreateServiceMethod = AgentRegistryGrpc.getCreateServiceMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getCreateServiceMethod = AgentRegistryGrpc.getCreateServiceMethod) == null) { + AgentRegistryGrpc.getCreateServiceMethod = + getCreateServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.CreateServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("CreateService")) + .build(); + } + } + } + return getCreateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.UpdateServiceRequest, com.google.longrunning.Operation> + getUpdateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateService", + requestType = com.google.cloud.agentregistry.v1.UpdateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.UpdateServiceRequest, com.google.longrunning.Operation> + getUpdateServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.UpdateServiceRequest, + com.google.longrunning.Operation> + getUpdateServiceMethod; + if ((getUpdateServiceMethod = AgentRegistryGrpc.getUpdateServiceMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getUpdateServiceMethod = AgentRegistryGrpc.getUpdateServiceMethod) == null) { + AgentRegistryGrpc.getUpdateServiceMethod = + getUpdateServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.UpdateServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("UpdateService")) + .build(); + } + } + } + return getUpdateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.DeleteServiceRequest, com.google.longrunning.Operation> + getDeleteServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteService", + requestType = com.google.cloud.agentregistry.v1.DeleteServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.DeleteServiceRequest, com.google.longrunning.Operation> + getDeleteServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.DeleteServiceRequest, + com.google.longrunning.Operation> + getDeleteServiceMethod; + if ((getDeleteServiceMethod = AgentRegistryGrpc.getDeleteServiceMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getDeleteServiceMethod = AgentRegistryGrpc.getDeleteServiceMethod) == null) { + AgentRegistryGrpc.getDeleteServiceMethod = + getDeleteServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.DeleteServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("DeleteService")) + .build(); + } + } + } + return getDeleteServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListBindingsRequest, + com.google.cloud.agentregistry.v1.ListBindingsResponse> + getListBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBindings", + requestType = com.google.cloud.agentregistry.v1.ListBindingsRequest.class, + responseType = com.google.cloud.agentregistry.v1.ListBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListBindingsRequest, + com.google.cloud.agentregistry.v1.ListBindingsResponse> + getListBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.ListBindingsRequest, + com.google.cloud.agentregistry.v1.ListBindingsResponse> + getListBindingsMethod; + if ((getListBindingsMethod = AgentRegistryGrpc.getListBindingsMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getListBindingsMethod = AgentRegistryGrpc.getListBindingsMethod) == null) { + AgentRegistryGrpc.getListBindingsMethod = + getListBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListBindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.ListBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("ListBindings")) + .build(); + } + } + } + return getListBindingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetBindingRequest, + com.google.cloud.agentregistry.v1.Binding> + getGetBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBinding", + requestType = com.google.cloud.agentregistry.v1.GetBindingRequest.class, + responseType = com.google.cloud.agentregistry.v1.Binding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetBindingRequest, + com.google.cloud.agentregistry.v1.Binding> + getGetBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.GetBindingRequest, + com.google.cloud.agentregistry.v1.Binding> + getGetBindingMethod; + if ((getGetBindingMethod = AgentRegistryGrpc.getGetBindingMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getGetBindingMethod = AgentRegistryGrpc.getGetBindingMethod) == null) { + AgentRegistryGrpc.getGetBindingMethod = + getGetBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.GetBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.Binding.getDefaultInstance())) + .setSchemaDescriptor(new AgentRegistryMethodDescriptorSupplier("GetBinding")) + .build(); + } + } + } + return getGetBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.CreateBindingRequest, com.google.longrunning.Operation> + getCreateBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBinding", + requestType = com.google.cloud.agentregistry.v1.CreateBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.CreateBindingRequest, com.google.longrunning.Operation> + getCreateBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.CreateBindingRequest, + com.google.longrunning.Operation> + getCreateBindingMethod; + if ((getCreateBindingMethod = AgentRegistryGrpc.getCreateBindingMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getCreateBindingMethod = AgentRegistryGrpc.getCreateBindingMethod) == null) { + AgentRegistryGrpc.getCreateBindingMethod = + getCreateBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.CreateBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("CreateBinding")) + .build(); + } + } + } + return getCreateBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.UpdateBindingRequest, com.google.longrunning.Operation> + getUpdateBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBinding", + requestType = com.google.cloud.agentregistry.v1.UpdateBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.UpdateBindingRequest, com.google.longrunning.Operation> + getUpdateBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.UpdateBindingRequest, + com.google.longrunning.Operation> + getUpdateBindingMethod; + if ((getUpdateBindingMethod = AgentRegistryGrpc.getUpdateBindingMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getUpdateBindingMethod = AgentRegistryGrpc.getUpdateBindingMethod) == null) { + AgentRegistryGrpc.getUpdateBindingMethod = + getUpdateBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.UpdateBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("UpdateBinding")) + .build(); + } + } + } + return getUpdateBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.DeleteBindingRequest, com.google.longrunning.Operation> + getDeleteBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBinding", + requestType = com.google.cloud.agentregistry.v1.DeleteBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.DeleteBindingRequest, com.google.longrunning.Operation> + getDeleteBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.DeleteBindingRequest, + com.google.longrunning.Operation> + getDeleteBindingMethod; + if ((getDeleteBindingMethod = AgentRegistryGrpc.getDeleteBindingMethod) == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getDeleteBindingMethod = AgentRegistryGrpc.getDeleteBindingMethod) == null) { + AgentRegistryGrpc.getDeleteBindingMethod = + getDeleteBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.DeleteBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("DeleteBinding")) + .build(); + } + } + } + return getDeleteBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest, + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse> + getFetchAvailableBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchAvailableBindings", + requestType = com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.class, + responseType = com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest, + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse> + getFetchAvailableBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest, + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse> + getFetchAvailableBindingsMethod; + if ((getFetchAvailableBindingsMethod = AgentRegistryGrpc.getFetchAvailableBindingsMethod) + == null) { + synchronized (AgentRegistryGrpc.class) { + if ((getFetchAvailableBindingsMethod = AgentRegistryGrpc.getFetchAvailableBindingsMethod) + == null) { + AgentRegistryGrpc.getFetchAvailableBindingsMethod = + getFetchAvailableBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "FetchAvailableBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AgentRegistryMethodDescriptorSupplier("FetchAvailableBindings")) + .build(); + } + } + } + return getFetchAvailableBindingsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AgentRegistryStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AgentRegistryStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryStub(channel, callOptions); + } + }; + return AgentRegistryStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static AgentRegistryBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AgentRegistryBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryBlockingV2Stub(channel, callOptions); + } + }; + return AgentRegistryBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AgentRegistryBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AgentRegistryBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryBlockingStub(channel, callOptions); + } + }; + return AgentRegistryBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AgentRegistryFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AgentRegistryFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryFutureStub(channel, callOptions); + } + }; + return AgentRegistryFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing Agents, Endpoints, McpServers, Services, and Bindings.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists Agents in a given project and location.
+     * 
+ */ + default void listAgents( + com.google.cloud.agentregistry.v1.ListAgentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAgentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Searches Agents in a given project and location.
+     * 
+ */ + default void searchAgents( + com.google.cloud.agentregistry.v1.SearchAgentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchAgentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Agent.
+     * 
+ */ + default void getAgent( + com.google.cloud.agentregistry.v1.GetAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAgentMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Endpoints in a given project and location.
+     * 
+ */ + default void listEndpoints( + com.google.cloud.agentregistry.v1.ListEndpointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEndpointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Endpoint.
+     * 
+ */ + default void getEndpoint( + com.google.cloud.agentregistry.v1.GetEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists McpServers in a given project and location.
+     * 
+ */ + default void listMcpServers( + com.google.cloud.agentregistry.v1.ListMcpServersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMcpServersMethod(), responseObserver); + } + + /** + * + * + *
+     * Searches McpServers in a given project and location.
+     * 
+ */ + default void searchMcpServers( + com.google.cloud.agentregistry.v1.SearchMcpServersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchMcpServersMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single McpServer.
+     * 
+ */ + default void getMcpServer( + com.google.cloud.agentregistry.v1.GetMcpServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetMcpServerMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Services in a given project and location.
+     * 
+ */ + default void listServices( + com.google.cloud.agentregistry.v1.ListServicesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListServicesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Service.
+     * 
+ */ + default void getService( + com.google.cloud.agentregistry.v1.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Service in a given project and location.
+     * 
+ */ + default void createService( + com.google.cloud.agentregistry.v1.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Service.
+     * 
+ */ + default void updateService( + com.google.cloud.agentregistry.v1.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Service.
+     * 
+ */ + default void deleteService( + com.google.cloud.agentregistry.v1.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Bindings in a given project and location.
+     * 
+ */ + default void listBindings( + com.google.cloud.agentregistry.v1.ListBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Binding.
+     * 
+ */ + default void getBinding( + com.google.cloud.agentregistry.v1.GetBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Binding in a given project and location.
+     * 
+ */ + default void createBinding( + com.google.cloud.agentregistry.v1.CreateBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Binding.
+     * 
+ */ + default void updateBinding( + com.google.cloud.agentregistry.v1.UpdateBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Binding.
+     * 
+ */ + default void deleteBinding( + com.google.cloud.agentregistry.v1.DeleteBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetches available Bindings.
+     * 
+ */ + default void fetchAvailableBindings( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchAvailableBindingsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AgentRegistry. + * + *
+   * Service for managing Agents, Endpoints, McpServers, Services, and Bindings.
+   * 
+ */ + public abstract static class AgentRegistryImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return AgentRegistryGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AgentRegistry. + * + *
+   * Service for managing Agents, Endpoints, McpServers, Services, and Bindings.
+   * 
+ */ + public static final class AgentRegistryStub + extends io.grpc.stub.AbstractAsyncStub { + private AgentRegistryStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AgentRegistryStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Agents in a given project and location.
+     * 
+ */ + public void listAgents( + com.google.cloud.agentregistry.v1.ListAgentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAgentsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Searches Agents in a given project and location.
+     * 
+ */ + public void searchAgents( + com.google.cloud.agentregistry.v1.SearchAgentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchAgentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Agent.
+     * 
+ */ + public void getAgent( + com.google.cloud.agentregistry.v1.GetAgentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAgentMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists Endpoints in a given project and location.
+     * 
+ */ + public void listEndpoints( + com.google.cloud.agentregistry.v1.ListEndpointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEndpointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Endpoint.
+     * 
+ */ + public void getEndpoint( + com.google.cloud.agentregistry.v1.GetEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists McpServers in a given project and location.
+     * 
+ */ + public void listMcpServers( + com.google.cloud.agentregistry.v1.ListMcpServersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMcpServersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Searches McpServers in a given project and location.
+     * 
+ */ + public void searchMcpServers( + com.google.cloud.agentregistry.v1.SearchMcpServersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchMcpServersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single McpServer.
+     * 
+ */ + public void getMcpServer( + com.google.cloud.agentregistry.v1.GetMcpServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMcpServerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Services in a given project and location.
+     * 
+ */ + public void listServices( + com.google.cloud.agentregistry.v1.ListServicesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Service.
+     * 
+ */ + public void getService( + com.google.cloud.agentregistry.v1.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Service in a given project and location.
+     * 
+ */ + public void createService( + com.google.cloud.agentregistry.v1.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Service.
+     * 
+ */ + public void updateService( + com.google.cloud.agentregistry.v1.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Service.
+     * 
+ */ + public void deleteService( + com.google.cloud.agentregistry.v1.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Bindings in a given project and location.
+     * 
+ */ + public void listBindings( + com.google.cloud.agentregistry.v1.ListBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Binding.
+     * 
+ */ + public void getBinding( + com.google.cloud.agentregistry.v1.GetBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBindingMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Binding in a given project and location.
+     * 
+ */ + public void createBinding( + com.google.cloud.agentregistry.v1.CreateBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Binding.
+     * 
+ */ + public void updateBinding( + com.google.cloud.agentregistry.v1.UpdateBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Binding.
+     * 
+ */ + public void deleteBinding( + com.google.cloud.agentregistry.v1.DeleteBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Fetches available Bindings.
+     * 
+ */ + public void fetchAvailableBindings( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFetchAvailableBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AgentRegistry. + * + *
+   * Service for managing Agents, Endpoints, McpServers, Services, and Bindings.
+   * 
+ */ + public static final class AgentRegistryBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private AgentRegistryBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AgentRegistryBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Agents in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListAgentsResponse listAgents( + com.google.cloud.agentregistry.v1.ListAgentsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Searches Agents in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.SearchAgentsResponse searchAgents( + com.google.cloud.agentregistry.v1.SearchAgentsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSearchAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Agent.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Agent getAgent( + com.google.cloud.agentregistry.v1.GetAgentRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Endpoints in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListEndpointsResponse listEndpoints( + com.google.cloud.agentregistry.v1.ListEndpointsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListEndpointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Endpoint.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Endpoint getEndpoint( + com.google.cloud.agentregistry.v1.GetEndpointRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists McpServers in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListMcpServersResponse listMcpServers( + com.google.cloud.agentregistry.v1.ListMcpServersRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListMcpServersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Searches McpServers in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.SearchMcpServersResponse searchMcpServers( + com.google.cloud.agentregistry.v1.SearchMcpServersRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSearchMcpServersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single McpServer.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.McpServer getMcpServer( + com.google.cloud.agentregistry.v1.GetMcpServerRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetMcpServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Services in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListServicesResponse listServices( + com.google.cloud.agentregistry.v1.ListServicesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListServicesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Service.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Service getService( + com.google.cloud.agentregistry.v1.GetServiceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Service in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createService( + com.google.cloud.agentregistry.v1.CreateServiceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Service.
+     * 
+ */ + public com.google.longrunning.Operation updateService( + com.google.cloud.agentregistry.v1.UpdateServiceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Service.
+     * 
+ */ + public com.google.longrunning.Operation deleteService( + com.google.cloud.agentregistry.v1.DeleteServiceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Bindings in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListBindingsResponse listBindings( + com.google.cloud.agentregistry.v1.ListBindingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Binding.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Binding getBinding( + com.google.cloud.agentregistry.v1.GetBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Binding in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createBinding( + com.google.cloud.agentregistry.v1.CreateBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Binding.
+     * 
+ */ + public com.google.longrunning.Operation updateBinding( + com.google.cloud.agentregistry.v1.UpdateBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Binding.
+     * 
+ */ + public com.google.longrunning.Operation deleteBinding( + com.google.cloud.agentregistry.v1.DeleteBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetches available Bindings.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse fetchAvailableBindings( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getFetchAvailableBindingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service AgentRegistry. + * + *
+   * Service for managing Agents, Endpoints, McpServers, Services, and Bindings.
+   * 
+ */ + public static final class AgentRegistryBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AgentRegistryBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AgentRegistryBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Agents in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListAgentsResponse listAgents( + com.google.cloud.agentregistry.v1.ListAgentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Searches Agents in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.SearchAgentsResponse searchAgents( + com.google.cloud.agentregistry.v1.SearchAgentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchAgentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Agent.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Agent getAgent( + com.google.cloud.agentregistry.v1.GetAgentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAgentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Endpoints in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListEndpointsResponse listEndpoints( + com.google.cloud.agentregistry.v1.ListEndpointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEndpointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Endpoint.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Endpoint getEndpoint( + com.google.cloud.agentregistry.v1.GetEndpointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists McpServers in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListMcpServersResponse listMcpServers( + com.google.cloud.agentregistry.v1.ListMcpServersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMcpServersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Searches McpServers in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.SearchMcpServersResponse searchMcpServers( + com.google.cloud.agentregistry.v1.SearchMcpServersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchMcpServersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single McpServer.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.McpServer getMcpServer( + com.google.cloud.agentregistry.v1.GetMcpServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMcpServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Services in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListServicesResponse listServices( + com.google.cloud.agentregistry.v1.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListServicesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Service.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Service getService( + com.google.cloud.agentregistry.v1.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Service in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createService( + com.google.cloud.agentregistry.v1.CreateServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Service.
+     * 
+ */ + public com.google.longrunning.Operation updateService( + com.google.cloud.agentregistry.v1.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Service.
+     * 
+ */ + public com.google.longrunning.Operation deleteService( + com.google.cloud.agentregistry.v1.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Bindings in a given project and location.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.ListBindingsResponse listBindings( + com.google.cloud.agentregistry.v1.ListBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Binding.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.Binding getBinding( + com.google.cloud.agentregistry.v1.GetBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Binding in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createBinding( + com.google.cloud.agentregistry.v1.CreateBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Binding.
+     * 
+ */ + public com.google.longrunning.Operation updateBinding( + com.google.cloud.agentregistry.v1.UpdateBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Binding.
+     * 
+ */ + public com.google.longrunning.Operation deleteBinding( + com.google.cloud.agentregistry.v1.DeleteBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetches available Bindings.
+     * 
+ */ + public com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse fetchAvailableBindings( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchAvailableBindingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AgentRegistry. + * + *
+   * Service for managing Agents, Endpoints, McpServers, Services, and Bindings.
+   * 
+ */ + public static final class AgentRegistryFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AgentRegistryFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AgentRegistryFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AgentRegistryFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Agents in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.ListAgentsResponse> + listAgents(com.google.cloud.agentregistry.v1.ListAgentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAgentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Searches Agents in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.SearchAgentsResponse> + searchAgents(com.google.cloud.agentregistry.v1.SearchAgentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchAgentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.Agent> + getAgent(com.google.cloud.agentregistry.v1.GetAgentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAgentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Endpoints in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.ListEndpointsResponse> + listEndpoints(com.google.cloud.agentregistry.v1.ListEndpointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEndpointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Endpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.Endpoint> + getEndpoint(com.google.cloud.agentregistry.v1.GetEndpointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists McpServers in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.ListMcpServersResponse> + listMcpServers(com.google.cloud.agentregistry.v1.ListMcpServersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMcpServersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Searches McpServers in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.SearchMcpServersResponse> + searchMcpServers(com.google.cloud.agentregistry.v1.SearchMcpServersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchMcpServersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single McpServer.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.McpServer> + getMcpServer(com.google.cloud.agentregistry.v1.GetMcpServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMcpServerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Services in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.ListServicesResponse> + listServices(com.google.cloud.agentregistry.v1.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.Service> + getService(com.google.cloud.agentregistry.v1.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Service in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createService(com.google.cloud.agentregistry.v1.CreateServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateService(com.google.cloud.agentregistry.v1.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteService(com.google.cloud.agentregistry.v1.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Bindings in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.ListBindingsResponse> + listBindings(com.google.cloud.agentregistry.v1.ListBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBindingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Binding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.Binding> + getBinding(com.google.cloud.agentregistry.v1.GetBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Binding in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createBinding(com.google.cloud.agentregistry.v1.CreateBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Binding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBinding(com.google.cloud.agentregistry.v1.UpdateBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Binding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBinding(com.google.cloud.agentregistry.v1.DeleteBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetches available Bindings.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse> + fetchAvailableBindings( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFetchAvailableBindingsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_AGENTS = 0; + private static final int METHODID_SEARCH_AGENTS = 1; + private static final int METHODID_GET_AGENT = 2; + private static final int METHODID_LIST_ENDPOINTS = 3; + private static final int METHODID_GET_ENDPOINT = 4; + private static final int METHODID_LIST_MCP_SERVERS = 5; + private static final int METHODID_SEARCH_MCP_SERVERS = 6; + private static final int METHODID_GET_MCP_SERVER = 7; + private static final int METHODID_LIST_SERVICES = 8; + private static final int METHODID_GET_SERVICE = 9; + private static final int METHODID_CREATE_SERVICE = 10; + private static final int METHODID_UPDATE_SERVICE = 11; + private static final int METHODID_DELETE_SERVICE = 12; + private static final int METHODID_LIST_BINDINGS = 13; + private static final int METHODID_GET_BINDING = 14; + private static final int METHODID_CREATE_BINDING = 15; + private static final int METHODID_UPDATE_BINDING = 16; + private static final int METHODID_DELETE_BINDING = 17; + private static final int METHODID_FETCH_AVAILABLE_BINDINGS = 18; + + 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_LIST_AGENTS: + serviceImpl.listAgents( + (com.google.cloud.agentregistry.v1.ListAgentsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_AGENTS: + serviceImpl.searchAgents( + (com.google.cloud.agentregistry.v1.SearchAgentsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_AGENT: + serviceImpl.getAgent( + (com.google.cloud.agentregistry.v1.GetAgentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ENDPOINTS: + serviceImpl.listEndpoints( + (com.google.cloud.agentregistry.v1.ListEndpointsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ENDPOINT: + serviceImpl.getEndpoint( + (com.google.cloud.agentregistry.v1.GetEndpointRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_MCP_SERVERS: + serviceImpl.listMcpServers( + (com.google.cloud.agentregistry.v1.ListMcpServersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.agentregistry.v1.ListMcpServersResponse>) + responseObserver); + break; + case METHODID_SEARCH_MCP_SERVERS: + serviceImpl.searchMcpServers( + (com.google.cloud.agentregistry.v1.SearchMcpServersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.agentregistry.v1.SearchMcpServersResponse>) + responseObserver); + break; + case METHODID_GET_MCP_SERVER: + serviceImpl.getMcpServer( + (com.google.cloud.agentregistry.v1.GetMcpServerRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_SERVICES: + serviceImpl.listServices( + (com.google.cloud.agentregistry.v1.ListServicesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SERVICE: + serviceImpl.getService( + (com.google.cloud.agentregistry.v1.GetServiceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_SERVICE: + serviceImpl.createService( + (com.google.cloud.agentregistry.v1.CreateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SERVICE: + serviceImpl.updateService( + (com.google.cloud.agentregistry.v1.UpdateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SERVICE: + serviceImpl.deleteService( + (com.google.cloud.agentregistry.v1.DeleteServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_BINDINGS: + serviceImpl.listBindings( + (com.google.cloud.agentregistry.v1.ListBindingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_BINDING: + serviceImpl.getBinding( + (com.google.cloud.agentregistry.v1.GetBindingRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_BINDING: + serviceImpl.createBinding( + (com.google.cloud.agentregistry.v1.CreateBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_BINDING: + serviceImpl.updateBinding( + (com.google.cloud.agentregistry.v1.UpdateBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_BINDING: + serviceImpl.deleteBinding( + (com.google.cloud.agentregistry.v1.DeleteBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FETCH_AVAILABLE_BINDINGS: + serviceImpl.fetchAvailableBindings( + (com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse>) + 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( + getListAgentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.ListAgentsRequest, + com.google.cloud.agentregistry.v1.ListAgentsResponse>( + service, METHODID_LIST_AGENTS))) + .addMethod( + getSearchAgentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.SearchAgentsRequest, + com.google.cloud.agentregistry.v1.SearchAgentsResponse>( + service, METHODID_SEARCH_AGENTS))) + .addMethod( + getGetAgentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.GetAgentRequest, + com.google.cloud.agentregistry.v1.Agent>(service, METHODID_GET_AGENT))) + .addMethod( + getListEndpointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.ListEndpointsRequest, + com.google.cloud.agentregistry.v1.ListEndpointsResponse>( + service, METHODID_LIST_ENDPOINTS))) + .addMethod( + getGetEndpointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.GetEndpointRequest, + com.google.cloud.agentregistry.v1.Endpoint>(service, METHODID_GET_ENDPOINT))) + .addMethod( + getListMcpServersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.ListMcpServersRequest, + com.google.cloud.agentregistry.v1.ListMcpServersResponse>( + service, METHODID_LIST_MCP_SERVERS))) + .addMethod( + getSearchMcpServersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.SearchMcpServersRequest, + com.google.cloud.agentregistry.v1.SearchMcpServersResponse>( + service, METHODID_SEARCH_MCP_SERVERS))) + .addMethod( + getGetMcpServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.GetMcpServerRequest, + com.google.cloud.agentregistry.v1.McpServer>(service, METHODID_GET_MCP_SERVER))) + .addMethod( + getListServicesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.ListServicesRequest, + com.google.cloud.agentregistry.v1.ListServicesResponse>( + service, METHODID_LIST_SERVICES))) + .addMethod( + getGetServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.GetServiceRequest, + com.google.cloud.agentregistry.v1.Service>(service, METHODID_GET_SERVICE))) + .addMethod( + getCreateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.CreateServiceRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_SERVICE))) + .addMethod( + getUpdateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.UpdateServiceRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SERVICE))) + .addMethod( + getDeleteServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.DeleteServiceRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_SERVICE))) + .addMethod( + getListBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.ListBindingsRequest, + com.google.cloud.agentregistry.v1.ListBindingsResponse>( + service, METHODID_LIST_BINDINGS))) + .addMethod( + getGetBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.GetBindingRequest, + com.google.cloud.agentregistry.v1.Binding>(service, METHODID_GET_BINDING))) + .addMethod( + getCreateBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.CreateBindingRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_BINDING))) + .addMethod( + getUpdateBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.UpdateBindingRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_BINDING))) + .addMethod( + getDeleteBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.DeleteBindingRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_BINDING))) + .addMethod( + getFetchAvailableBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest, + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse>( + service, METHODID_FETCH_AVAILABLE_BINDINGS))) + .build(); + } + + private abstract static class AgentRegistryBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AgentRegistryBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AgentRegistry"); + } + } + + private static final class AgentRegistryFileDescriptorSupplier + extends AgentRegistryBaseDescriptorSupplier { + AgentRegistryFileDescriptorSupplier() {} + } + + private static final class AgentRegistryMethodDescriptorSupplier + extends AgentRegistryBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AgentRegistryMethodDescriptorSupplier(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 (AgentRegistryGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AgentRegistryFileDescriptorSupplier()) + .addMethod(getListAgentsMethod()) + .addMethod(getSearchAgentsMethod()) + .addMethod(getGetAgentMethod()) + .addMethod(getListEndpointsMethod()) + .addMethod(getGetEndpointMethod()) + .addMethod(getListMcpServersMethod()) + .addMethod(getSearchMcpServersMethod()) + .addMethod(getGetMcpServerMethod()) + .addMethod(getListServicesMethod()) + .addMethod(getGetServiceMethod()) + .addMethod(getCreateServiceMethod()) + .addMethod(getUpdateServiceMethod()) + .addMethod(getDeleteServiceMethod()) + .addMethod(getListBindingsMethod()) + .addMethod(getGetBindingMethod()) + .addMethod(getCreateBindingMethod()) + .addMethod(getUpdateBindingMethod()) + .addMethod(getDeleteBindingMethod()) + .addMethod(getFetchAvailableBindingsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-agentregistry/owlbot.py b/java-agentregistry/owlbot.py new file mode 100755 index 000000000000..5caf2fc427bc --- /dev/null +++ b/java-agentregistry/owlbot.py @@ -0,0 +1,38 @@ +# 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. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates( + monorepo=True, + excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) diff --git a/java-agentregistry/pom.xml b/java-agentregistry/pom.xml new file mode 100644 index 000000000000..01e5dcc950fe --- /dev/null +++ b/java-agentregistry/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + com.google.cloud + google-cloud-agentregistry-parent + pom + 0.1.0-SNAPSHOT + Google Agent Registry Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.88.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-agentregistry-parent + + + + + + + com.google.cloud + google-cloud-agentregistry + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-agentregistry-v1 + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-agentregistry-v1 + 0.1.0-SNAPSHOT + + + + + + + + google-cloud-agentregistry + grpc-google-cloud-agentregistry-v1 + proto-google-cloud-agentregistry-v1 + + google-cloud-agentregistry-bom + + + \ No newline at end of file diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/clirr-ignored-differences.xml b/java-agentregistry/proto-google-cloud-agentregistry-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..bc96e829d313 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/agentregistry/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/agentregistry/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/agentregistry/v1/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/agentregistry/v1/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/agentregistry/v1/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/agentregistry/v1/** + * clear() + ** + + + 7006 + com/google/cloud/agentregistry/v1/** + * clearField(*) + ** + + + 7006 + com/google/cloud/agentregistry/v1/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/agentregistry/v1/** + * clone() + ** + + + 7006 + com/google/cloud/agentregistry/v1/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/agentregistry/v1/** + * setField(*) + ** + + + 7006 + com/google/cloud/agentregistry/v1/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/agentregistry/v1/** + * setUnknownFields(*) + ** + + diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/pom.xml b/java-agentregistry/proto-google-cloud-agentregistry-v1/pom.xml new file mode 100644 index 000000000000..fa40efa41952 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-agentregistry-v1 + 0.1.0-SNAPSHOT + proto-google-cloud-agentregistry-v1 + Proto library for google-cloud-agentregistry + + com.google.cloud + google-cloud-agentregistry-parent + 0.1.0-SNAPSHOT + + + + 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 + + + diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Agent.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Agent.java new file mode 100644 index 000000000000..7e9e35459b26 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Agent.java @@ -0,0 +1,8826 @@ +/* + * 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/agentregistry/v1/agent.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Represents an Agent.
+ * "A2A" below refers to the Agent-to-Agent protocol.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Agent} + */ +@com.google.protobuf.Generated +public final class Agent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Agent) + AgentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Agent"); + } + + // Use Agent.newBuilder() to construct. + private Agent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Agent() { + name_ = ""; + agentId_ = ""; + location_ = ""; + displayName_ = ""; + description_ = ""; + version_ = ""; + protocols_ = java.util.Collections.emptyList(); + skills_ = java.util.Collections.emptyList(); + uid_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 13: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Agent.class, + com.google.cloud.agentregistry.v1.Agent.Builder.class); + } + + public interface ProtocolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Agent.Protocol) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The type of the protocol.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Protocol.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+     * Output only. The type of the protocol.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Protocol.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.cloud.agentregistry.v1.Agent.Protocol.Type getType(); + + /** + * + * + *
+     * Output only. The version of the protocol, for example, the A2A Agent Card
+     * version.
+     * 
+ * + * string protocol_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The protocolVersion. + */ + java.lang.String getProtocolVersion(); + + /** + * + * + *
+     * Output only. The version of the protocol, for example, the A2A Agent Card
+     * version.
+     * 
+ * + * string protocol_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for protocolVersion. + */ + com.google.protobuf.ByteString getProtocolVersionBytes(); + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getInterfacesList(); + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.Interface getInterfaces(int index); + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getInterfacesCount(); + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getInterfacesOrBuilderList(); + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index); + } + + /** + * + * + *
+   * Represents the protocol of an Agent.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Agent.Protocol} + */ + public static final class Protocol extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Agent.Protocol) + ProtocolOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Protocol"); + } + + // Use Protocol.newBuilder() to construct. + private Protocol(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Protocol() { + type_ = 0; + protocolVersion_ = ""; + interfaces_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Protocol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Protocol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Agent.Protocol.class, + com.google.cloud.agentregistry.v1.Agent.Protocol.Builder.class); + } + + /** + * + * + *
+     * The type of the protocol.
+     * 
+ * + * Protobuf enum {@code google.cloud.agentregistry.v1.Agent.Protocol.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * The interfaces point to an A2A Agent following the A2A
+       * specification.
+       * 
+ * + * A2A_AGENT = 1; + */ + A2A_AGENT(1), + /** + * + * + *
+       * Agent does not follow any standard protocol.
+       * 
+ * + * CUSTOM = 2; + */ + CUSTOM(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The interfaces point to an A2A Agent following the A2A
+       * specification.
+       * 
+ * + * A2A_AGENT = 1; + */ + public static final int A2A_AGENT_VALUE = 1; + + /** + * + * + *
+       * Agent does not follow any standard protocol.
+       * 
+ * + * CUSTOM = 2; + */ + public static final int CUSTOM_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return A2A_AGENT; + case 2: + return CUSTOM; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.Agent.Protocol.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.agentregistry.v1.Agent.Protocol.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+     * Output only. The type of the protocol.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Protocol.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Output only. The type of the protocol.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Protocol.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Protocol.Type getType() { + com.google.cloud.agentregistry.v1.Agent.Protocol.Type result = + com.google.cloud.agentregistry.v1.Agent.Protocol.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Agent.Protocol.Type.UNRECOGNIZED + : result; + } + + public static final int PROTOCOL_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object protocolVersion_ = ""; + + /** + * + * + *
+     * Output only. The version of the protocol, for example, the A2A Agent Card
+     * version.
+     * 
+ * + * string protocol_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The protocolVersion. + */ + @java.lang.Override + public java.lang.String getProtocolVersion() { + java.lang.Object ref = protocolVersion_; + 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(); + protocolVersion_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The version of the protocol, for example, the A2A Agent Card
+     * version.
+     * 
+ * + * string protocol_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for protocolVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolVersionBytes() { + java.lang.Object ref = protocolVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocolVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List interfaces_; + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getInterfacesList() { + return interfaces_; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getInterfacesOrBuilderList() { + return interfaces_; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getInterfacesCount() { + return interfaces_.size(); + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Interface getInterfaces(int index) { + return interfaces_.get(index); + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index) { + return interfaces_.get(index); + } + + 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 (type_ + != com.google.cloud.agentregistry.v1.Agent.Protocol.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocolVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, protocolVersion_); + } + for (int i = 0; i < interfaces_.size(); i++) { + output.writeMessage(3, interfaces_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.agentregistry.v1.Agent.Protocol.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocolVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, protocolVersion_); + } + for (int i = 0; i < interfaces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, interfaces_.get(i)); + } + 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.agentregistry.v1.Agent.Protocol)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Agent.Protocol other = + (com.google.cloud.agentregistry.v1.Agent.Protocol) obj; + + if (type_ != other.type_) return false; + if (!getProtocolVersion().equals(other.getProtocolVersion())) return false; + if (!getInterfacesList().equals(other.getInterfacesList())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + PROTOCOL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getProtocolVersion().hashCode(); + if (getInterfacesCount() > 0) { + hash = (37 * hash) + INTERFACES_FIELD_NUMBER; + hash = (53 * hash) + getInterfacesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Agent.Protocol parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent.Protocol 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.agentregistry.v1.Agent.Protocol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent.Protocol 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.agentregistry.v1.Agent.Protocol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent.Protocol parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Agent.Protocol parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent.Protocol 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.agentregistry.v1.Agent.Protocol parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent.Protocol 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.agentregistry.v1.Agent.Protocol parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent.Protocol 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.agentregistry.v1.Agent.Protocol 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; + } + + /** + * + * + *
+     * Represents the protocol of an Agent.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Agent.Protocol} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Agent.Protocol) + com.google.cloud.agentregistry.v1.Agent.ProtocolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Protocol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Protocol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Agent.Protocol.class, + com.google.cloud.agentregistry.v1.Agent.Protocol.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Agent.Protocol.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + protocolVersion_ = ""; + if (interfacesBuilder_ == null) { + interfaces_ = java.util.Collections.emptyList(); + } else { + interfaces_ = null; + interfacesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Protocol_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Protocol getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Agent.Protocol.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Protocol build() { + com.google.cloud.agentregistry.v1.Agent.Protocol result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Protocol buildPartial() { + com.google.cloud.agentregistry.v1.Agent.Protocol result = + new com.google.cloud.agentregistry.v1.Agent.Protocol(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistry.v1.Agent.Protocol result) { + if (interfacesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + interfaces_ = java.util.Collections.unmodifiableList(interfaces_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.interfaces_ = interfaces_; + } else { + result.interfaces_ = interfacesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Agent.Protocol result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.protocolVersion_ = protocolVersion_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Agent.Protocol) { + return mergeFrom((com.google.cloud.agentregistry.v1.Agent.Protocol) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Agent.Protocol other) { + if (other == com.google.cloud.agentregistry.v1.Agent.Protocol.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getProtocolVersion().isEmpty()) { + protocolVersion_ = other.protocolVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (interfacesBuilder_ == null) { + if (!other.interfaces_.isEmpty()) { + if (interfaces_.isEmpty()) { + interfaces_ = other.interfaces_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureInterfacesIsMutable(); + interfaces_.addAll(other.interfaces_); + } + onChanged(); + } + } else { + if (!other.interfaces_.isEmpty()) { + if (interfacesBuilder_.isEmpty()) { + interfacesBuilder_.dispose(); + interfacesBuilder_ = null; + interfaces_ = other.interfaces_; + bitField0_ = (bitField0_ & ~0x00000004); + interfacesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInterfacesFieldBuilder() + : null; + } else { + interfacesBuilder_.addAllMessages(other.interfaces_); + } + } + } + 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 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + protocolVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.agentregistry.v1.Interface m = + input.readMessage( + com.google.cloud.agentregistry.v1.Interface.parser(), extensionRegistry); + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(m); + } else { + interfacesBuilder_.addMessage(m); + } + 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 int type_ = 0; + + /** + * + * + *
+       * Output only. The type of the protocol.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Protocol.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+       * Output only. The type of the protocol.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Protocol.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The type of the protocol.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Protocol.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Protocol.Type getType() { + com.google.cloud.agentregistry.v1.Agent.Protocol.Type result = + com.google.cloud.agentregistry.v1.Agent.Protocol.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Agent.Protocol.Type.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The type of the protocol.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Protocol.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.agentregistry.v1.Agent.Protocol.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The type of the protocol.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Protocol.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object protocolVersion_ = ""; + + /** + * + * + *
+       * Output only. The version of the protocol, for example, the A2A Agent Card
+       * version.
+       * 
+ * + * string protocol_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The protocolVersion. + */ + public java.lang.String getProtocolVersion() { + java.lang.Object ref = protocolVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocolVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The version of the protocol, for example, the A2A Agent Card
+       * version.
+       * 
+ * + * string protocol_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for protocolVersion. + */ + public com.google.protobuf.ByteString getProtocolVersionBytes() { + java.lang.Object ref = protocolVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocolVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The version of the protocol, for example, the A2A Agent Card
+       * version.
+       * 
+ * + * string protocol_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The protocolVersion to set. + * @return This builder for chaining. + */ + public Builder setProtocolVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + protocolVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The version of the protocol, for example, the A2A Agent Card
+       * version.
+       * 
+ * + * string protocol_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProtocolVersion() { + protocolVersion_ = getDefaultInstance().getProtocolVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The version of the protocol, for example, the A2A Agent Card
+       * version.
+       * 
+ * + * string protocol_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for protocolVersion to set. + * @return This builder for chaining. + */ + public Builder setProtocolVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + protocolVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List interfaces_ = + java.util.Collections.emptyList(); + + private void ensureInterfacesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + interfaces_ = + new java.util.ArrayList(interfaces_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder> + interfacesBuilder_; + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getInterfacesList() { + if (interfacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(interfaces_); + } else { + return interfacesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getInterfacesCount() { + if (interfacesBuilder_ == null) { + return interfaces_.size(); + } else { + return interfacesBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Interface getInterfaces(int index) { + if (interfacesBuilder_ == null) { + return interfaces_.get(index); + } else { + return interfacesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInterfaces(int index, com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.set(index, value); + onChanged(); + } else { + interfacesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInterfaces( + int index, com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.set(index, builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInterfaces(com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.add(value); + onChanged(); + } else { + interfacesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInterfaces(int index, com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.add(index, value); + onChanged(); + } else { + interfacesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInterfaces( + com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInterfaces( + int index, com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(index, builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllInterfaces( + java.lang.Iterable values) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, interfaces_); + onChanged(); + } else { + interfacesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInterfaces() { + if (interfacesBuilder_ == null) { + interfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + interfacesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeInterfaces(int index) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.remove(index); + onChanged(); + } else { + interfacesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder getInterfacesBuilder(int index) { + return internalGetInterfacesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder( + int index) { + if (interfacesBuilder_ == null) { + return interfaces_.get(index); + } else { + return interfacesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getInterfacesOrBuilderList() { + if (interfacesBuilder_ != null) { + return interfacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(interfaces_); + } + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder addInterfacesBuilder() { + return internalGetInterfacesFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Interface.getDefaultInstance()); + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder addInterfacesBuilder(int index) { + return internalGetInterfacesFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Interface.getDefaultInstance()); + } + + /** + * + * + *
+       * Output only. The connection details for the Agent.
+       * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getInterfacesBuilderList() { + return internalGetInterfacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder> + internalGetInterfacesFieldBuilder() { + if (interfacesBuilder_ == null) { + interfacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder>( + interfaces_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + interfaces_ = null; + } + return interfacesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Agent.Protocol) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Agent.Protocol) + private static final com.google.cloud.agentregistry.v1.Agent.Protocol DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Agent.Protocol(); + } + + public static com.google.cloud.agentregistry.v1.Agent.Protocol getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Protocol 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.agentregistry.v1.Agent.Protocol getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SkillOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Agent.Skill) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. A unique identifier for the agent's skill.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + + /** + * + * + *
+     * Output only. A unique identifier for the agent's skill.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * Output only. A human-readable name for the agent's skill.
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+     * Output only. A human-readable name for the agent's skill.
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Output only. A more detailed description of the skill.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+     * Output only. A more detailed description of the skill.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Output only. Keywords describing the skill.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + + /** + * + * + *
+     * Output only. Keywords describing the skill.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of tags. + */ + int getTagsCount(); + + /** + * + * + *
+     * Output only. Keywords describing the skill.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + + /** + * + * + *
+     * Output only. Keywords describing the skill.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString getTagsBytes(int index); + + /** + * + * + *
+     * Output only. Example prompts or scenarios this skill can handle.
+     * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the examples. + */ + java.util.List getExamplesList(); + + /** + * + * + *
+     * Output only. Example prompts or scenarios this skill can handle.
+     * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of examples. + */ + int getExamplesCount(); + + /** + * + * + *
+     * Output only. Example prompts or scenarios this skill can handle.
+     * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The examples at the given index. + */ + java.lang.String getExamples(int index); + + /** + * + * + *
+     * Output only. Example prompts or scenarios this skill can handle.
+     * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the examples at the given index. + */ + com.google.protobuf.ByteString getExamplesBytes(int index); + } + + /** + * + * + *
+   * Represents the skills of an Agent.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Agent.Skill} + */ + public static final class Skill extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Agent.Skill) + SkillOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Skill"); + } + + // Use Skill.newBuilder() to construct. + private Skill(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Skill() { + id_ = ""; + name_ = ""; + description_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + examples_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Skill_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Skill_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Agent.Skill.class, + com.google.cloud.agentregistry.v1.Agent.Skill.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + + /** + * + * + *
+     * Output only. A unique identifier for the agent's skill.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. A unique identifier for the agent's skill.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+     * Output only. A human-readable name for the agent's skill.
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. A human-readable name for the agent's skill.
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+     * Output only. A more detailed description of the skill.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. A more detailed description of the skill.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAGS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Output only. Keywords describing the skill.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + + /** + * + * + *
+     * Output only. Keywords describing the skill.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+     * Output only. Keywords describing the skill.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + + /** + * + * + *
+     * Output only. Keywords describing the skill.
+     * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int EXAMPLES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList examples_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Output only. Example prompts or scenarios this skill can handle.
+     * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the examples. + */ + public com.google.protobuf.ProtocolStringList getExamplesList() { + return examples_; + } + + /** + * + * + *
+     * Output only. Example prompts or scenarios this skill can handle.
+     * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of examples. + */ + public int getExamplesCount() { + return examples_.size(); + } + + /** + * + * + *
+     * Output only. Example prompts or scenarios this skill can handle.
+     * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The examples at the given index. + */ + public java.lang.String getExamples(int index) { + return examples_.get(index); + } + + /** + * + * + *
+     * Output only. Example prompts or scenarios this skill can handle.
+     * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the examples at the given index. + */ + public com.google.protobuf.ByteString getExamplesBytes(int index) { + return examples_.getByteString(index); + } + + 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(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, tags_.getRaw(i)); + } + for (int i = 0; i < examples_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, examples_.getRaw(i)); + } + 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(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < examples_.size(); i++) { + dataSize += computeStringSizeNoTag(examples_.getRaw(i)); + } + size += dataSize; + size += 1 * getExamplesList().size(); + } + 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.agentregistry.v1.Agent.Skill)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Agent.Skill other = + (com.google.cloud.agentregistry.v1.Agent.Skill) obj; + + if (!getId().equals(other.getId())) return false; + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (!getExamplesList().equals(other.getExamplesList())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (getExamplesCount() > 0) { + hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getExamplesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Agent.Skill parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent.Skill 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.agentregistry.v1.Agent.Skill parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent.Skill 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.agentregistry.v1.Agent.Skill parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent.Skill parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Agent.Skill parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent.Skill 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.agentregistry.v1.Agent.Skill parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent.Skill 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.agentregistry.v1.Agent.Skill parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent.Skill 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.agentregistry.v1.Agent.Skill 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; + } + + /** + * + * + *
+     * Represents the skills of an Agent.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Agent.Skill} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Agent.Skill) + com.google.cloud.agentregistry.v1.Agent.SkillOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Skill_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Skill_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Agent.Skill.class, + com.google.cloud.agentregistry.v1.Agent.Skill.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Agent.Skill.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + name_ = ""; + description_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + examples_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Skill_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Skill getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Agent.Skill.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Skill build() { + com.google.cloud.agentregistry.v1.Agent.Skill result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Skill buildPartial() { + com.google.cloud.agentregistry.v1.Agent.Skill result = + new com.google.cloud.agentregistry.v1.Agent.Skill(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Agent.Skill result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + tags_.makeImmutable(); + result.tags_ = tags_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + examples_.makeImmutable(); + result.examples_ = examples_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Agent.Skill) { + return mergeFrom((com.google.cloud.agentregistry.v1.Agent.Skill) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Agent.Skill other) { + if (other == com.google.cloud.agentregistry.v1.Agent.Skill.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ |= 0x00000008; + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (!other.examples_.isEmpty()) { + if (examples_.isEmpty()) { + examples_ = other.examples_; + bitField0_ |= 0x00000010; + } else { + ensureExamplesIsMutable(); + examples_.addAll(other.examples_); + } + 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: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExamplesIsMutable(); + examples_.add(s); + break; + } // case 42 + 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 id_ = ""; + + /** + * + * + *
+       * Output only. A unique identifier for the agent's skill.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. A unique identifier for the agent's skill.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. A unique identifier for the agent's skill.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A unique identifier for the agent's skill.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A unique identifier for the agent's skill.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+       * Output only. A human-readable name for the agent's skill.
+       * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+       * Output only. A human-readable name for the agent's skill.
+       * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+       * Output only. A human-readable name for the agent's skill.
+       * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A human-readable name for the agent's skill.
+       * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A human-readable name for the agent's skill.
+       * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+       * Output only. A more detailed description of the skill.
+       * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. A more detailed description of the skill.
+       * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. A more detailed description of the skill.
+       * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A more detailed description of the skill.
+       * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A more detailed description of the skill.
+       * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTagsIsMutable() { + if (!tags_.isModifiable()) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+       * Output only. Keywords describing the skill.
+       * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + tags_.makeImmutable(); + return tags_; + } + + /** + * + * + *
+       * Output only. Keywords describing the skill.
+       * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+       * Output only. Keywords describing the skill.
+       * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + + /** + * + * + *
+       * Output only. Keywords describing the skill.
+       * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + /** + * + * + *
+       * Output only. Keywords describing the skill.
+       * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Keywords describing the skill.
+       * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Keywords describing the skill.
+       * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags(java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Keywords describing the skill.
+       * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Keywords describing the skill.
+       * 
+ * + * repeated string tags = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList examples_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExamplesIsMutable() { + if (!examples_.isModifiable()) { + examples_ = new com.google.protobuf.LazyStringArrayList(examples_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+       * Output only. Example prompts or scenarios this skill can handle.
+       * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the examples. + */ + public com.google.protobuf.ProtocolStringList getExamplesList() { + examples_.makeImmutable(); + return examples_; + } + + /** + * + * + *
+       * Output only. Example prompts or scenarios this skill can handle.
+       * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of examples. + */ + public int getExamplesCount() { + return examples_.size(); + } + + /** + * + * + *
+       * Output only. Example prompts or scenarios this skill can handle.
+       * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The examples at the given index. + */ + public java.lang.String getExamples(int index) { + return examples_.get(index); + } + + /** + * + * + *
+       * Output only. Example prompts or scenarios this skill can handle.
+       * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the examples at the given index. + */ + public com.google.protobuf.ByteString getExamplesBytes(int index) { + return examples_.getByteString(index); + } + + /** + * + * + *
+       * Output only. Example prompts or scenarios this skill can handle.
+       * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The examples to set. + * @return This builder for chaining. + */ + public Builder setExamples(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Example prompts or scenarios this skill can handle.
+       * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The examples to add. + * @return This builder for chaining. + */ + public Builder addExamples(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Example prompts or scenarios this skill can handle.
+       * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The examples to add. + * @return This builder for chaining. + */ + public Builder addAllExamples(java.lang.Iterable values) { + ensureExamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, examples_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Example prompts or scenarios this skill can handle.
+       * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearExamples() { + examples_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Example prompts or scenarios this skill can handle.
+       * 
+ * + * repeated string examples = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the examples to add. + * @return This builder for chaining. + */ + public Builder addExamplesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExamplesIsMutable(); + examples_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Agent.Skill) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Agent.Skill) + private static final com.google.cloud.agentregistry.v1.Agent.Skill DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Agent.Skill(); + } + + public static com.google.cloud.agentregistry.v1.Agent.Skill getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Skill 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.agentregistry.v1.Agent.Skill getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CardOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Agent.Card) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The type of agent card.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+     * Output only. The type of agent card.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.cloud.agentregistry.v1.Agent.Card.Type getType(); + + /** + * + * + *
+     * Output only. The content of the agent card.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the content field is set. + */ + boolean hasContent(); + + /** + * + * + *
+     * Output only. The content of the agent card.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The content. + */ + com.google.protobuf.Struct getContent(); + + /** + * + * + *
+     * Output only. The content of the agent card.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.StructOrBuilder getContentOrBuilder(); + } + + /** + * + * + *
+   * Full Agent Card payload, often obtained from the A2A Agent Card.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Agent.Card} + */ + public static final class Card extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Agent.Card) + CardOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Card"); + } + + // Use Card.newBuilder() to construct. + private Card(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Card() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Card_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Card_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Agent.Card.class, + com.google.cloud.agentregistry.v1.Agent.Card.Builder.class); + } + + /** + * + * + *
+     * Represents the type of the agent card.
+     * 
+ * + * Protobuf enum {@code google.cloud.agentregistry.v1.Agent.Card.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Indicates that the card is an A2A Agent Card.
+       * 
+ * + * A2A_AGENT_CARD = 1; + */ + A2A_AGENT_CARD(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Indicates that the card is an A2A Agent Card.
+       * 
+ * + * A2A_AGENT_CARD = 1; + */ + public static final int A2A_AGENT_CARD_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return A2A_AGENT_CARD; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.Agent.Card.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.agentregistry.v1.Agent.Card.Type) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+     * Output only. The type of agent card.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Output only. The type of agent card.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Card.Type getType() { + com.google.cloud.agentregistry.v1.Agent.Card.Type result = + com.google.cloud.agentregistry.v1.Agent.Card.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Agent.Card.Type.UNRECOGNIZED + : result; + } + + public static final int CONTENT_FIELD_NUMBER = 2; + private com.google.protobuf.Struct content_; + + /** + * + * + *
+     * Output only. The content of the agent card.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The content of the agent card.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.Struct getContent() { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + + /** + * + * + *
+     * Output only. The content of the agent card.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getContentOrBuilder() { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + + 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 (type_ != com.google.cloud.agentregistry.v1.Agent.Card.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getContent()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.agentregistry.v1.Agent.Card.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContent()); + } + 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.agentregistry.v1.Agent.Card)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Agent.Card other = + (com.google.cloud.agentregistry.v1.Agent.Card) obj; + + if (type_ != other.type_) return false; + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent().equals(other.getContent())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Agent.Card parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent.Card 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.agentregistry.v1.Agent.Card parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent.Card 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.agentregistry.v1.Agent.Card parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent.Card parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Agent.Card parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent.Card 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.agentregistry.v1.Agent.Card parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent.Card 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.agentregistry.v1.Agent.Card parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent.Card 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.agentregistry.v1.Agent.Card 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; + } + + /** + * + * + *
+     * Full Agent Card payload, often obtained from the A2A Agent Card.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Agent.Card} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Agent.Card) + com.google.cloud.agentregistry.v1.Agent.CardOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Card_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Card_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Agent.Card.class, + com.google.cloud.agentregistry.v1.Agent.Card.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Agent.Card.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetContentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_Card_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Card getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Agent.Card.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Card build() { + com.google.cloud.agentregistry.v1.Agent.Card result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Card buildPartial() { + com.google.cloud.agentregistry.v1.Agent.Card result = + new com.google.cloud.agentregistry.v1.Agent.Card(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Agent.Card result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = contentBuilder_ == null ? content_ : contentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Agent.Card) { + return mergeFrom((com.google.cloud.agentregistry.v1.Agent.Card) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Agent.Card other) { + if (other == com.google.cloud.agentregistry.v1.Agent.Card.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasContent()) { + mergeContent(other.getContent()); + } + 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 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetContentFieldBuilder().getBuilder(), extensionRegistry); + 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 int type_ = 0; + + /** + * + * + *
+       * Output only. The type of agent card.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+       * Output only. The type of agent card.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The type of agent card.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Card.Type getType() { + com.google.cloud.agentregistry.v1.Agent.Card.Type result = + com.google.cloud.agentregistry.v1.Agent.Card.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Agent.Card.Type.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The type of agent card.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.agentregistry.v1.Agent.Card.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The type of agent card.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Struct content_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + contentBuilder_; + + /** + * + * + *
+       * Output only. The content of the agent card.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Output only. The content of the agent card.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The content. + */ + public com.google.protobuf.Struct getContent() { + if (contentBuilder_ == null) { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } else { + return contentBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Output only. The content of the agent card.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setContent(com.google.protobuf.Struct value) { + if (contentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + } else { + contentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The content of the agent card.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setContent(com.google.protobuf.Struct.Builder builderForValue) { + if (contentBuilder_ == null) { + content_ = builderForValue.build(); + } else { + contentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The content of the agent card.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeContent(com.google.protobuf.Struct value) { + if (contentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && content_ != null + && content_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContentBuilder().mergeFrom(value); + } else { + content_ = value; + } + } else { + contentBuilder_.mergeFrom(value); + } + if (content_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. The content of the agent card.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000002); + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The content of the agent card.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Struct.Builder getContentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetContentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. The content of the agent card.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.StructOrBuilder getContentOrBuilder() { + if (contentBuilder_ != null) { + return contentBuilder_.getMessageOrBuilder(); + } else { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + } + + /** + * + * + *
+       * Output only. The content of the agent card.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetContentFieldBuilder() { + if (contentBuilder_ == null) { + contentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getContent(), getParentForChildren(), isClean()); + content_ = null; + } + return contentBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Agent.Card) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Agent.Card) + private static final com.google.cloud.agentregistry.v1.Agent.Card DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Agent.Card(); + } + + public static com.google.cloud.agentregistry.v1.Agent.Card getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Card 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.agentregistry.v1.Agent.Card getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of an Agent.
+   * Format: `projects/{project}/locations/{location}/agents/{agent}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+   * Identifier. The resource name of an Agent.
+   * Format: `projects/{project}/locations/{location}/agents/{agent}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + public static final int AGENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object agentId_ = ""; + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for agents.
+   * 
+ * + * string agent_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The agentId. + */ + @java.lang.Override + public java.lang.String getAgentId() { + java.lang.Object ref = agentId_; + 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(); + agentId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for agents.
+   * 
+ * + * string agent_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for agentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentIdBytes() { + java.lang.Object ref = agentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
+   * Output only. The location where agent is hosted. The value is defined by
+   * the hosting environment (i.e. cloud provider).
+   * 
+ * + * string location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The location where agent is hosted. The value is defined by
+   * the hosting environment (i.e. cloud provider).
+   * 
+ * + * string location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Output only. The display name of the agent, often obtained from the A2A
+   * Agent Card.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The display name of the agent, often obtained from the A2A
+   * Agent Card.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Output only. The description of the Agent, often obtained from the A2A
+   * Agent Card. Empty if Agent Card has no description.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The description of the Agent, often obtained from the A2A
+   * Agent Card. Empty if Agent Card has no description.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + + /** + * + * + *
+   * Output only. The version of the Agent, often obtained from the A2A Agent
+   * Card. Empty if Agent Card has no version or agent is not an A2A Agent.
+   * 
+ * + * string version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The version of the Agent, often obtained from the A2A Agent
+   * Card. Empty if Agent Card has no version or agent is not an A2A Agent.
+   * 
+ * + * string version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOLS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List protocols_; + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getProtocolsList() { + return protocols_; + } + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getProtocolsOrBuilderList() { + return protocols_; + } + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getProtocolsCount() { + return protocols_.size(); + } + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Protocol getProtocols(int index) { + return protocols_.get(index); + } + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.ProtocolOrBuilder getProtocolsOrBuilder( + int index) { + return protocols_.get(index); + } + + public static final int SKILLS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List skills_; + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getSkillsList() { + return skills_; + } + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSkillsOrBuilderList() { + return skills_; + } + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSkillsCount() { + return skills_.size(); + } + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Skill getSkills(int index) { + return skills_.get(index); + } + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.SkillOrBuilder getSkillsOrBuilder(int index) { + return skills_.get(index); + } + + public static final int UID_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. A universally unique identifier for the Agent.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. A universally unique identifier for the Agent.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 13; + + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Struct.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + + /** + * + * + *
+   * Output only. Attributes of the Agent.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+   * "google-adk"} - the agent framework used to develop the Agent. Example
+   * values: "google-adk", "langchain", "custom".
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the Agent.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the Agent, for
+   * example, the Reasoning Engine URI.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + * + * + *
+   * Output only. Attributes of the Agent.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+   * "google-adk"} - the agent framework used to develop the Agent. Example
+   * values: "google-adk", "langchain", "custom".
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the Agent.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the Agent, for
+   * example, the Reasoning Engine URI.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + + /** + * + * + *
+   * Output only. Attributes of the Agent.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+   * "google-adk"} - the agent framework used to develop the Agent. Example
+   * values: "google-adk", "langchain", "custom".
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the Agent.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the Agent, for
+   * example, the Reasoning Engine URI.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Struct getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Struct defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Output only. Attributes of the Agent.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+   * "google-adk"} - the agent framework used to develop the Agent. Example
+   * values: "google-adk", "langchain", "custom".
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the Agent.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the Agent, for
+   * example, the Reasoning Engine URI.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Struct getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CARD_FIELD_NUMBER = 14; + private com.google.cloud.agentregistry.v1.Agent.Card card_; + + /** + * + * + *
+   * Output only. Full Agent Card payload, when available.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the card field is set. + */ + @java.lang.Override + public boolean hasCard() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Full Agent Card payload, when available.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The card. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.Card getCard() { + return card_ == null + ? com.google.cloud.agentregistry.v1.Agent.Card.getDefaultInstance() + : card_; + } + + /** + * + * + *
+   * Output only. Full Agent Card payload, when available.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent.CardOrBuilder getCardOrBuilder() { + return card_ == null + ? com.google.cloud.agentregistry.v1.Agent.Card.getDefaultInstance() + : card_; + } + + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agentId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, agentId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, version_); + } + for (int i = 0; i < protocols_.size(); i++) { + output.writeMessage(8, protocols_.get(i)); + } + for (int i = 0; i < skills_.size(); i++) { + output.writeMessage(9, skills_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, uid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(11, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(12, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 13); + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(14, getCard()); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agentId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, agentId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, version_); + } + for (int i = 0; i < protocols_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, protocols_.get(i)); + } + for (int i = 0; i < skills_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, skills_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, uid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = + AttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, attributes__); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getCard()); + } + 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.agentregistry.v1.Agent)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Agent other = (com.google.cloud.agentregistry.v1.Agent) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAgentId().equals(other.getAgentId())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getProtocolsList().equals(other.getProtocolsList())) return false; + if (!getSkillsList().equals(other.getSkillsList())) return false; + if (!getUid().equals(other.getUid())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; + if (hasCard() != other.hasCard()) return false; + if (hasCard()) { + if (!getCard().equals(other.getCard())) 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 = (37 * hash) + AGENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getAgentId().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (getProtocolsCount() > 0) { + hash = (37 * hash) + PROTOCOLS_FIELD_NUMBER; + hash = (53 * hash) + getProtocolsList().hashCode(); + } + if (getSkillsCount() > 0) { + hash = (37 * hash) + SKILLS_FIELD_NUMBER; + hash = (53 * hash) + getSkillsList().hashCode(); + } + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + if (hasCard()) { + hash = (37 * hash) + CARD_FIELD_NUMBER; + hash = (53 * hash) + getCard().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Agent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent 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.agentregistry.v1.Agent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent 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.agentregistry.v1.Agent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Agent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Agent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent 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.agentregistry.v1.Agent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent 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.agentregistry.v1.Agent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Agent 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.agentregistry.v1.Agent 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; + } + + /** + * + * + *
+   * Represents an Agent.
+   * "A2A" below refers to the Agent-to-Agent protocol.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Agent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Agent) + com.google.cloud.agentregistry.v1.AgentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 13: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 13: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Agent.class, + com.google.cloud.agentregistry.v1.Agent.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Agent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetProtocolsFieldBuilder(); + internalGetSkillsFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetCardFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + agentId_ = ""; + location_ = ""; + displayName_ = ""; + description_ = ""; + version_ = ""; + if (protocolsBuilder_ == null) { + protocols_ = java.util.Collections.emptyList(); + } else { + protocols_ = null; + protocolsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (skillsBuilder_ == null) { + skills_ = java.util.Collections.emptyList(); + } else { + skills_ = null; + skillsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + uid_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableAttributes().clear(); + card_ = null; + if (cardBuilder_ != null) { + cardBuilder_.dispose(); + cardBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentProto + .internal_static_google_cloud_agentregistry_v1_Agent_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Agent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent build() { + com.google.cloud.agentregistry.v1.Agent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Agent buildPartial() { + com.google.cloud.agentregistry.v1.Agent result = + new com.google.cloud.agentregistry.v1.Agent(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.agentregistry.v1.Agent result) { + if (protocolsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + protocols_ = java.util.Collections.unmodifiableList(protocols_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.protocols_ = protocols_; + } else { + result.protocols_ = protocolsBuilder_.build(); + } + if (skillsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + skills_ = java.util.Collections.unmodifiableList(skills_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.skills_ = skills_; + } else { + result.skills_ = skillsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Agent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.agentId_ = agentId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.uid_ = uid_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000200) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.attributes_ = + internalGetAttributes().build(AttributesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.card_ = cardBuilder_ == null ? card_ : cardBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Agent) { + return mergeFrom((com.google.cloud.agentregistry.v1.Agent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Agent other) { + if (other == com.google.cloud.agentregistry.v1.Agent.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAgentId().isEmpty()) { + agentId_ = other.agentId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (protocolsBuilder_ == null) { + if (!other.protocols_.isEmpty()) { + if (protocols_.isEmpty()) { + protocols_ = other.protocols_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureProtocolsIsMutable(); + protocols_.addAll(other.protocols_); + } + onChanged(); + } + } else { + if (!other.protocols_.isEmpty()) { + if (protocolsBuilder_.isEmpty()) { + protocolsBuilder_.dispose(); + protocolsBuilder_ = null; + protocols_ = other.protocols_; + bitField0_ = (bitField0_ & ~0x00000040); + protocolsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetProtocolsFieldBuilder() + : null; + } else { + protocolsBuilder_.addAllMessages(other.protocols_); + } + } + } + if (skillsBuilder_ == null) { + if (!other.skills_.isEmpty()) { + if (skills_.isEmpty()) { + skills_ = other.skills_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureSkillsIsMutable(); + skills_.addAll(other.skills_); + } + onChanged(); + } + } else { + if (!other.skills_.isEmpty()) { + if (skillsBuilder_.isEmpty()) { + skillsBuilder_.dispose(); + skillsBuilder_ = null; + skills_ = other.skills_; + bitField0_ = (bitField0_ & ~0x00000080); + skillsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSkillsFieldBuilder() + : null; + } else { + skillsBuilder_.addAllMessages(other.skills_); + } + } + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + bitField0_ |= 0x00000800; + if (other.hasCard()) { + mergeCard(other.getCard()); + } + 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 + case 18: + { + agentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + com.google.cloud.agentregistry.v1.Agent.Protocol m = + input.readMessage( + com.google.cloud.agentregistry.v1.Agent.Protocol.parser(), + extensionRegistry); + if (protocolsBuilder_ == null) { + ensureProtocolsIsMutable(); + protocols_.add(m); + } else { + protocolsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + com.google.cloud.agentregistry.v1.Agent.Skill m = + input.readMessage( + com.google.cloud.agentregistry.v1.Agent.Skill.parser(), extensionRegistry); + if (skillsBuilder_ == null) { + ensureSkillsIsMutable(); + skills_.add(m); + } else { + skillsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: + { + com.google.protobuf.MapEntry + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .ensureBuilderMap() + .put(attributes__.getKey(), attributes__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 106 + case 114: + { + input.readMessage(internalGetCardFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 114 + 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_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of an Agent.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The resource name of an Agent.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The resource name of an Agent.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + + /** + * + * + *
+     * Identifier. The resource name of an Agent.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of an Agent.
+     * Format: `projects/{project}/locations/{location}/agents/{agent}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + + private java.lang.Object agentId_ = ""; + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for agents.
+     * 
+ * + * string agent_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The agentId. + */ + public java.lang.String getAgentId() { + java.lang.Object ref = agentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for agents.
+     * 
+ * + * string agent_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for agentId. + */ + public com.google.protobuf.ByteString getAgentIdBytes() { + java.lang.Object ref = agentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for agents.
+     * 
+ * + * string agent_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The agentId to set. + * @return This builder for chaining. + */ + public Builder setAgentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for agents.
+     * 
+ * + * string agent_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAgentId() { + agentId_ = getDefaultInstance().getAgentId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for agents.
+     * 
+ * + * string agent_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for agentId to set. + * @return This builder for chaining. + */ + public Builder setAgentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
+     * Output only. The location where agent is hosted. The value is defined by
+     * the hosting environment (i.e. cloud provider).
+     * 
+ * + * string location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The location where agent is hosted. The value is defined by
+     * the hosting environment (i.e. cloud provider).
+     * 
+ * + * string location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The location where agent is hosted. The value is defined by
+     * the hosting environment (i.e. cloud provider).
+     * 
+ * + * string location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location where agent is hosted. The value is defined by
+     * the hosting environment (i.e. cloud provider).
+     * 
+ * + * string location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location where agent is hosted. The value is defined by
+     * the hosting environment (i.e. cloud provider).
+     * 
+ * + * string location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Output only. The display name of the agent, often obtained from the A2A
+     * Agent Card.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the agent, often obtained from the A2A
+     * Agent Card.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the agent, often obtained from the A2A
+     * Agent Card.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the agent, often obtained from the A2A
+     * Agent Card.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the agent, often obtained from the A2A
+     * Agent Card.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Output only. The description of the Agent, often obtained from the A2A
+     * Agent Card. Empty if Agent Card has no description.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The description of the Agent, often obtained from the A2A
+     * Agent Card. Empty if Agent Card has no description.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The description of the Agent, often obtained from the A2A
+     * Agent Card. Empty if Agent Card has no description.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The description of the Agent, often obtained from the A2A
+     * Agent Card. Empty if Agent Card has no description.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The description of the Agent, often obtained from the A2A
+     * Agent Card. Empty if Agent Card has no description.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + + /** + * + * + *
+     * Output only. The version of the Agent, often obtained from the A2A Agent
+     * Card. Empty if Agent Card has no version or agent is not an A2A Agent.
+     * 
+ * + * string version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The version of the Agent, often obtained from the A2A Agent
+     * Card. Empty if Agent Card has no version or agent is not an A2A Agent.
+     * 
+ * + * string version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The version of the Agent, often obtained from the A2A Agent
+     * Card. Empty if Agent Card has no version or agent is not an A2A Agent.
+     * 
+ * + * string version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The version of the Agent, often obtained from the A2A Agent
+     * Card. Empty if Agent Card has no version or agent is not an A2A Agent.
+     * 
+ * + * string version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The version of the Agent, often obtained from the A2A Agent
+     * Card. Empty if Agent Card has no version or agent is not an A2A Agent.
+     * 
+ * + * string version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List protocols_ = + java.util.Collections.emptyList(); + + private void ensureProtocolsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + protocols_ = + new java.util.ArrayList(protocols_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Agent.Protocol, + com.google.cloud.agentregistry.v1.Agent.Protocol.Builder, + com.google.cloud.agentregistry.v1.Agent.ProtocolOrBuilder> + protocolsBuilder_; + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getProtocolsList() { + if (protocolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(protocols_); + } else { + return protocolsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getProtocolsCount() { + if (protocolsBuilder_ == null) { + return protocols_.size(); + } else { + return protocolsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.Protocol getProtocols(int index) { + if (protocolsBuilder_ == null) { + return protocols_.get(index); + } else { + return protocolsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProtocols(int index, com.google.cloud.agentregistry.v1.Agent.Protocol value) { + if (protocolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.set(index, value); + onChanged(); + } else { + protocolsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProtocols( + int index, com.google.cloud.agentregistry.v1.Agent.Protocol.Builder builderForValue) { + if (protocolsBuilder_ == null) { + ensureProtocolsIsMutable(); + protocols_.set(index, builderForValue.build()); + onChanged(); + } else { + protocolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addProtocols(com.google.cloud.agentregistry.v1.Agent.Protocol value) { + if (protocolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.add(value); + onChanged(); + } else { + protocolsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addProtocols(int index, com.google.cloud.agentregistry.v1.Agent.Protocol value) { + if (protocolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.add(index, value); + onChanged(); + } else { + protocolsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addProtocols( + com.google.cloud.agentregistry.v1.Agent.Protocol.Builder builderForValue) { + if (protocolsBuilder_ == null) { + ensureProtocolsIsMutable(); + protocols_.add(builderForValue.build()); + onChanged(); + } else { + protocolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addProtocols( + int index, com.google.cloud.agentregistry.v1.Agent.Protocol.Builder builderForValue) { + if (protocolsBuilder_ == null) { + ensureProtocolsIsMutable(); + protocols_.add(index, builderForValue.build()); + onChanged(); + } else { + protocolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllProtocols( + java.lang.Iterable values) { + if (protocolsBuilder_ == null) { + ensureProtocolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, protocols_); + onChanged(); + } else { + protocolsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearProtocols() { + if (protocolsBuilder_ == null) { + protocols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + protocolsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeProtocols(int index) { + if (protocolsBuilder_ == null) { + ensureProtocolsIsMutable(); + protocols_.remove(index); + onChanged(); + } else { + protocolsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.Protocol.Builder getProtocolsBuilder(int index) { + return internalGetProtocolsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.ProtocolOrBuilder getProtocolsOrBuilder( + int index) { + if (protocolsBuilder_ == null) { + return protocols_.get(index); + } else { + return protocolsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getProtocolsOrBuilderList() { + if (protocolsBuilder_ != null) { + return protocolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(protocols_); + } + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.Protocol.Builder addProtocolsBuilder() { + return internalGetProtocolsFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Agent.Protocol.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.Protocol.Builder addProtocolsBuilder(int index) { + return internalGetProtocolsFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Agent.Protocol.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The connection details for the Agent.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getProtocolsBuilderList() { + return internalGetProtocolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Agent.Protocol, + com.google.cloud.agentregistry.v1.Agent.Protocol.Builder, + com.google.cloud.agentregistry.v1.Agent.ProtocolOrBuilder> + internalGetProtocolsFieldBuilder() { + if (protocolsBuilder_ == null) { + protocolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Agent.Protocol, + com.google.cloud.agentregistry.v1.Agent.Protocol.Builder, + com.google.cloud.agentregistry.v1.Agent.ProtocolOrBuilder>( + protocols_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + protocols_ = null; + } + return protocolsBuilder_; + } + + private java.util.List skills_ = + java.util.Collections.emptyList(); + + private void ensureSkillsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + skills_ = new java.util.ArrayList(skills_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Agent.Skill, + com.google.cloud.agentregistry.v1.Agent.Skill.Builder, + com.google.cloud.agentregistry.v1.Agent.SkillOrBuilder> + skillsBuilder_; + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSkillsList() { + if (skillsBuilder_ == null) { + return java.util.Collections.unmodifiableList(skills_); + } else { + return skillsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSkillsCount() { + if (skillsBuilder_ == null) { + return skills_.size(); + } else { + return skillsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.Skill getSkills(int index) { + if (skillsBuilder_ == null) { + return skills_.get(index); + } else { + return skillsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSkills(int index, com.google.cloud.agentregistry.v1.Agent.Skill value) { + if (skillsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkillsIsMutable(); + skills_.set(index, value); + onChanged(); + } else { + skillsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSkills( + int index, com.google.cloud.agentregistry.v1.Agent.Skill.Builder builderForValue) { + if (skillsBuilder_ == null) { + ensureSkillsIsMutable(); + skills_.set(index, builderForValue.build()); + onChanged(); + } else { + skillsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSkills(com.google.cloud.agentregistry.v1.Agent.Skill value) { + if (skillsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkillsIsMutable(); + skills_.add(value); + onChanged(); + } else { + skillsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSkills(int index, com.google.cloud.agentregistry.v1.Agent.Skill value) { + if (skillsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkillsIsMutable(); + skills_.add(index, value); + onChanged(); + } else { + skillsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSkills( + com.google.cloud.agentregistry.v1.Agent.Skill.Builder builderForValue) { + if (skillsBuilder_ == null) { + ensureSkillsIsMutable(); + skills_.add(builderForValue.build()); + onChanged(); + } else { + skillsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSkills( + int index, com.google.cloud.agentregistry.v1.Agent.Skill.Builder builderForValue) { + if (skillsBuilder_ == null) { + ensureSkillsIsMutable(); + skills_.add(index, builderForValue.build()); + onChanged(); + } else { + skillsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSkills( + java.lang.Iterable values) { + if (skillsBuilder_ == null) { + ensureSkillsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, skills_); + onChanged(); + } else { + skillsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSkills() { + if (skillsBuilder_ == null) { + skills_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + skillsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSkills(int index) { + if (skillsBuilder_ == null) { + ensureSkillsIsMutable(); + skills_.remove(index); + onChanged(); + } else { + skillsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.Skill.Builder getSkillsBuilder(int index) { + return internalGetSkillsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.SkillOrBuilder getSkillsOrBuilder(int index) { + if (skillsBuilder_ == null) { + return skills_.get(index); + } else { + return skillsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSkillsOrBuilderList() { + if (skillsBuilder_ != null) { + return skillsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(skills_); + } + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.Skill.Builder addSkillsBuilder() { + return internalGetSkillsFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Agent.Skill.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.Skill.Builder addSkillsBuilder(int index) { + return internalGetSkillsFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Agent.Skill.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Skills the agent possesses, often obtained from the A2A Agent
+     * Card.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSkillsBuilderList() { + return internalGetSkillsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Agent.Skill, + com.google.cloud.agentregistry.v1.Agent.Skill.Builder, + com.google.cloud.agentregistry.v1.Agent.SkillOrBuilder> + internalGetSkillsFieldBuilder() { + if (skillsBuilder_ == null) { + skillsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Agent.Skill, + com.google.cloud.agentregistry.v1.Agent.Skill.Builder, + com.google.cloud.agentregistry.v1.Agent.SkillOrBuilder>( + skills_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + skills_ = null; + } + return skillsBuilder_; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. A universally unique identifier for the Agent.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. A universally unique identifier for the Agent.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. A universally unique identifier for the Agent.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A universally unique identifier for the Agent.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A universally unique identifier for the Agent.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private static final class AttributesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, com.google.protobuf.StructOrBuilder, com.google.protobuf.Struct> { + @java.lang.Override + public com.google.protobuf.Struct build(com.google.protobuf.StructOrBuilder val) { + if (val instanceof com.google.protobuf.Struct) { + return (com.google.protobuf.Struct) val; + } + return ((com.google.protobuf.Struct.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return AttributesDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final AttributesConverter attributesConverter = new AttributesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.StructOrBuilder, + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder> + attributes_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.StructOrBuilder, + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder> + internalGetAttributes() { + if (attributes_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(attributesConverter); + } + return attributes_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.StructOrBuilder, + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder> + internalGetMutableAttributes() { + if (attributes_ == null) { + attributes_ = new com.google.protobuf.MapFieldBuilder<>(attributesConverter); + } + bitField0_ |= 0x00000800; + onChanged(); + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().ensureBuilderMap().size(); + } + + /** + * + * + *
+     * Output only. Attributes of the Agent.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+     * "google-adk"} - the agent framework used to develop the Agent. Example
+     * values: "google-adk", "langchain", "custom".
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the Agent.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the Agent, for
+     * example, the Reasoning Engine URI.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + * + * + *
+     * Output only. Attributes of the Agent.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+     * "google-adk"} - the agent framework used to develop the Agent. Example
+     * values: "google-adk", "langchain", "custom".
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the Agent.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the Agent, for
+     * example, the Reasoning Engine URI.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getImmutableMap(); + } + + /** + * + * + *
+     * Output only. Attributes of the Agent.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+     * "google-adk"} - the agent framework used to develop the Agent. Example
+     * values: "google-adk", "langchain", "custom".
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the Agent.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the Agent, for
+     * example, the Reasoning Engine URI.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Struct getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Struct defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableAttributes().ensureBuilderMap(); + return map.containsKey(key) ? attributesConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+     * Output only. Attributes of the Agent.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+     * "google-adk"} - the agent framework used to develop the Agent. Example
+     * values: "google-adk", "langchain", "custom".
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the Agent.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the Agent, for
+     * example, the Reasoning Engine URI.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Struct getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableAttributes().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return attributesConverter.build(map.get(key)); + } + + public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableAttributes().clear(); + return this; + } + + /** + * + * + *
+     * Output only. Attributes of the Agent.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+     * "google-adk"} - the agent framework used to develop the Agent. Example
+     * values: "google-adk", "langchain", "custom".
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the Agent.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the Agent, for
+     * example, the Reasoning Engine URI.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttributes().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + bitField0_ |= 0x00000800; + return internalGetMutableAttributes().ensureMessageMap(); + } + + /** + * + * + *
+     * Output only. Attributes of the Agent.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+     * "google-adk"} - the agent framework used to develop the Agent. Example
+     * values: "google-adk", "langchain", "custom".
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the Agent.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the Agent, for
+     * example, the Reasoning Engine URI.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAttributes(java.lang.String key, com.google.protobuf.Struct value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAttributes().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000800; + return this; + } + + /** + * + * + *
+     * Output only. Attributes of the Agent.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+     * "google-adk"} - the agent framework used to develop the Agent. Example
+     * values: "google-adk", "langchain", "custom".
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the Agent.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the Agent, for
+     * example, the Reasoning Engine URI.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllAttributes( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableAttributes().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000800; + return this; + } + + /** + * + * + *
+     * Output only. Attributes of the Agent.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+     * "google-adk"} - the agent framework used to develop the Agent. Example
+     * values: "google-adk", "langchain", "custom".
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the Agent.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the Agent, for
+     * example, the Reasoning Engine URI.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Struct.Builder putAttributesBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableAttributes().ensureBuilderMap(); + com.google.protobuf.StructOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Struct.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Struct) { + entry = ((com.google.protobuf.Struct) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Struct.Builder) entry; + } + + private com.google.cloud.agentregistry.v1.Agent.Card card_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Agent.Card, + com.google.cloud.agentregistry.v1.Agent.Card.Builder, + com.google.cloud.agentregistry.v1.Agent.CardOrBuilder> + cardBuilder_; + + /** + * + * + *
+     * Output only. Full Agent Card payload, when available.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the card field is set. + */ + public boolean hasCard() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Output only. Full Agent Card payload, when available.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The card. + */ + public com.google.cloud.agentregistry.v1.Agent.Card getCard() { + if (cardBuilder_ == null) { + return card_ == null + ? com.google.cloud.agentregistry.v1.Agent.Card.getDefaultInstance() + : card_; + } else { + return cardBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Full Agent Card payload, when available.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCard(com.google.cloud.agentregistry.v1.Agent.Card value) { + if (cardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + card_ = value; + } else { + cardBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Full Agent Card payload, when available.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCard(com.google.cloud.agentregistry.v1.Agent.Card.Builder builderForValue) { + if (cardBuilder_ == null) { + card_ = builderForValue.build(); + } else { + cardBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Full Agent Card payload, when available.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCard(com.google.cloud.agentregistry.v1.Agent.Card value) { + if (cardBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && card_ != null + && card_ != com.google.cloud.agentregistry.v1.Agent.Card.getDefaultInstance()) { + getCardBuilder().mergeFrom(value); + } else { + card_ = value; + } + } else { + cardBuilder_.mergeFrom(value); + } + if (card_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Full Agent Card payload, when available.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCard() { + bitField0_ = (bitField0_ & ~0x00001000); + card_ = null; + if (cardBuilder_ != null) { + cardBuilder_.dispose(); + cardBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Full Agent Card payload, when available.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.Card.Builder getCardBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return internalGetCardFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Full Agent Card payload, when available.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Agent.CardOrBuilder getCardOrBuilder() { + if (cardBuilder_ != null) { + return cardBuilder_.getMessageOrBuilder(); + } else { + return card_ == null + ? com.google.cloud.agentregistry.v1.Agent.Card.getDefaultInstance() + : card_; + } + } + + /** + * + * + *
+     * Output only. Full Agent Card payload, when available.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Agent.Card, + com.google.cloud.agentregistry.v1.Agent.Card.Builder, + com.google.cloud.agentregistry.v1.Agent.CardOrBuilder> + internalGetCardFieldBuilder() { + if (cardBuilder_ == null) { + cardBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Agent.Card, + com.google.cloud.agentregistry.v1.Agent.Card.Builder, + com.google.cloud.agentregistry.v1.Agent.CardOrBuilder>( + getCard(), getParentForChildren(), isClean()); + card_ = null; + } + return cardBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Agent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Agent) + private static final com.google.cloud.agentregistry.v1.Agent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Agent(); + } + + public static com.google.cloud.agentregistry.v1.Agent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Agent 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.agentregistry.v1.Agent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentName.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentName.java new file mode 100644 index 000000000000..f3cafcb3418a --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AgentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + + @Deprecated + protected AgentName() { + project = null; + location = null; + agent = null; + } + + private AgentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AgentName of(String project, String location, String agent) { + return newBuilder().setProject(project).setLocation(location).setAgent(agent).build(); + } + + public static String format(String project, String location, String agent) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .build() + .toString(); + } + + public static AgentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT.validatedMatch( + formattedString, "AgentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("agent")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AgentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT.instantiate( + "project", project, "location", location, "agent", agent); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AgentName that = ((AgentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}. */ + public static class Builder { + private String project; + private String location; + private String agent; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + private Builder(AgentName agentName) { + this.project = agentName.project; + this.location = agentName.location; + this.agent = agentName.agent; + } + + public AgentName build() { + return new AgentName(this); + } + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentOrBuilder.java new file mode 100644 index 000000000000..75c2ac887a79 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentOrBuilder.java @@ -0,0 +1,607 @@ +/* + * 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/agentregistry/v1/agent.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface AgentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Agent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of an Agent.
+   * Format: `projects/{project}/locations/{location}/agents/{agent}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of an Agent.
+   * Format: `projects/{project}/locations/{location}/agents/{agent}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for agents.
+   * 
+ * + * string agent_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The agentId. + */ + java.lang.String getAgentId(); + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for agents.
+   * 
+ * + * string agent_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for agentId. + */ + com.google.protobuf.ByteString getAgentIdBytes(); + + /** + * + * + *
+   * Output only. The location where agent is hosted. The value is defined by
+   * the hosting environment (i.e. cloud provider).
+   * 
+ * + * string location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
+   * Output only. The location where agent is hosted. The value is defined by
+   * the hosting environment (i.e. cloud provider).
+   * 
+ * + * string location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * Output only. The display name of the agent, often obtained from the A2A
+   * Agent Card.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. The display name of the agent, often obtained from the A2A
+   * Agent Card.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The description of the Agent, often obtained from the A2A
+   * Agent Card. Empty if Agent Card has no description.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Output only. The description of the Agent, often obtained from the A2A
+   * Agent Card. Empty if Agent Card has no description.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The version of the Agent, often obtained from the A2A Agent
+   * Card. Empty if Agent Card has no version or agent is not an A2A Agent.
+   * 
+ * + * string version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The version. + */ + java.lang.String getVersion(); + + /** + * + * + *
+   * Output only. The version of the Agent, often obtained from the A2A Agent
+   * Card. Empty if Agent Card has no version or agent is not an A2A Agent.
+   * 
+ * + * string version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getProtocolsList(); + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.Agent.Protocol getProtocols(int index); + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getProtocolsCount(); + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getProtocolsOrBuilderList(); + + /** + * + * + *
+   * Output only. The connection details for the Agent.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Protocol protocols = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.Agent.ProtocolOrBuilder getProtocolsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSkillsList(); + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.Agent.Skill getSkills(int index); + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSkillsCount(); + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSkillsOrBuilderList(); + + /** + * + * + *
+   * Output only. Skills the agent possesses, often obtained from the A2A Agent
+   * Card.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Agent.Skill skills = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.Agent.SkillOrBuilder getSkillsOrBuilder(int index); + + /** + * + * + *
+   * Output only. A universally unique identifier for the Agent.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. A universally unique identifier for the Agent.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Attributes of the Agent.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+   * "google-adk"} - the agent framework used to develop the Agent. Example
+   * values: "google-adk", "langchain", "custom".
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the Agent.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the Agent, for
+   * example, the Reasoning Engine URI.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAttributesCount(); + + /** + * + * + *
+   * Output only. Attributes of the Agent.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+   * "google-adk"} - the agent framework used to develop the Agent. Example
+   * values: "google-adk", "langchain", "custom".
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the Agent.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the Agent, for
+   * example, the Reasoning Engine URI.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsAttributes(java.lang.String key); + + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttributes(); + + /** + * + * + *
+   * Output only. Attributes of the Agent.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+   * "google-adk"} - the agent framework used to develop the Agent. Example
+   * values: "google-adk", "langchain", "custom".
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the Agent.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the Agent, for
+   * example, the Reasoning Engine URI.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getAttributesMap(); + + /** + * + * + *
+   * Output only. Attributes of the Agent.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+   * "google-adk"} - the agent framework used to develop the Agent. Example
+   * values: "google-adk", "langchain", "custom".
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the Agent.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the Agent, for
+   * example, the Reasoning Engine URI.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + com.google.protobuf.Struct getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Struct defaultValue); + + /** + * + * + *
+   * Output only. Attributes of the Agent.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/Framework`: {"framework":
+   * "google-adk"} - the agent framework used to develop the Agent. Example
+   * values: "google-adk", "langchain", "custom".
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the Agent.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the Agent, for
+   * example, the Reasoning Engine URI.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.Struct getAttributesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Full Agent Card payload, when available.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the card field is set. + */ + boolean hasCard(); + + /** + * + * + *
+   * Output only. Full Agent Card payload, when available.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The card. + */ + com.google.cloud.agentregistry.v1.Agent.Card getCard(); + + /** + * + * + *
+   * Output only. Full Agent Card payload, when available.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Agent.Card card = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.Agent.CardOrBuilder getCardOrBuilder(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentProto.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentProto.java new file mode 100644 index 000000000000..2769b56ca559 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentProto.java @@ -0,0 +1,214 @@ +/* + * 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/agentregistry/v1/agent.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public final class AgentProto extends com.google.protobuf.GeneratedFile { + private AgentProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentProto"); + } + + 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_agentregistry_v1_Agent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Agent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Agent_Protocol_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Agent_Protocol_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Agent_Skill_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Agent_Skill_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Agent_Card_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Agent_Card_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Agent_AttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Agent_AttributesEntry_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" + + ")google/cloud/agentregistry/v1/agent.pr" + + "oto\022\035google.cloud.agentregistry.v1\032\037goog" + + "le/api/field_behavior.proto\032\033google/api/" + + "field_info.proto\032\031google/api/resource.pr" + + "oto\032.google/cloud/agentregistry/v1/prope" + + "rties.proto\032\034google/protobuf/struct.proto\032\037google/protobuf/timestamp.proto\"\367" + + "\t\n" + + "\005Agent\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\025\n" + + "\010agent_id\030\002 \001(\tB\003\340A\003\022\025\n" + + "\010location\030\004 \001(\tB\003\340A\003\022\031\n" + + "\014display_name\030\005 \001(\tB\003\340A\003\022\030\n" + + "\013description\030\006 \001(\tB\003\340A\003\022\024\n" + + "\007version\030\007 \001(\tB\003\340A\003\022E\n" + + "\tprotocols\030\010 " + + "\003(\0132-.google.cloud.agentregistry.v1.Agent.ProtocolB\003\340A\003\022?\n" + + "\006skills\030\t \003(\0132*.google" + + ".cloud.agentregistry.v1.Agent.SkillB\003\340A\003\022\030\n" + + "\003uid\030\n" + + " \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\0224\n" + + "\013create_time\030\013 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\014" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022M\n\n" + + "attributes\030\r" + + " \003(\01324.google.cloud.agentregistry.v1.Agent.AttributesEntryB\003\340A\003\022<\n" + + "\004card\030\016" + + " \001(\0132).google.cloud.agentregistry.v1.Agent.CardB\003\340A\003\032\354\001\n" + + "\010Protocol\022E\n" + + "\004type\030\001 \001(\01622.google.cloud.ag" + + "entregistry.v1.Agent.Protocol.TypeB\003\340A\003\022\035\n" + + "\020protocol_version\030\002 \001(\tB\003\340A\003\022A\n\n" + + "interfaces\030\003" + + " \003(\0132(.google.cloud.agentregistry.v1.InterfaceB\003\340A\003\"7\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\r\n" + + "\tA2A_AGENT\020\001\022\n\n" + + "\006CUSTOM\020\002\032o\n" + + "\005Skill\022\017\n" + + "\002id\030\001 \001(\tB\003\340A\003\022\021\n" + + "\004name\030\002 \001(\tB\003\340A\003\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004tags\030\004 \003(\tB\003\340A\003\022\025\n" + + "\010examples\030\005 \003(\tB\003\340A\003\032\252\001\n" + + "\004Card\022A\n" + + "\004type\030\001" + + " \001(\0162..google.cloud.agentregistry.v1.Agent.Card.TypeB\003\340A\003\022-\n" + + "\007content\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\003\"0\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\022\n" + + "\016A2A_AGENT_CARD\020\001\032J\n" + + "\017AttributesEntry\022\013\n" + + "\003key\030\001 \001(\t\022&\n" + + "\005value\030\002 \001(\0132\027.google.protobuf.Struct:\0028\001:n\352Ak\n" + + "\"agentregistry.googleapis.com/Agent\0226p" + + "rojects/{project}/locations/{location}/agents/{agent}*\006agents2\005agentB\335\001\n" + + "!com.google.cloud.agentregistry.v1B\n" + + "AgentProtoP\001ZGcloud.google.com/go/agentregistry/apiv" + + "1/agentregistrypb;agentregistrypb\252\002\035Goog" + + "le.Cloud.AgentRegistry.V1\312\002\035Google\\Cloud\\AgentRegistry\\V1\352\002" + + " Google::Cloud::AgentRegistry::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.agentregistry.v1.PropertiesProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_agentregistry_v1_Agent_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_agentregistry_v1_Agent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Agent_descriptor, + new java.lang.String[] { + "Name", + "AgentId", + "Location", + "DisplayName", + "Description", + "Version", + "Protocols", + "Skills", + "Uid", + "CreateTime", + "UpdateTime", + "Attributes", + "Card", + }); + internal_static_google_cloud_agentregistry_v1_Agent_Protocol_descriptor = + internal_static_google_cloud_agentregistry_v1_Agent_descriptor.getNestedType(0); + internal_static_google_cloud_agentregistry_v1_Agent_Protocol_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Agent_Protocol_descriptor, + new java.lang.String[] { + "Type", "ProtocolVersion", "Interfaces", + }); + internal_static_google_cloud_agentregistry_v1_Agent_Skill_descriptor = + internal_static_google_cloud_agentregistry_v1_Agent_descriptor.getNestedType(1); + internal_static_google_cloud_agentregistry_v1_Agent_Skill_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Agent_Skill_descriptor, + new java.lang.String[] { + "Id", "Name", "Description", "Tags", "Examples", + }); + internal_static_google_cloud_agentregistry_v1_Agent_Card_descriptor = + internal_static_google_cloud_agentregistry_v1_Agent_descriptor.getNestedType(2); + internal_static_google_cloud_agentregistry_v1_Agent_Card_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Agent_Card_descriptor, + new java.lang.String[] { + "Type", "Content", + }); + internal_static_google_cloud_agentregistry_v1_Agent_AttributesEntry_descriptor = + internal_static_google_cloud_agentregistry_v1_Agent_descriptor.getNestedType(3); + internal_static_google_cloud_agentregistry_v1_Agent_AttributesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Agent_AttributesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.agentregistry.v1.PropertiesProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryServiceProto.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryServiceProto.java new file mode 100644 index 000000000000..a3f74b6660dd --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/AgentRegistryServiceProto.java @@ -0,0 +1,679 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public final class AgentRegistryServiceProto extends com.google.protobuf.GeneratedFile { + private AgentRegistryServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentRegistryServiceProto"); + } + + 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_agentregistry_v1_ListAgentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListAgentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_GetAgentRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_GetAgentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_ListServicesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListServicesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_ListServicesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListServicesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_GetServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_GetServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_GetBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_GetBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_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" + + "9google/cloud/agentregistry/v1/agentregistry_service.proto\022\035google.cloud.agentr" + + "egistry.v1\032\034google/api/annotations.proto" + + "\032\027google/api/client.proto\032\037google/api/fi" + + "eld_behavior.proto\032\033google/api/field_inf" + + "o.proto\032\031google/api/resource.proto\032)goog" + + "le/cloud/agentregistry/v1/agent.proto\032+google/cloud/agentregistry/v1/binding.pro" + + "to\032,google/cloud/agentregistry/v1/endpoint.proto\032.google/cloud/agentregistry/v1/" + + "mcp_server.proto\032+google/cloud/agentregistry/v1/service.proto\032#google/longrunnin" + + "g/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\254\001\n" + + "\021ListAgentsRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\340A\002\372A$\022\"agentregistry.googleapis.com/Agent\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"c\n" + + "\022ListAgentsResponse\0224\n" + + "\006agents\030\001 \003(\0132$.google.cloud.agentregistry.v1.Agent\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\236\001\n" + + "\023SearchAgentsRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\340A\002\372A$\022\"agentregistry.googleapis.com/Agent\022\032\n\r" + + "search_string\030\003 \001(\tB\003\340A\001\022\026\n" + + "\tpage_size\030\006 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\007 \001(\tB\003\340A\001\"e\n" + + "\024SearchAgentsResponse\0224\n" + + "\006agents\030\001 \003(\0132$.google.cloud.agentregistry.v1.Agent\022\027\n" + + "\017next_page_token\030\002 \001(\t\"K\n" + + "\017GetAgentRequest\0228\n" + + "\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"agentregistry.googleapis.com/Agent\"\233\001\n" + + "\024ListEndpointsRequest\022=\n" + + "\006parent\030\001 \001(" + + "\tB-\340A\002\372A\'\022%agentregistry.googleapis.com/Endpoint\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"l\n" + + "\025ListEndpointsResponse\022:\n" + + "\tendpoints\030\001 \003(\0132\'.google.cloud.agentregistry.v1.Endpoint\022\027\n" + + "\017next_page_token\030\002 \001(\t\"Q\n" + + "\022GetEndpointRequest\022;\n" + + "\004name\030\001 \001(\tB-\340A\002\372A\'\n" + + "%agentregistry.googleapis.com/Endpoint\"\264\001\n" + + "\025ListMcpServersRequest\022>\n" + + "\006parent\030\001 \001(" + + "\tB.\340A\002\372A(\022&agentregistry.googleapis.com/McpServer\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"p\n" + + "\026ListMcpServersResponse\022=\n" + + "\013mcp_servers\030\001 \003(\0132(.google.cloud.agentregistry.v1.McpServer\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\246\001\n" + + "\027SearchMcpServersRequest\022>\n" + + "\006parent\030\001 \001(" + + "\tB.\340A\002\372A(\022&agentregistry.googleapis.com/McpServer\022\032\n\r" + + "search_string\030\003 \001(\tB\003\340A\001\022\026\n" + + "\tpage_size\030\006 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\007 \001(\tB\003\340A\001\"r\n" + + "\030SearchMcpServersResponse\022=\n" + + "\013mcp_servers\030\001 \003(\0132(.google.cloud.agentregistry.v1.McpServer\022\027\n" + + "\017next_page_token\030\002 \001(\t\"S\n" + + "\023GetMcpServerRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&agentregistry.googleapis.com/McpServer\"\231\001\n" + + "\023ListServicesRequest\022<\n" + + "\006parent\030\001 \001(" + + "\tB,\340A\002\372A&\022$agentregistry.googleapis.com/Service\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"i\n" + + "\024ListServicesResponse\0228\n" + + "\010services\030\001 \003(\0132&.google.cloud.agentregistry.v1.Service\022\027\n" + + "\017next_page_token\030\002 \001(\t\"O\n" + + "\021GetServiceRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$agentregistry.googleapis.com/Service\"\314\001\n" + + "\024CreateServiceRequest\022<\n" + + "\006parent\030\001 \001(" + + "\tB,\340A\002\372A&\022$agentregistry.googleapis.com/Service\022\027\n\n" + + "service_id\030\002 \001(\tB\003\340A\002\022<\n" + + "\007service\030\003" + + " \001(\0132&.google.cloud.agentregistry.v1.ServiceB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\341\001\n" + + "\035FetchAvailableBindingsRequest\022\033\n" + + "\021source_identifier\030\002 \001(\tH\000\022 \n" + + "\021target_identifier\030\003 \001(\tB\003\340A\001H\001\022<\n" + + "\006parent\030\001 \001(" + + "\tB,\340A\002\372A&\022$agentregistry.googleapis.com/Binding\022\026\n" + + "\tpage_size\030\004 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\005 \001(\tB\003\340A\001B\010\n" + + "\006sourceB\010\n" + + "\006target\"s\n" + + "\036FetchAvailableBindingsResponse\0228\n" + + "\010bindings\030\001 \003(\0132&.google.cloud.agentregistry.v1.Binding\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\253\001\n" + + "\024UpdateServiceRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022<\n" + + "\007service\030\002" + + " \001(\0132&.google.cloud.agentregistry.v1.ServiceB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"s\n" + + "\024DeleteServiceRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$agentregistry.googleapis.com/Service\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\200\002\n" + + "\021OperationMetadata\0224\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023\n" + + "\006target\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n" + + "\016status_message\030\005 \001(\tB\003\340A\003\022#\n" + + "\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n" + + "\013api_version\030\007 \001(\tB\003\340A\003\"\260\001\n" + + "\023ListBindingsRequest\022<\n" + + "\006parent\030\001 \001(\tB,\340A\002" + + "\372A&\022$agentregistry.googleapis.com/Binding\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"i\n" + + "\024ListBindingsResponse\0228\n" + + "\010bindings\030\001 \003(\0132&.google.cloud.agentregistry.v1.Binding\022\027\n" + + "\017next_page_token\030\002 \001(\t\"O\n" + + "\021GetBindingRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$agentregistry.googleapis.com/Binding\"\314\001\n" + + "\024CreateBindingRequest\022<\n" + + "\006parent\030\001 \001(" + + "\tB,\340A\002\372A&\022$agentregistry.googleapis.com/Binding\022\027\n\n" + + "binding_id\030\002 \001(\tB\003\340A\002\022<\n" + + "\007binding\030\003" + + " \001(\0132&.google.cloud.agentregistry.v1.BindingB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\253\001\n" + + "\024UpdateBindingRequest\022<\n" + + "\007binding\030\001" + + " \001(\0132&.google.cloud.agentregistry.v1.BindingB\003\340A\002\0224\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"s\n" + + "\024DeleteBindingRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$agentregistry.googleapis.com/Binding\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\0012\214\037\n\r" + + "AgentRegistry\022\256\001\n\n" + + "ListAgents\0220.google.cloud.agentregistry.v1.ListAgentsRequest\0321.google.cloud.a" + + "gentregistry.v1.ListAgentsResponse\";\332A\006p" + + "arent\202\323\344\223\002,\022*/v1/{parent=projects/*/locations/*}/agents\022\276\001\n" + + "\014SearchAgents\0222.google.cloud.agentregistry.v1.SearchAgentsReq" + + "uest\0323.google.cloud.agentregistry.v1.Sea" + + "rchAgentsResponse\"E\332A\006parent\202\323\344\223\0026\"1/v1/" + + "{parent=projects/*/locations/*}/agents:search:\001*\022\233\001\n" + + "\010GetAgent\022..google.cloud.agentregistry.v1.GetAgentRequest\032$.google.c" + + "loud.agentregistry.v1.Agent\"9\332A\004name\202\323\344\223" + + "\002,\022*/v1/{name=projects/*/locations/*/agents/*}\022\272\001\n\r" + + "ListEndpoints\0223.google.cloud.agentregistry.v1.ListEndpointsRequest\0324." + + "google.cloud.agentregistry.v1.ListEndpoi" + + "ntsResponse\">\332A\006parent\202\323\344\223\002/\022-/v1/{parent=projects/*/locations/*}/endpoints\022\247\001\n" + + "\013GetEndpoint\0221.google.cloud.agentregistry" + + ".v1.GetEndpointRequest\032\'.google.cloud.ag" + + "entregistry.v1.Endpoint\"<\332A\004name\202\323\344\223\002/\022-" + + "/v1/{name=projects/*/locations/*/endpoints/*}\022\276\001\n" + + "\016ListMcpServers\0224.google.cloud.agentregistry.v1.ListMcpServersRequest\0325" + + ".google.cloud.agentregistry.v1.ListMcpSe" + + "rversResponse\"?\332A\006parent\202\323\344\223\0020\022./v1/{par" + + "ent=projects/*/locations/*}/mcpServers\022\316\001\n" + + "\020SearchMcpServers\0226.google.cloud.agent" + + "registry.v1.SearchMcpServersRequest\0327.google.cloud.agentregistry.v1.SearchMcpSer" + + "versResponse\"I\332A\006parent\202\323\344\223\002:\"5/v1/{pare" + + "nt=projects/*/locations/*}/mcpServers:search:\001*\022\253\001\n" + + "\014GetMcpServer\0222.google.cloud.agentregistry.v1.GetMcpServerRequest\032(.g" + + "oogle.cloud.agentregistry.v1.McpServer\"=" + + "\332A\004name\202\323\344\223\0020\022./v1/{name=projects/*/locations/*/mcpServers/*}\022\266\001\n" + + "\014ListServices\0222.google.cloud.agentregistry.v1.ListServi" + + "cesRequest\0323.google.cloud.agentregistry." + + "v1.ListServicesResponse\"=\332A\006parent\202\323\344\223\002." + + "\022,/v1/{parent=projects/*/locations/*}/services\022\243\001\n\n" + + "GetService\0220.google.cloud.agentregistry.v1.GetServiceRequest\032&.google" + + ".cloud.agentregistry.v1.Service\";\332A\004name" + + "\202\323\344\223\002.\022,/v1/{name=projects/*/locations/*/services/*}\022\335\001\n\r" + + "CreateService\0223.google." + + "cloud.agentregistry.v1.CreateServiceRequest\032\035.google.longrunning.Operation\"x\312A\034\n" + + "\007Service\022\021OperationMetadata\332A\031parent,ser" + + "vice,service_id\202\323\344\223\0027\",/v1/{parent=projects/*/locations/*}/services:\007service\022\337\001\n" + + "\r" + + "UpdateService\0223.google.cloud.agentregis" + + "try.v1.UpdateServiceRequest\032\035.google.longrunning.Operation\"z\312A\034\n" + + "\007Service\022\021OperationMetadata\332A\023service,update_mask\202\323\344\223\002?2" + + "4/v1/{service.name=projects/*/locations/*/services/*}:\007service\022\315\001\n\r" + + "DeleteService\0223.google.cloud.agentregistry.v1.DeleteS" + + "erviceRequest\032\035.google.longrunning.Operation\"h\312A*\n" + + "\025google.protobuf.Empty\022\021Operat" + + "ionMetadata\332A\004name\202\323\344\223\002.*,/v1/{name=projects/*/locations/*/services/*}\022\266\001\n" + + "\014ListBindings\0222.google.cloud.agentregistry.v1." + + "ListBindingsRequest\0323.google.cloud.agent" + + "registry.v1.ListBindingsResponse\"=\332A\006par" + + "ent\202\323\344\223\002.\022,/v1/{parent=projects/*/locations/*}/bindings\022\243\001\n\n" + + "GetBinding\0220.google.cloud.agentregistry.v1.GetBindingRequest" + + "\032&.google.cloud.agentregistry.v1.Binding" + + "\";\332A\004name\202\323\344\223\002.\022,/v1/{name=projects/*/locations/*/bindings/*}\022\335\001\n\r" + + "CreateBinding\0223.google.cloud.agentregistry.v1.CreateBi" + + "ndingRequest\032\035.google.longrunning.Operation\"x\312A\034\n" + + "\007Binding\022\021OperationMetadata\332A\031p" + + "arent,binding,binding_id\202\323\344\223\0027\",/v1/{par" + + "ent=projects/*/locations/*}/bindings:\007binding\022\337\001\n\r" + + "UpdateBinding\0223.google.cloud.a" + + "gentregistry.v1.UpdateBindingRequest\032\035.google.longrunning.Operation\"z\312A\034\n" + + "\007Binding\022\021OperationMetadata\332A\023binding,update_ma" + + "sk\202\323\344\223\002?24/v1/{binding.name=projects/*/locations/*/bindings/*}:\007binding\022\315\001\n\r" + + "DeleteBinding\0223.google.cloud.agentregistry.v" + + "1.DeleteBindingRequest\032\035.google.longrunning.Operation\"h\312A*\n" + + "\025google.protobuf.Empt" + + "y\022\021OperationMetadata\332A\004name\202\323\344\223\002.*,/v1/{" + + "name=projects/*/locations/*/bindings/*}\022\343\001\n" + + "\026FetchAvailableBindings\022<.google.cloud.agentregistry.v1.FetchAvailableBinding" + + "sRequest\032=.google.cloud.agentregistry.v1" + + ".FetchAvailableBindingsResponse\"L\332A\006pare" + + "nt\202\323\344\223\002=\022;/v1/{parent=projects/*/locatio" + + "ns/*}/bindings:fetchAvailable\032\373\001\312A\034agent" + + "registry.googleapis.com\322A\330\001https://www.g" + + "oogleapis.com/auth/agentregistry.read-only,https://www.googleapis.com/auth/agent" + + "registry.read-write,https://www.googleapis.com/auth/cloud-platform,https://www.g" + + "oogleapis.com/auth/cloud-platform.read-onlyB\354\001\n" + + "!com.google.cloud.agentregistry.v1B\031AgentRegistryServiceProtoP\001ZGcloud.go" + + "ogle.com/go/agentregistry/apiv1/agentreg" + + "istrypb;agentregistrypb\252\002\035Google.Cloud.A" + + "gentRegistry.V1\312\002\035Google\\Cloud\\AgentRegistry\\V1\352\002" + + " Google::Cloud::AgentRegistry::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.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.agentregistry.v1.AgentProto.getDescriptor(), + com.google.cloud.agentregistry.v1.BindingProto.getDescriptor(), + com.google.cloud.agentregistry.v1.EndpointProto.getDescriptor(), + com.google.cloud.agentregistry.v1.McpServerProto.getDescriptor(), + com.google.cloud.agentregistry.v1.ServiceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_agentregistry_v1_ListAgentsRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_agentregistry_v1_ListAgentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListAgentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_descriptor, + new java.lang.String[] { + "Agents", "NextPageToken", + }); + internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_descriptor, + new java.lang.String[] { + "Parent", "SearchString", "PageSize", "PageToken", + }); + internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_descriptor, + new java.lang.String[] { + "Agents", "NextPageToken", + }); + internal_static_google_cloud_agentregistry_v1_GetAgentRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_agentregistry_v1_GetAgentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_GetAgentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_descriptor, + new java.lang.String[] { + "Endpoints", "NextPageToken", + }); + internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_descriptor, + new java.lang.String[] { + "McpServers", "NextPageToken", + }); + internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_descriptor, + new java.lang.String[] { + "Parent", "SearchString", "PageSize", "PageToken", + }); + internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_descriptor, + new java.lang.String[] { + "McpServers", "NextPageToken", + }); + internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_agentregistry_v1_ListServicesRequest_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_cloud_agentregistry_v1_ListServicesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListServicesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_agentregistry_v1_ListServicesResponse_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_cloud_agentregistry_v1_ListServicesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListServicesResponse_descriptor, + new java.lang.String[] { + "Services", "NextPageToken", + }); + internal_static_google_cloud_agentregistry_v1_GetServiceRequest_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_cloud_agentregistry_v1_GetServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_GetServiceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_descriptor, + new java.lang.String[] { + "Parent", "ServiceId", "Service", "RequestId", + }); + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_descriptor, + new java.lang.String[] { + "SourceIdentifier", + "TargetIdentifier", + "Parent", + "PageSize", + "PageToken", + "Source", + "Target", + }); + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_descriptor, + new java.lang.String[] { + "Bindings", "NextPageToken", + }); + internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Service", "RequestId", + }); + internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_descriptor = + getDescriptor().getMessageType(20); + internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_agentregistry_v1_OperationMetadata_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_cloud_agentregistry_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_descriptor = + getDescriptor().getMessageType(22); + internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_descriptor = + getDescriptor().getMessageType(23); + internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_descriptor, + new java.lang.String[] { + "Bindings", "NextPageToken", + }); + internal_static_google_cloud_agentregistry_v1_GetBindingRequest_descriptor = + getDescriptor().getMessageType(24); + internal_static_google_cloud_agentregistry_v1_GetBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_GetBindingRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_descriptor = + getDescriptor().getMessageType(25); + internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_descriptor, + new java.lang.String[] { + "Parent", "BindingId", "Binding", "RequestId", + }); + internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_descriptor = + getDescriptor().getMessageType(26); + internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_descriptor, + new java.lang.String[] { + "Binding", "UpdateMask", "RequestId", + }); + internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_descriptor = + getDescriptor().getMessageType(27); + internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.agentregistry.v1.AgentProto.getDescriptor(); + com.google.cloud.agentregistry.v1.BindingProto.getDescriptor(); + com.google.cloud.agentregistry.v1.EndpointProto.getDescriptor(); + com.google.cloud.agentregistry.v1.McpServerProto.getDescriptor(); + com.google.cloud.agentregistry.v1.ServiceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.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.FieldInfoProto.fieldInfo); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Binding.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Binding.java new file mode 100644 index 000000000000..17eebb199675 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Binding.java @@ -0,0 +1,5460 @@ +/* + * 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/agentregistry/v1/binding.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Represents a user-defined Binding.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Binding} + */ +@com.google.protobuf.Generated +public final class Binding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Binding) + BindingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Binding"); + } + + // Use Binding.newBuilder() to construct. + private Binding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Binding() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Binding.class, + com.google.cloud.agentregistry.v1.Binding.Builder.class); + } + + public interface SourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Binding.Source) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return Whether the identifier field is set. + */ + boolean hasIdentifier(); + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return The identifier. + */ + java.lang.String getIdentifier(); + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return The bytes for identifier. + */ + com.google.protobuf.ByteString getIdentifierBytes(); + + com.google.cloud.agentregistry.v1.Binding.Source.SourceTypeCase getSourceTypeCase(); + } + + /** + * + * + *
+   * The source of the Binding.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Binding.Source} + */ + public static final class Source extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Binding.Source) + SourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Source"); + } + + // Use Source.newBuilder() to construct. + private Source(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Source() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Source_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Binding.Source.class, + com.google.cloud.agentregistry.v1.Binding.Source.Builder.class); + } + + private int sourceTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sourceType_; + + public enum SourceTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IDENTIFIER(1), + SOURCETYPE_NOT_SET(0); + private final int value; + + private SourceTypeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceTypeCase valueOf(int value) { + return forNumber(value); + } + + public static SourceTypeCase forNumber(int value) { + switch (value) { + case 1: + return IDENTIFIER; + case 0: + return SOURCETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceTypeCase getSourceTypeCase() { + return SourceTypeCase.forNumber(sourceTypeCase_); + } + + public static final int IDENTIFIER_FIELD_NUMBER = 1; + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return Whether the identifier field is set. + */ + public boolean hasIdentifier() { + return sourceTypeCase_ == 1; + } + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return The identifier. + */ + public java.lang.String getIdentifier() { + java.lang.Object ref = ""; + if (sourceTypeCase_ == 1) { + ref = sourceType_; + } + 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(); + if (sourceTypeCase_ == 1) { + sourceType_ = s; + } + return s; + } + } + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return The bytes for identifier. + */ + public com.google.protobuf.ByteString getIdentifierBytes() { + java.lang.Object ref = ""; + if (sourceTypeCase_ == 1) { + ref = sourceType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceTypeCase_ == 1) { + sourceType_ = 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 (sourceTypeCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, sourceType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceTypeCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sourceType_); + } + 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.agentregistry.v1.Binding.Source)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Binding.Source other = + (com.google.cloud.agentregistry.v1.Binding.Source) obj; + + if (!getSourceTypeCase().equals(other.getSourceTypeCase())) return false; + switch (sourceTypeCase_) { + case 1: + if (!getIdentifier().equals(other.getIdentifier())) return false; + break; + case 0: + default: + } + 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(); + switch (sourceTypeCase_) { + case 1: + hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getIdentifier().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Binding.Source parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding.Source 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.agentregistry.v1.Binding.Source parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding.Source 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.agentregistry.v1.Binding.Source parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding.Source parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Binding.Source parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding.Source 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.agentregistry.v1.Binding.Source parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding.Source 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.agentregistry.v1.Binding.Source parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding.Source 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.agentregistry.v1.Binding.Source 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; + } + + /** + * + * + *
+     * The source of the Binding.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Binding.Source} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Binding.Source) + com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Source_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Binding.Source.class, + com.google.cloud.agentregistry.v1.Binding.Source.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Binding.Source.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sourceTypeCase_ = 0; + sourceType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Source_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.Source getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Binding.Source.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.Source build() { + com.google.cloud.agentregistry.v1.Binding.Source result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.Source buildPartial() { + com.google.cloud.agentregistry.v1.Binding.Source result = + new com.google.cloud.agentregistry.v1.Binding.Source(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Binding.Source result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.agentregistry.v1.Binding.Source result) { + result.sourceTypeCase_ = sourceTypeCase_; + result.sourceType_ = this.sourceType_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Binding.Source) { + return mergeFrom((com.google.cloud.agentregistry.v1.Binding.Source) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Binding.Source other) { + if (other == com.google.cloud.agentregistry.v1.Binding.Source.getDefaultInstance()) + return this; + switch (other.getSourceTypeCase()) { + case IDENTIFIER: + { + sourceTypeCase_ = 1; + sourceType_ = other.sourceType_; + onChanged(); + break; + } + case SOURCETYPE_NOT_SET: + { + break; + } + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceTypeCase_ = 1; + sourceType_ = s; + 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 sourceTypeCase_ = 0; + private java.lang.Object sourceType_; + + public SourceTypeCase getSourceTypeCase() { + return SourceTypeCase.forNumber(sourceTypeCase_); + } + + public Builder clearSourceType() { + sourceTypeCase_ = 0; + sourceType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * The identifier of the source Agent.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @return Whether the identifier field is set. + */ + @java.lang.Override + public boolean hasIdentifier() { + return sourceTypeCase_ == 1; + } + + /** + * + * + *
+       * The identifier of the source Agent.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @return The identifier. + */ + @java.lang.Override + public java.lang.String getIdentifier() { + java.lang.Object ref = ""; + if (sourceTypeCase_ == 1) { + ref = sourceType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceTypeCase_ == 1) { + sourceType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The identifier of the source Agent.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @return The bytes for identifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentifierBytes() { + java.lang.Object ref = ""; + if (sourceTypeCase_ == 1) { + ref = sourceType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceTypeCase_ == 1) { + sourceType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The identifier of the source Agent.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @param value The identifier to set. + * @return This builder for chaining. + */ + public Builder setIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceTypeCase_ = 1; + sourceType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * The identifier of the source Agent.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @return This builder for chaining. + */ + public Builder clearIdentifier() { + if (sourceTypeCase_ == 1) { + sourceTypeCase_ = 0; + sourceType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The identifier of the source Agent.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @param value The bytes for identifier to set. + * @return This builder for chaining. + */ + public Builder setIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceTypeCase_ = 1; + sourceType_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Binding.Source) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Binding.Source) + private static final com.google.cloud.agentregistry.v1.Binding.Source DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Binding.Source(); + } + + public static com.google.cloud.agentregistry.v1.Binding.Source getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Source 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.agentregistry.v1.Binding.Source getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TargetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Binding.Target) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return Whether the identifier field is set. + */ + boolean hasIdentifier(); + + /** + * + * + *
+     * The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return The identifier. + */ + java.lang.String getIdentifier(); + + /** + * + * + *
+     * The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return The bytes for identifier. + */ + com.google.protobuf.ByteString getIdentifierBytes(); + + com.google.cloud.agentregistry.v1.Binding.Target.TargetTypeCase getTargetTypeCase(); + } + + /** + * + * + *
+   * The target of the Binding.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Binding.Target} + */ + public static final class Target extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Binding.Target) + TargetOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Target"); + } + + // Use Target.newBuilder() to construct. + private Target(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Target() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Target_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Binding.Target.class, + com.google.cloud.agentregistry.v1.Binding.Target.Builder.class); + } + + private int targetTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object targetType_; + + public enum TargetTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IDENTIFIER(1), + TARGETTYPE_NOT_SET(0); + private final int value; + + private TargetTypeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetTypeCase valueOf(int value) { + return forNumber(value); + } + + public static TargetTypeCase forNumber(int value) { + switch (value) { + case 1: + return IDENTIFIER; + case 0: + return TARGETTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetTypeCase getTargetTypeCase() { + return TargetTypeCase.forNumber(targetTypeCase_); + } + + public static final int IDENTIFIER_FIELD_NUMBER = 1; + + /** + * + * + *
+     * The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return Whether the identifier field is set. + */ + public boolean hasIdentifier() { + return targetTypeCase_ == 1; + } + + /** + * + * + *
+     * The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return The identifier. + */ + public java.lang.String getIdentifier() { + java.lang.Object ref = ""; + if (targetTypeCase_ == 1) { + ref = targetType_; + } + 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(); + if (targetTypeCase_ == 1) { + targetType_ = s; + } + return s; + } + } + + /** + * + * + *
+     * The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string identifier = 1; + * + * @return The bytes for identifier. + */ + public com.google.protobuf.ByteString getIdentifierBytes() { + java.lang.Object ref = ""; + if (targetTypeCase_ == 1) { + ref = targetType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetTypeCase_ == 1) { + targetType_ = 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 (targetTypeCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, targetType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetTypeCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, targetType_); + } + 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.agentregistry.v1.Binding.Target)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Binding.Target other = + (com.google.cloud.agentregistry.v1.Binding.Target) obj; + + if (!getTargetTypeCase().equals(other.getTargetTypeCase())) return false; + switch (targetTypeCase_) { + case 1: + if (!getIdentifier().equals(other.getIdentifier())) return false; + break; + case 0: + default: + } + 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(); + switch (targetTypeCase_) { + case 1: + hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getIdentifier().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Binding.Target parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding.Target 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.agentregistry.v1.Binding.Target parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding.Target 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.agentregistry.v1.Binding.Target parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding.Target parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Binding.Target parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding.Target 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.agentregistry.v1.Binding.Target parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding.Target 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.agentregistry.v1.Binding.Target parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding.Target 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.agentregistry.v1.Binding.Target 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; + } + + /** + * + * + *
+     * The target of the Binding.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Binding.Target} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Binding.Target) + com.google.cloud.agentregistry.v1.Binding.TargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Target_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Binding.Target.class, + com.google.cloud.agentregistry.v1.Binding.Target.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Binding.Target.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetTypeCase_ = 0; + targetType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_Target_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.Target getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Binding.Target.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.Target build() { + com.google.cloud.agentregistry.v1.Binding.Target result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.Target buildPartial() { + com.google.cloud.agentregistry.v1.Binding.Target result = + new com.google.cloud.agentregistry.v1.Binding.Target(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Binding.Target result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.agentregistry.v1.Binding.Target result) { + result.targetTypeCase_ = targetTypeCase_; + result.targetType_ = this.targetType_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Binding.Target) { + return mergeFrom((com.google.cloud.agentregistry.v1.Binding.Target) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Binding.Target other) { + if (other == com.google.cloud.agentregistry.v1.Binding.Target.getDefaultInstance()) + return this; + switch (other.getTargetTypeCase()) { + case IDENTIFIER: + { + targetTypeCase_ = 1; + targetType_ = other.targetType_; + onChanged(); + break; + } + case TARGETTYPE_NOT_SET: + { + break; + } + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + targetTypeCase_ = 1; + targetType_ = s; + 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 targetTypeCase_ = 0; + private java.lang.Object targetType_; + + public TargetTypeCase getTargetTypeCase() { + return TargetTypeCase.forNumber(targetTypeCase_); + } + + public Builder clearTargetType() { + targetTypeCase_ = 0; + targetType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * The identifier of the target Agent, MCP Server, or Endpoint.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * * `urn:mcp:{publisher}:{namespace}:{name}`
+       * * `urn:endpoint:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @return Whether the identifier field is set. + */ + @java.lang.Override + public boolean hasIdentifier() { + return targetTypeCase_ == 1; + } + + /** + * + * + *
+       * The identifier of the target Agent, MCP Server, or Endpoint.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * * `urn:mcp:{publisher}:{namespace}:{name}`
+       * * `urn:endpoint:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @return The identifier. + */ + @java.lang.Override + public java.lang.String getIdentifier() { + java.lang.Object ref = ""; + if (targetTypeCase_ == 1) { + ref = targetType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetTypeCase_ == 1) { + targetType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The identifier of the target Agent, MCP Server, or Endpoint.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * * `urn:mcp:{publisher}:{namespace}:{name}`
+       * * `urn:endpoint:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @return The bytes for identifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentifierBytes() { + java.lang.Object ref = ""; + if (targetTypeCase_ == 1) { + ref = targetType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetTypeCase_ == 1) { + targetType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The identifier of the target Agent, MCP Server, or Endpoint.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * * `urn:mcp:{publisher}:{namespace}:{name}`
+       * * `urn:endpoint:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @param value The identifier to set. + * @return This builder for chaining. + */ + public Builder setIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetTypeCase_ = 1; + targetType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * The identifier of the target Agent, MCP Server, or Endpoint.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * * `urn:mcp:{publisher}:{namespace}:{name}`
+       * * `urn:endpoint:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @return This builder for chaining. + */ + public Builder clearIdentifier() { + if (targetTypeCase_ == 1) { + targetTypeCase_ = 0; + targetType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The identifier of the target Agent, MCP Server, or Endpoint.
+       * Format:
+       *
+       * * `urn:agent:{publisher}:{namespace}:{name}`
+       * * `urn:mcp:{publisher}:{namespace}:{name}`
+       * * `urn:endpoint:{publisher}:{namespace}:{name}`
+       * 
+ * + * string identifier = 1; + * + * @param value The bytes for identifier to set. + * @return This builder for chaining. + */ + public Builder setIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetTypeCase_ = 1; + targetType_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Binding.Target) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Binding.Target) + private static final com.google.cloud.agentregistry.v1.Binding.Target DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Binding.Target(); + } + + public static com.google.cloud.agentregistry.v1.Binding.Target getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Target 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.agentregistry.v1.Binding.Target getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AuthProviderBindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Binding.AuthProviderBinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the target AuthProvider.
+     * Format:
+     *
+     * * `projects/{project}/locations/{location}/authProviders/{auth_provider}`
+     * 
+ * + * string auth_provider = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authProvider. + */ + java.lang.String getAuthProvider(); + + /** + * + * + *
+     * Required. The resource name of the target AuthProvider.
+     * Format:
+     *
+     * * `projects/{project}/locations/{location}/authProviders/{auth_provider}`
+     * 
+ * + * string auth_provider = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authProvider. + */ + com.google.protobuf.ByteString getAuthProviderBytes(); + + /** + * + * + *
+     * Optional. The list of OAuth2 scopes of the AuthProvider.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + java.util.List getScopesList(); + + /** + * + * + *
+     * Optional. The list of OAuth2 scopes of the AuthProvider.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + int getScopesCount(); + + /** + * + * + *
+     * Optional. The list of OAuth2 scopes of the AuthProvider.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + java.lang.String getScopes(int index); + + /** + * + * + *
+     * Optional. The list of OAuth2 scopes of the AuthProvider.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + com.google.protobuf.ByteString getScopesBytes(int index); + + /** + * + * + *
+     * Optional. The continue URI of the AuthProvider.
+     * The URI is used to reauthenticate the user and finalize the managed OAuth
+     * flow.
+     * 
+ * + * string continue_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The continueUri. + */ + java.lang.String getContinueUri(); + + /** + * + * + *
+     * Optional. The continue URI of the AuthProvider.
+     * The URI is used to reauthenticate the user and finalize the managed OAuth
+     * flow.
+     * 
+ * + * string continue_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for continueUri. + */ + com.google.protobuf.ByteString getContinueUriBytes(); + } + + /** + * + * + *
+   * The AuthProvider of the Binding.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Binding.AuthProviderBinding} + */ + public static final class AuthProviderBinding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Binding.AuthProviderBinding) + AuthProviderBindingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuthProviderBinding"); + } + + // Use AuthProviderBinding.newBuilder() to construct. + private AuthProviderBinding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AuthProviderBinding() { + authProvider_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + continueUri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.class, + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.Builder.class); + } + + public static final int AUTH_PROVIDER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object authProvider_ = ""; + + /** + * + * + *
+     * Required. The resource name of the target AuthProvider.
+     * Format:
+     *
+     * * `projects/{project}/locations/{location}/authProviders/{auth_provider}`
+     * 
+ * + * string auth_provider = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authProvider. + */ + @java.lang.Override + public java.lang.String getAuthProvider() { + java.lang.Object ref = authProvider_; + 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(); + authProvider_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The resource name of the target AuthProvider.
+     * Format:
+     *
+     * * `projects/{project}/locations/{location}/authProviders/{auth_provider}`
+     * 
+ * + * string auth_provider = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authProvider. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthProviderBytes() { + java.lang.Object ref = authProvider_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authProvider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Optional. The list of OAuth2 scopes of the AuthProvider.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_; + } + + /** + * + * + *
+     * Optional. The list of OAuth2 scopes of the AuthProvider.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+     * Optional. The list of OAuth2 scopes of the AuthProvider.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+     * Optional. The list of OAuth2 scopes of the AuthProvider.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + public static final int CONTINUE_URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object continueUri_ = ""; + + /** + * + * + *
+     * Optional. The continue URI of the AuthProvider.
+     * The URI is used to reauthenticate the user and finalize the managed OAuth
+     * flow.
+     * 
+ * + * string continue_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The continueUri. + */ + @java.lang.Override + public java.lang.String getContinueUri() { + java.lang.Object ref = continueUri_; + 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(); + continueUri_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The continue URI of the AuthProvider.
+     * The URI is used to reauthenticate the user and finalize the managed OAuth
+     * flow.
+     * 
+ * + * string continue_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for continueUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContinueUriBytes() { + java.lang.Object ref = continueUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + continueUri_ = 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(authProvider_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, authProvider_); + } + for (int i = 0; i < scopes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, scopes_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(continueUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, continueUri_); + } + 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(authProvider_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, authProvider_); + } + { + int dataSize = 0; + for (int i = 0; i < scopes_.size(); i++) { + dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopesList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(continueUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, continueUri_); + } + 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.agentregistry.v1.Binding.AuthProviderBinding)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding other = + (com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) obj; + + if (!getAuthProvider().equals(other.getAuthProvider())) return false; + if (!getScopesList().equals(other.getScopesList())) return false; + if (!getContinueUri().equals(other.getContinueUri())) 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) + AUTH_PROVIDER_FIELD_NUMBER; + hash = (53 * hash) + getAuthProvider().hashCode(); + if (getScopesCount() > 0) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopesList().hashCode(); + } + hash = (37 * hash) + CONTINUE_URI_FIELD_NUMBER; + hash = (53 * hash) + getContinueUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding 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.agentregistry.v1.Binding.AuthProviderBinding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding 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.agentregistry.v1.Binding.AuthProviderBinding parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding 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.agentregistry.v1.Binding.AuthProviderBinding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding 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.agentregistry.v1.Binding.AuthProviderBinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding 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.agentregistry.v1.Binding.AuthProviderBinding 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; + } + + /** + * + * + *
+     * The AuthProvider of the Binding.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Binding.AuthProviderBinding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Binding.AuthProviderBinding) + com.google.cloud.agentregistry.v1.Binding.AuthProviderBindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.class, + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + authProvider_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + continueUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding + getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding build() { + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding buildPartial() { + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding result = + new com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.authProvider_ = authProvider_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + scopes_.makeImmutable(); + result.scopes_ = scopes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.continueUri_ = continueUri_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) { + return mergeFrom((com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding other) { + if (other + == com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.getDefaultInstance()) + return this; + if (!other.getAuthProvider().isEmpty()) { + authProvider_ = other.authProvider_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.scopes_.isEmpty()) { + if (scopes_.isEmpty()) { + scopes_ = other.scopes_; + bitField0_ |= 0x00000002; + } else { + ensureScopesIsMutable(); + scopes_.addAll(other.scopes_); + } + onChanged(); + } + if (!other.getContinueUri().isEmpty()) { + continueUri_ = other.continueUri_; + 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: + { + authProvider_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + break; + } // case 18 + case 26: + { + continueUri_ = 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 authProvider_ = ""; + + /** + * + * + *
+       * Required. The resource name of the target AuthProvider.
+       * Format:
+       *
+       * * `projects/{project}/locations/{location}/authProviders/{auth_provider}`
+       * 
+ * + * string auth_provider = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authProvider. + */ + public java.lang.String getAuthProvider() { + java.lang.Object ref = authProvider_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authProvider_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The resource name of the target AuthProvider.
+       * Format:
+       *
+       * * `projects/{project}/locations/{location}/authProviders/{auth_provider}`
+       * 
+ * + * string auth_provider = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authProvider. + */ + public com.google.protobuf.ByteString getAuthProviderBytes() { + java.lang.Object ref = authProvider_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authProvider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The resource name of the target AuthProvider.
+       * Format:
+       *
+       * * `projects/{project}/locations/{location}/authProviders/{auth_provider}`
+       * 
+ * + * string auth_provider = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The authProvider to set. + * @return This builder for chaining. + */ + public Builder setAuthProvider(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + authProvider_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The resource name of the target AuthProvider.
+       * Format:
+       *
+       * * `projects/{project}/locations/{location}/authProviders/{auth_provider}`
+       * 
+ * + * string auth_provider = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAuthProvider() { + authProvider_ = getDefaultInstance().getAuthProvider(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The resource name of the target AuthProvider.
+       * Format:
+       *
+       * * `projects/{project}/locations/{location}/authProviders/{auth_provider}`
+       * 
+ * + * string auth_provider = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for authProvider to set. + * @return This builder for chaining. + */ + public Builder setAuthProviderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + authProvider_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureScopesIsMutable() { + if (!scopes_.isModifiable()) { + scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+       * Optional. The list of OAuth2 scopes of the AuthProvider.
+       * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + scopes_.makeImmutable(); + return scopes_; + } + + /** + * + * + *
+       * Optional. The list of OAuth2 scopes of the AuthProvider.
+       * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+       * Optional. The list of OAuth2 scopes of the AuthProvider.
+       * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+       * Optional. The list of OAuth2 scopes of the AuthProvider.
+       * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + /** + * + * + *
+       * Optional. The list of OAuth2 scopes of the AuthProvider.
+       * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The scopes to set. + * @return This builder for chaining. + */ + public Builder setScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The list of OAuth2 scopes of the AuthProvider.
+       * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The scopes to add. + * @return This builder for chaining. + */ + public Builder addScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The list of OAuth2 scopes of the AuthProvider.
+       * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The scopes to add. + * @return This builder for chaining. + */ + public Builder addAllScopes(java.lang.Iterable values) { + ensureScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The list of OAuth2 scopes of the AuthProvider.
+       * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearScopes() { + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The list of OAuth2 scopes of the AuthProvider.
+       * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the scopes to add. + * @return This builder for chaining. + */ + public Builder addScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object continueUri_ = ""; + + /** + * + * + *
+       * Optional. The continue URI of the AuthProvider.
+       * The URI is used to reauthenticate the user and finalize the managed OAuth
+       * flow.
+       * 
+ * + * string continue_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The continueUri. + */ + public java.lang.String getContinueUri() { + java.lang.Object ref = continueUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + continueUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The continue URI of the AuthProvider.
+       * The URI is used to reauthenticate the user and finalize the managed OAuth
+       * flow.
+       * 
+ * + * string continue_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for continueUri. + */ + public com.google.protobuf.ByteString getContinueUriBytes() { + java.lang.Object ref = continueUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + continueUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The continue URI of the AuthProvider.
+       * The URI is used to reauthenticate the user and finalize the managed OAuth
+       * flow.
+       * 
+ * + * string continue_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The continueUri to set. + * @return This builder for chaining. + */ + public Builder setContinueUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + continueUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The continue URI of the AuthProvider.
+       * The URI is used to reauthenticate the user and finalize the managed OAuth
+       * flow.
+       * 
+ * + * string continue_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearContinueUri() { + continueUri_ = getDefaultInstance().getContinueUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The continue URI of the AuthProvider.
+       * The URI is used to reauthenticate the user and finalize the managed OAuth
+       * flow.
+       * 
+ * + * string continue_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for continueUri to set. + * @return This builder for chaining. + */ + public Builder setContinueUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + continueUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Binding.AuthProviderBinding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Binding.AuthProviderBinding) + private static final com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding(); + } + + public static com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthProviderBinding 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.agentregistry.v1.Binding.AuthProviderBinding + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int bindingCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object binding_; + + public enum BindingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AUTH_PROVIDER_BINDING(6), + BINDING_NOT_SET(0); + private final int value; + + private BindingCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BindingCase valueOf(int value) { + return forNumber(value); + } + + public static BindingCase forNumber(int value) { + switch (value) { + case 6: + return AUTH_PROVIDER_BINDING; + case 0: + return BINDING_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BindingCase getBindingCase() { + return BindingCase.forNumber(bindingCase_); + } + + public static final int AUTH_PROVIDER_BINDING_FIELD_NUMBER = 6; + + /** + * + * + *
+   * The binding for AuthProvider.
+   * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + * + * @return Whether the authProviderBinding field is set. + */ + @java.lang.Override + public boolean hasAuthProviderBinding() { + return bindingCase_ == 6; + } + + /** + * + * + *
+   * The binding for AuthProvider.
+   * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + * + * @return The authProviderBinding. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding getAuthProviderBinding() { + if (bindingCase_ == 6) { + return (com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) binding_; + } + return com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.getDefaultInstance(); + } + + /** + * + * + *
+   * The binding for AuthProvider.
+   * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.AuthProviderBindingOrBuilder + getAuthProviderBindingOrBuilder() { + if (bindingCase_ == 6) { + return (com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) binding_; + } + return com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Identifier. The resource name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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. Identifier. The resource name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. User-defined display name for the Binding.
+   * Can have a maximum length of `63` characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. User-defined display name for the Binding.
+   * Can have a maximum length of `63` characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. User-defined description of a Binding.
+   * Can have a maximum length of `2048` characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. User-defined description of a Binding.
+   * Can have a maximum length of `2048` characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 4; + private com.google.cloud.agentregistry.v1.Binding.Source source_; + + /** + * + * + *
+   * Required. The target Agent of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The target Agent of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.Source getSource() { + return source_ == null + ? com.google.cloud.agentregistry.v1.Binding.Source.getDefaultInstance() + : source_; + } + + /** + * + * + *
+   * Required. The target Agent of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder getSourceOrBuilder() { + return source_ == null + ? com.google.cloud.agentregistry.v1.Binding.Source.getDefaultInstance() + : source_; + } + + public static final int TARGET_FIELD_NUMBER = 5; + private com.google.cloud.agentregistry.v1.Binding.Target target_; + + /** + * + * + *
+   * Required. The target Agent Registry Resource of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The target Agent Registry Resource of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.Target getTarget() { + return target_ == null + ? com.google.cloud.agentregistry.v1.Binding.Target.getDefaultInstance() + : target_; + } + + /** + * + * + *
+   * Required. The target Agent Registry Resource of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.TargetOrBuilder getTargetOrBuilder() { + return target_ == null + ? com.google.cloud.agentregistry.v1.Binding.Target.getDefaultInstance() + : target_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Timestamp when this binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp when this binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Timestamp when this binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Timestamp when this binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp when this binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Timestamp when this binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getSource()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getTarget()); + } + if (bindingCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) binding_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(8, getUpdateTime()); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSource()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTarget()); + } + if (bindingCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) binding_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + 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.agentregistry.v1.Binding)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Binding other = + (com.google.cloud.agentregistry.v1.Binding) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getBindingCase().equals(other.getBindingCase())) return false; + switch (bindingCase_) { + case 6: + if (!getAuthProviderBinding().equals(other.getAuthProviderBinding())) return false; + break; + case 0: + default: + } + 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 = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (bindingCase_) { + case 6: + hash = (37 * hash) + AUTH_PROVIDER_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getAuthProviderBinding().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Binding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding 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.agentregistry.v1.Binding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding 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.agentregistry.v1.Binding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Binding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Binding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding 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.agentregistry.v1.Binding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding 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.agentregistry.v1.Binding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Binding 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.agentregistry.v1.Binding 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; + } + + /** + * + * + *
+   * Represents a user-defined Binding.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Binding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Binding) + com.google.cloud.agentregistry.v1.BindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Binding.class, + com.google.cloud.agentregistry.v1.Binding.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Binding.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSourceFieldBuilder(); + internalGetTargetFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (authProviderBindingBuilder_ != null) { + authProviderBindingBuilder_.clear(); + } + name_ = ""; + displayName_ = ""; + description_ = ""; + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + target_ = null; + if (targetBuilder_ != null) { + targetBuilder_.dispose(); + targetBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + bindingCase_ = 0; + binding_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.BindingProto + .internal_static_google_cloud_agentregistry_v1_Binding_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Binding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding build() { + com.google.cloud.agentregistry.v1.Binding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding buildPartial() { + com.google.cloud.agentregistry.v1.Binding result = + new com.google.cloud.agentregistry.v1.Binding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Binding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.source_ = sourceBuilder_ == null ? source_ : sourceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.target_ = targetBuilder_ == null ? target_ : targetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.agentregistry.v1.Binding result) { + result.bindingCase_ = bindingCase_; + result.binding_ = this.binding_; + if (bindingCase_ == 6 && authProviderBindingBuilder_ != null) { + result.binding_ = authProviderBindingBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Binding) { + return mergeFrom((com.google.cloud.agentregistry.v1.Binding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Binding other) { + if (other == com.google.cloud.agentregistry.v1.Binding.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getBindingCase()) { + case AUTH_PROVIDER_BINDING: + { + mergeAuthProviderBinding(other.getAuthProviderBinding()); + break; + } + case BINDING_NOT_SET: + { + break; + } + } + 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_ |= 0x00000002; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + input.readMessage(internalGetTargetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetAuthProviderBindingFieldBuilder().getBuilder(), extensionRegistry); + bindingCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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 bindingCase_ = 0; + private java.lang.Object binding_; + + public BindingCase getBindingCase() { + return BindingCase.forNumber(bindingCase_); + } + + public Builder clearBinding() { + bindingCase_ = 0; + binding_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding, + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.Builder, + com.google.cloud.agentregistry.v1.Binding.AuthProviderBindingOrBuilder> + authProviderBindingBuilder_; + + /** + * + * + *
+     * The binding for AuthProvider.
+     * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + * + * @return Whether the authProviderBinding field is set. + */ + @java.lang.Override + public boolean hasAuthProviderBinding() { + return bindingCase_ == 6; + } + + /** + * + * + *
+     * The binding for AuthProvider.
+     * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + * + * @return The authProviderBinding. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding getAuthProviderBinding() { + if (authProviderBindingBuilder_ == null) { + if (bindingCase_ == 6) { + return (com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) binding_; + } + return com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.getDefaultInstance(); + } else { + if (bindingCase_ == 6) { + return authProviderBindingBuilder_.getMessage(); + } + return com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The binding for AuthProvider.
+     * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + */ + public Builder setAuthProviderBinding( + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding value) { + if (authProviderBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + binding_ = value; + onChanged(); + } else { + authProviderBindingBuilder_.setMessage(value); + } + bindingCase_ = 6; + return this; + } + + /** + * + * + *
+     * The binding for AuthProvider.
+     * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + */ + public Builder setAuthProviderBinding( + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.Builder builderForValue) { + if (authProviderBindingBuilder_ == null) { + binding_ = builderForValue.build(); + onChanged(); + } else { + authProviderBindingBuilder_.setMessage(builderForValue.build()); + } + bindingCase_ = 6; + return this; + } + + /** + * + * + *
+     * The binding for AuthProvider.
+     * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + */ + public Builder mergeAuthProviderBinding( + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding value) { + if (authProviderBindingBuilder_ == null) { + if (bindingCase_ == 6 + && binding_ + != com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding + .getDefaultInstance()) { + binding_ = + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.newBuilder( + (com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) binding_) + .mergeFrom(value) + .buildPartial(); + } else { + binding_ = value; + } + onChanged(); + } else { + if (bindingCase_ == 6) { + authProviderBindingBuilder_.mergeFrom(value); + } else { + authProviderBindingBuilder_.setMessage(value); + } + } + bindingCase_ = 6; + return this; + } + + /** + * + * + *
+     * The binding for AuthProvider.
+     * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + */ + public Builder clearAuthProviderBinding() { + if (authProviderBindingBuilder_ == null) { + if (bindingCase_ == 6) { + bindingCase_ = 0; + binding_ = null; + onChanged(); + } + } else { + if (bindingCase_ == 6) { + bindingCase_ = 0; + binding_ = null; + } + authProviderBindingBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The binding for AuthProvider.
+     * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + */ + public com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.Builder + getAuthProviderBindingBuilder() { + return internalGetAuthProviderBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The binding for AuthProvider.
+     * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding.AuthProviderBindingOrBuilder + getAuthProviderBindingOrBuilder() { + if ((bindingCase_ == 6) && (authProviderBindingBuilder_ != null)) { + return authProviderBindingBuilder_.getMessageOrBuilder(); + } else { + if (bindingCase_ == 6) { + return (com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) binding_; + } + return com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The binding for AuthProvider.
+     * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding, + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.Builder, + com.google.cloud.agentregistry.v1.Binding.AuthProviderBindingOrBuilder> + internalGetAuthProviderBindingFieldBuilder() { + if (authProviderBindingBuilder_ == null) { + if (!(bindingCase_ == 6)) { + binding_ = + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.getDefaultInstance(); + } + authProviderBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding, + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding.Builder, + com.google.cloud.agentregistry.v1.Binding.AuthProviderBindingOrBuilder>( + (com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding) binding_, + getParentForChildren(), + isClean()); + binding_ = null; + } + bindingCase_ = 6; + onChanged(); + return authProviderBindingBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Identifier. The resource name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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. Identifier. The resource name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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. Identifier. The resource name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. The resource name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. The resource name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. User-defined display name for the Binding.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. User-defined display name for the Binding.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. User-defined display name for the Binding.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined display name for the Binding.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined display name for the Binding.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. User-defined description of a Binding.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. User-defined description of a Binding.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. User-defined description of a Binding.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined description of a Binding.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined description of a Binding.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.agentregistry.v1.Binding.Source source_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding.Source, + com.google.cloud.agentregistry.v1.Binding.Source.Builder, + com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder> + sourceBuilder_; + + /** + * + * + *
+     * Required. The target Agent of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Required. The target Agent of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.agentregistry.v1.Binding.Source getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.agentregistry.v1.Binding.Source.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The target Agent of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.agentregistry.v1.Binding.Source value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + } else { + sourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target Agent of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource( + com.google.cloud.agentregistry.v1.Binding.Source.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target Agent of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource(com.google.cloud.agentregistry.v1.Binding.Source value) { + if (sourceBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && source_ != null + && source_ != com.google.cloud.agentregistry.v1.Binding.Source.getDefaultInstance()) { + getSourceBuilder().mergeFrom(value); + } else { + source_ = value; + } + } else { + sourceBuilder_.mergeFrom(value); + } + if (source_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The target Agent of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000010); + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target Agent of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Binding.Source.Builder getSourceBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The target Agent of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.agentregistry.v1.Binding.Source.getDefaultInstance() + : source_; + } + } + + /** + * + * + *
+     * Required. The target Agent of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding.Source, + com.google.cloud.agentregistry.v1.Binding.Source.Builder, + com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder> + internalGetSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding.Source, + com.google.cloud.agentregistry.v1.Binding.Source.Builder, + com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private com.google.cloud.agentregistry.v1.Binding.Target target_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding.Target, + com.google.cloud.agentregistry.v1.Binding.Target.Builder, + com.google.cloud.agentregistry.v1.Binding.TargetOrBuilder> + targetBuilder_; + + /** + * + * + *
+     * Required. The target Agent Registry Resource of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Required. The target Agent Registry Resource of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + public com.google.cloud.agentregistry.v1.Binding.Target getTarget() { + if (targetBuilder_ == null) { + return target_ == null + ? com.google.cloud.agentregistry.v1.Binding.Target.getDefaultInstance() + : target_; + } else { + return targetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The target Agent Registry Resource of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.cloud.agentregistry.v1.Binding.Target value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + } else { + targetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target Agent Registry Resource of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget( + com.google.cloud.agentregistry.v1.Binding.Target.Builder builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target Agent Registry Resource of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTarget(com.google.cloud.agentregistry.v1.Binding.Target value) { + if (targetBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && target_ != null + && target_ != com.google.cloud.agentregistry.v1.Binding.Target.getDefaultInstance()) { + getTargetBuilder().mergeFrom(value); + } else { + target_ = value; + } + } else { + targetBuilder_.mergeFrom(value); + } + if (target_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The target Agent Registry Resource of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTarget() { + bitField0_ = (bitField0_ & ~0x00000020); + target_ = null; + if (targetBuilder_ != null) { + targetBuilder_.dispose(); + targetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target Agent Registry Resource of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Binding.Target.Builder getTargetBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetTargetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The target Agent Registry Resource of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Binding.TargetOrBuilder getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null + ? com.google.cloud.agentregistry.v1.Binding.Target.getDefaultInstance() + : target_; + } + } + + /** + * + * + *
+     * Required. The target Agent Registry Resource of the Binding.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding.Target, + com.google.cloud.agentregistry.v1.Binding.Target.Builder, + com.google.cloud.agentregistry.v1.Binding.TargetOrBuilder> + internalGetTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding.Target, + com.google.cloud.agentregistry.v1.Binding.Target.Builder, + com.google.cloud.agentregistry.v1.Binding.TargetOrBuilder>( + getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp when this binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp when this binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp when this binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Binding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Binding) + private static final com.google.cloud.agentregistry.v1.Binding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Binding(); + } + + public static com.google.cloud.agentregistry.v1.Binding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Binding 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.agentregistry.v1.Binding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingName.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingName.java new file mode 100644 index 000000000000..1f30c38db2c5 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class BindingName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BINDING = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/bindings/{binding}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String binding; + + @Deprecated + protected BindingName() { + project = null; + location = null; + binding = null; + } + + private BindingName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + binding = Preconditions.checkNotNull(builder.getBinding()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBinding() { + return binding; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BindingName of(String project, String location, String binding) { + return newBuilder().setProject(project).setLocation(location).setBinding(binding).build(); + } + + public static String format(String project, String location, String binding) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBinding(binding) + .build() + .toString(); + } + + public static BindingName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BINDING.validatedMatch( + formattedString, "BindingName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("binding")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (BindingName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BINDING.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (binding != null) { + fieldMapBuilder.put("binding", binding); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BINDING.instantiate( + "project", project, "location", location, "binding", binding); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BindingName that = ((BindingName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.binding, that.binding); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(binding); + return h; + } + + /** Builder for projects/{project}/locations/{location}/bindings/{binding}. */ + public static class Builder { + private String project; + private String location; + private String binding; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBinding() { + return binding; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBinding(String binding) { + this.binding = binding; + return this; + } + + private Builder(BindingName bindingName) { + this.project = bindingName.project; + this.location = bindingName.location; + this.binding = bindingName.binding; + } + + public BindingName build() { + return new BindingName(this); + } + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingOrBuilder.java new file mode 100644 index 000000000000..bb7f735aeb5b --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingOrBuilder.java @@ -0,0 +1,325 @@ +/* + * 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/agentregistry/v1/binding.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface BindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Binding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The binding for AuthProvider.
+   * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + * + * @return Whether the authProviderBinding field is set. + */ + boolean hasAuthProviderBinding(); + + /** + * + * + *
+   * The binding for AuthProvider.
+   * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + * + * @return The authProviderBinding. + */ + com.google.cloud.agentregistry.v1.Binding.AuthProviderBinding getAuthProviderBinding(); + + /** + * + * + *
+   * The binding for AuthProvider.
+   * 
+ * + * .google.cloud.agentregistry.v1.Binding.AuthProviderBinding auth_provider_binding = 6; + * + */ + com.google.cloud.agentregistry.v1.Binding.AuthProviderBindingOrBuilder + getAuthProviderBindingOrBuilder(); + + /** + * + * + *
+   * Required. Identifier. The resource name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Identifier. The resource name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. User-defined display name for the Binding.
+   * Can have a maximum length of `63` characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. User-defined display name for the Binding.
+   * Can have a maximum length of `63` characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-defined description of a Binding.
+   * Can have a maximum length of `2048` characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. User-defined description of a Binding.
+   * Can have a maximum length of `2048` characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The target Agent of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + + /** + * + * + *
+   * Required. The target Agent of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.agentregistry.v1.Binding.Source getSource(); + + /** + * + * + *
+   * Required. The target Agent of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Source source = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.agentregistry.v1.Binding.SourceOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+   * Required. The target Agent Registry Resource of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + + /** + * + * + *
+   * Required. The target Agent Registry Resource of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + com.google.cloud.agentregistry.v1.Binding.Target getTarget(); + + /** + * + * + *
+   * Required. The target Agent Registry Resource of the Binding.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding.Target target = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.agentregistry.v1.Binding.TargetOrBuilder getTargetOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Timestamp when this binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Timestamp when this binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Timestamp when this binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Timestamp when this binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + com.google.cloud.agentregistry.v1.Binding.BindingCase getBindingCase(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingProto.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingProto.java new file mode 100644 index 000000000000..6cfaee48cec1 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/BindingProto.java @@ -0,0 +1,164 @@ +/* + * 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/agentregistry/v1/binding.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public final class BindingProto extends com.google.protobuf.GeneratedFile { + private BindingProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BindingProto"); + } + + 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_agentregistry_v1_Binding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Binding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Binding_Source_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Binding_Source_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Binding_Target_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Binding_Target_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_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" + + "+google/cloud/agentregistry/v1/binding." + + "proto\022\035google.cloud.agentregistry.v1\032\037go" + + "ogle/api/field_behavior.proto\032\031google/ap" + + "i/resource.proto\032\037google/protobuf/timestamp.proto\"\353\005\n" + + "\007Binding\022[\n" + + "\025auth_provider_binding\030\006" + + " \001(\0132:.google.cloud.agentregistry.v1.Binding.AuthProviderBindingH\000\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\010\340A\002\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\001\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\001\022B\n" + + "\006source\030\004" + + " \001(\0132-.google.cloud.agentregistry.v1.Binding.SourceB\003\340A\002\022B\n" + + "\006target\030\005 \001(\0132-.goog" + + "le.cloud.agentregistry.v1.Binding.TargetB\003\340A\002\0224\n" + + "\013create_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032-\n" + + "\006Source\022\024\n\n" + + "identifier\030\001 \001(\tH\000B\r\n" + + "\013source_type\032-\n" + + "\006Target\022\024\n\n" + + "identifier\030\001 \001(\tH\000B\r\n" + + "\013target_type\032a\n" + + "\023AuthProviderBinding\022\032\n\r" + + "auth_provider\030\001 \001(\tB\003\340A\002\022\023\n" + + "\006scopes\030\002 \003(\tB\003\340A\001\022\031\n" + + "\014continue_uri\030\003 \001(\tB\003\340A\001:x\352Au\n" + + "$agentregistry.googleapis.com/Binding\022:projects/" + + "{project}/locations/{location}/bindings/{binding}*\010bindings2\007bindingB\t\n" + + "\007bindingB\337\001\n" + + "!com.google.cloud.agentregistry.v1B\014BindingProtoP\001ZGcloud.google.com/go/agent" + + "registry/apiv1/agentregistrypb;agentregi" + + "strypb\252\002\035Google.Cloud.AgentRegistry.V1\312\002\035Google\\Cloud\\AgentRegistry\\V1\352\002" + + " Google::Cloud::AgentRegistry::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_agentregistry_v1_Binding_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_agentregistry_v1_Binding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Binding_descriptor, + new java.lang.String[] { + "AuthProviderBinding", + "Name", + "DisplayName", + "Description", + "Source", + "Target", + "CreateTime", + "UpdateTime", + "Binding", + }); + internal_static_google_cloud_agentregistry_v1_Binding_Source_descriptor = + internal_static_google_cloud_agentregistry_v1_Binding_descriptor.getNestedType(0); + internal_static_google_cloud_agentregistry_v1_Binding_Source_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Binding_Source_descriptor, + new java.lang.String[] { + "Identifier", "SourceType", + }); + internal_static_google_cloud_agentregistry_v1_Binding_Target_descriptor = + internal_static_google_cloud_agentregistry_v1_Binding_descriptor.getNestedType(1); + internal_static_google_cloud_agentregistry_v1_Binding_Target_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Binding_Target_descriptor, + new java.lang.String[] { + "Identifier", "TargetType", + }); + internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_descriptor = + internal_static_google_cloud_agentregistry_v1_Binding_descriptor.getNestedType(2); + internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Binding_AuthProviderBinding_descriptor, + new java.lang.String[] { + "AuthProvider", "Scopes", "ContinueUri", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateBindingRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateBindingRequest.java new file mode 100644 index 000000000000..01a5d5b63443 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateBindingRequest.java @@ -0,0 +1,1444 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for creating a Binding
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.CreateBindingRequest} + */ +@com.google.protobuf.Generated +public final class CreateBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.CreateBindingRequest) + CreateBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateBindingRequest"); + } + + // Use CreateBindingRequest.newBuilder() to construct. + private CreateBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateBindingRequest() { + parent_ = ""; + bindingId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.CreateBindingRequest.class, + com.google.cloud.agentregistry.v1.CreateBindingRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location to create the Binding in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to create the Binding in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 BINDING_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object bindingId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the binding, which will become the final
+   * component of the binding's resource name.
+   *
+   * This value should be 4-63 characters, and must conform to RFC-1034.
+   * Specifically, it must match the regular expression
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * string binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bindingId. + */ + @java.lang.Override + public java.lang.String getBindingId() { + java.lang.Object ref = bindingId_; + 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(); + bindingId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the binding, which will become the final
+   * component of the binding's resource name.
+   *
+   * This value should be 4-63 characters, and must conform to RFC-1034.
+   * Specifically, it must match the regular expression
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * string binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bindingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBindingIdBytes() { + java.lang.Object ref = bindingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BINDING_FIELD_NUMBER = 3; + private com.google.cloud.agentregistry.v1.Binding binding_; + + /** + * + * + *
+   * Required. The Binding resource that is being created.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the binding field is set. + */ + @java.lang.Override + public boolean hasBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The Binding resource that is being created.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The binding. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding getBinding() { + return binding_ == null + ? com.google.cloud.agentregistry.v1.Binding.getDefaultInstance() + : binding_; + } + + /** + * + * + *
+   * Required. The Binding resource that is being created.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingOrBuilder() { + return binding_ == null + ? com.google.cloud.agentregistry.v1.Binding.getDefaultInstance() + : binding_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(bindingId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, bindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getBinding()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(bindingId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, bindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBinding()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.agentregistry.v1.CreateBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.CreateBindingRequest other = + (com.google.cloud.agentregistry.v1.CreateBindingRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getBindingId().equals(other.getBindingId())) return false; + if (hasBinding() != other.hasBinding()) return false; + if (hasBinding()) { + if (!getBinding().equals(other.getBinding())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + BINDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getBindingId().hashCode(); + if (hasBinding()) { + hash = (37 * hash) + BINDING_FIELD_NUMBER; + hash = (53 * hash) + getBinding().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.CreateBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.CreateBindingRequest 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.agentregistry.v1.CreateBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.CreateBindingRequest 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.agentregistry.v1.CreateBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.CreateBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.CreateBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.CreateBindingRequest 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.agentregistry.v1.CreateBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.CreateBindingRequest 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.agentregistry.v1.CreateBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.CreateBindingRequest 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.agentregistry.v1.CreateBindingRequest 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; + } + + /** + * + * + *
+   * Message for creating a Binding
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.CreateBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.CreateBindingRequest) + com.google.cloud.agentregistry.v1.CreateBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.CreateBindingRequest.class, + com.google.cloud.agentregistry.v1.CreateBindingRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.CreateBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBindingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + bindingId_ = ""; + binding_ = null; + if (bindingBuilder_ != null) { + bindingBuilder_.dispose(); + bindingBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.CreateBindingRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.CreateBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.CreateBindingRequest build() { + com.google.cloud.agentregistry.v1.CreateBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.CreateBindingRequest buildPartial() { + com.google.cloud.agentregistry.v1.CreateBindingRequest result = + new com.google.cloud.agentregistry.v1.CreateBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.CreateBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bindingId_ = bindingId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.binding_ = bindingBuilder_ == null ? binding_ : bindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.CreateBindingRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.CreateBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.CreateBindingRequest other) { + if (other == com.google.cloud.agentregistry.v1.CreateBindingRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBindingId().isEmpty()) { + bindingId_ = other.bindingId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBinding()) { + mergeBinding(other.getBinding()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + 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 18: + { + bindingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 project and location to create the Binding in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to create the Binding in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to create the Binding in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to create the Binding in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project and location to create the Binding in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 java.lang.Object bindingId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the binding, which will become the final
+     * component of the binding's resource name.
+     *
+     * This value should be 4-63 characters, and must conform to RFC-1034.
+     * Specifically, it must match the regular expression
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * string binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bindingId. + */ + public java.lang.String getBindingId() { + java.lang.Object ref = bindingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bindingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the binding, which will become the final
+     * component of the binding's resource name.
+     *
+     * This value should be 4-63 characters, and must conform to RFC-1034.
+     * Specifically, it must match the regular expression
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * string binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bindingId. + */ + public com.google.protobuf.ByteString getBindingIdBytes() { + java.lang.Object ref = bindingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the binding, which will become the final
+     * component of the binding's resource name.
+     *
+     * This value should be 4-63 characters, and must conform to RFC-1034.
+     * Specifically, it must match the regular expression
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * string binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bindingId to set. + * @return This builder for chaining. + */ + public Builder setBindingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the binding, which will become the final
+     * component of the binding's resource name.
+     *
+     * This value should be 4-63 characters, and must conform to RFC-1034.
+     * Specifically, it must match the regular expression
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * string binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBindingId() { + bindingId_ = getDefaultInstance().getBindingId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the binding, which will become the final
+     * component of the binding's resource name.
+     *
+     * This value should be 4-63 characters, and must conform to RFC-1034.
+     * Specifically, it must match the regular expression
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * string binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for bindingId to set. + * @return This builder for chaining. + */ + public Builder setBindingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.agentregistry.v1.Binding binding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder> + bindingBuilder_; + + /** + * + * + *
+     * Required. The Binding resource that is being created.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the binding field is set. + */ + public boolean hasBinding() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The Binding resource that is being created.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The binding. + */ + public com.google.cloud.agentregistry.v1.Binding getBinding() { + if (bindingBuilder_ == null) { + return binding_ == null + ? com.google.cloud.agentregistry.v1.Binding.getDefaultInstance() + : binding_; + } else { + return bindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Binding resource that is being created.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBinding(com.google.cloud.agentregistry.v1.Binding value) { + if (bindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + binding_ = value; + } else { + bindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Binding resource that is being created.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBinding(com.google.cloud.agentregistry.v1.Binding.Builder builderForValue) { + if (bindingBuilder_ == null) { + binding_ = builderForValue.build(); + } else { + bindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Binding resource that is being created.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBinding(com.google.cloud.agentregistry.v1.Binding value) { + if (bindingBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && binding_ != null + && binding_ != com.google.cloud.agentregistry.v1.Binding.getDefaultInstance()) { + getBindingBuilder().mergeFrom(value); + } else { + binding_ = value; + } + } else { + bindingBuilder_.mergeFrom(value); + } + if (binding_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Binding resource that is being created.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBinding() { + bitField0_ = (bitField0_ & ~0x00000004); + binding_ = null; + if (bindingBuilder_ != null) { + bindingBuilder_.dispose(); + bindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Binding resource that is being created.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Binding.Builder getBindingBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Binding resource that is being created.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingOrBuilder() { + if (bindingBuilder_ != null) { + return bindingBuilder_.getMessageOrBuilder(); + } else { + return binding_ == null + ? com.google.cloud.agentregistry.v1.Binding.getDefaultInstance() + : binding_; + } + } + + /** + * + * + *
+     * Required. The Binding resource that is being created.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder> + internalGetBindingFieldBuilder() { + if (bindingBuilder_ == null) { + bindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder>( + getBinding(), getParentForChildren(), isClean()); + binding_ = null; + } + return bindingBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.CreateBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.CreateBindingRequest) + private static final com.google.cloud.agentregistry.v1.CreateBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.CreateBindingRequest(); + } + + public static com.google.cloud.agentregistry.v1.CreateBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBindingRequest 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.agentregistry.v1.CreateBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateBindingRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateBindingRequestOrBuilder.java new file mode 100644 index 000000000000..5b38df2786cf --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateBindingRequestOrBuilder.java @@ -0,0 +1,193 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface CreateBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.CreateBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to create the Binding in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location to create the Binding in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the binding, which will become the final
+   * component of the binding's resource name.
+   *
+   * This value should be 4-63 characters, and must conform to RFC-1034.
+   * Specifically, it must match the regular expression
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * string binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bindingId. + */ + java.lang.String getBindingId(); + + /** + * + * + *
+   * Required. The ID to use for the binding, which will become the final
+   * component of the binding's resource name.
+   *
+   * This value should be 4-63 characters, and must conform to RFC-1034.
+   * Specifically, it must match the regular expression
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * string binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bindingId. + */ + com.google.protobuf.ByteString getBindingIdBytes(); + + /** + * + * + *
+   * Required. The Binding resource that is being created.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the binding field is set. + */ + boolean hasBinding(); + + /** + * + * + *
+   * Required. The Binding resource that is being created.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The binding. + */ + com.google.cloud.agentregistry.v1.Binding getBinding(); + + /** + * + * + *
+   * Required. The Binding resource that is being created.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateServiceRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateServiceRequest.java new file mode 100644 index 000000000000..3577b67ebebb --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateServiceRequest.java @@ -0,0 +1,1449 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for creating a Service
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.CreateServiceRequest} + */ +@com.google.protobuf.Generated +public final class CreateServiceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.CreateServiceRequest) + CreateServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateServiceRequest"); + } + + // Use CreateServiceRequest.newBuilder() to construct. + private CreateServiceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateServiceRequest() { + parent_ = ""; + serviceId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.CreateServiceRequest.class, + com.google.cloud.agentregistry.v1.CreateServiceRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location to create the Service in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to create the Service in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 SERVICE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the service, which will become the final
+   * component of the service's resource name.
+   *
+   * This value should be 4-63 characters, and valid characters
+   * are `/[a-z][0-9]-/`.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceId. + */ + @java.lang.Override + public java.lang.String getServiceId() { + java.lang.Object ref = serviceId_; + 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(); + serviceId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the service, which will become the final
+   * component of the service's resource name.
+   *
+   * This value should be 4-63 characters, and valid characters
+   * are `/[a-z][0-9]-/`.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceIdBytes() { + java.lang.Object ref = serviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 3; + private com.google.cloud.agentregistry.v1.Service service_; + + /** + * + * + *
+   * Required. The Service resource that is being created.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The Service resource that is being created.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The service. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service getService() { + return service_ == null + ? com.google.cloud.agentregistry.v1.Service.getDefaultInstance() + : service_; + } + + /** + * + * + *
+   * Required. The Service resource that is being created.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.ServiceOrBuilder getServiceOrBuilder() { + return service_ == null + ? com.google.cloud.agentregistry.v1.Service.getDefaultInstance() + : service_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, serviceId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getService()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, serviceId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getService()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.agentregistry.v1.CreateServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.CreateServiceRequest other = + (com.google.cloud.agentregistry.v1.CreateServiceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getServiceId().equals(other.getServiceId())) return false; + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService().equals(other.getService())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.CreateServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.CreateServiceRequest 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.agentregistry.v1.CreateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.CreateServiceRequest 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.agentregistry.v1.CreateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.CreateServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.CreateServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.CreateServiceRequest 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.agentregistry.v1.CreateServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.CreateServiceRequest 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.agentregistry.v1.CreateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.CreateServiceRequest 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.agentregistry.v1.CreateServiceRequest 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; + } + + /** + * + * + *
+   * Message for creating a Service
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.CreateServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.CreateServiceRequest) + com.google.cloud.agentregistry.v1.CreateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.CreateServiceRequest.class, + com.google.cloud.agentregistry.v1.CreateServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.CreateServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetServiceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + serviceId_ = ""; + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_CreateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.CreateServiceRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.CreateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.CreateServiceRequest build() { + com.google.cloud.agentregistry.v1.CreateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.CreateServiceRequest buildPartial() { + com.google.cloud.agentregistry.v1.CreateServiceRequest result = + new com.google.cloud.agentregistry.v1.CreateServiceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.CreateServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceId_ = serviceId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.service_ = serviceBuilder_ == null ? service_ : serviceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.CreateServiceRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.CreateServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.CreateServiceRequest other) { + if (other == com.google.cloud.agentregistry.v1.CreateServiceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getServiceId().isEmpty()) { + serviceId_ = other.serviceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasService()) { + mergeService(other.getService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + 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 18: + { + serviceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetServiceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 project and location to create the Service in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to create the Service in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to create the Service in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to create the Service in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project and location to create the Service in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 java.lang.Object serviceId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the service, which will become the final
+     * component of the service's resource name.
+     *
+     * This value should be 4-63 characters, and valid characters
+     * are `/[a-z][0-9]-/`.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceId. + */ + public java.lang.String getServiceId() { + java.lang.Object ref = serviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the service, which will become the final
+     * component of the service's resource name.
+     *
+     * This value should be 4-63 characters, and valid characters
+     * are `/[a-z][0-9]-/`.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceId. + */ + public com.google.protobuf.ByteString getServiceIdBytes() { + java.lang.Object ref = serviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the service, which will become the final
+     * component of the service's resource name.
+     *
+     * This value should be 4-63 characters, and valid characters
+     * are `/[a-z][0-9]-/`.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceId to set. + * @return This builder for chaining. + */ + public Builder setServiceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the service, which will become the final
+     * component of the service's resource name.
+     *
+     * This value should be 4-63 characters, and valid characters
+     * are `/[a-z][0-9]-/`.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceId() { + serviceId_ = getDefaultInstance().getServiceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the service, which will become the final
+     * component of the service's resource name.
+     *
+     * This value should be 4-63 characters, and valid characters
+     * are `/[a-z][0-9]-/`.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceId to set. + * @return This builder for chaining. + */ + public Builder setServiceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.agentregistry.v1.Service service_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service, + com.google.cloud.agentregistry.v1.Service.Builder, + com.google.cloud.agentregistry.v1.ServiceOrBuilder> + serviceBuilder_; + + /** + * + * + *
+     * Required. The Service resource that is being created.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the service field is set. + */ + public boolean hasService() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The Service resource that is being created.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The service. + */ + public com.google.cloud.agentregistry.v1.Service getService() { + if (serviceBuilder_ == null) { + return service_ == null + ? com.google.cloud.agentregistry.v1.Service.getDefaultInstance() + : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Service resource that is being created.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setService(com.google.cloud.agentregistry.v1.Service value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + } else { + serviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Service resource that is being created.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setService(com.google.cloud.agentregistry.v1.Service.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Service resource that is being created.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeService(com.google.cloud.agentregistry.v1.Service value) { + if (serviceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && service_ != null + && service_ != com.google.cloud.agentregistry.v1.Service.getDefaultInstance()) { + getServiceBuilder().mergeFrom(value); + } else { + service_ = value; + } + } else { + serviceBuilder_.mergeFrom(value); + } + if (service_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Service resource that is being created.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000004); + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Service resource that is being created.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Service.Builder getServiceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetServiceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Service resource that is being created.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.ServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null + ? com.google.cloud.agentregistry.v1.Service.getDefaultInstance() + : service_; + } + } + + /** + * + * + *
+     * Required. The Service resource that is being created.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service, + com.google.cloud.agentregistry.v1.Service.Builder, + com.google.cloud.agentregistry.v1.ServiceOrBuilder> + internalGetServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service, + com.google.cloud.agentregistry.v1.Service.Builder, + com.google.cloud.agentregistry.v1.ServiceOrBuilder>( + getService(), getParentForChildren(), isClean()); + service_ = null; + } + return serviceBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.CreateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.CreateServiceRequest) + private static final com.google.cloud.agentregistry.v1.CreateServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.CreateServiceRequest(); + } + + public static com.google.cloud.agentregistry.v1.CreateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateServiceRequest 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.agentregistry.v1.CreateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateServiceRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateServiceRequestOrBuilder.java new file mode 100644 index 000000000000..329596cd0db6 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/CreateServiceRequestOrBuilder.java @@ -0,0 +1,194 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface CreateServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.CreateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to create the Service in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location to create the Service in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the service, which will become the final
+   * component of the service's resource name.
+   *
+   * This value should be 4-63 characters, and valid characters
+   * are `/[a-z][0-9]-/`.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceId. + */ + java.lang.String getServiceId(); + + /** + * + * + *
+   * Required. The ID to use for the service, which will become the final
+   * component of the service's resource name.
+   *
+   * This value should be 4-63 characters, and valid characters
+   * are `/[a-z][0-9]-/`.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceId. + */ + com.google.protobuf.ByteString getServiceIdBytes(); + + /** + * + * + *
+   * Required. The Service resource that is being created.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the service field is set. + */ + boolean hasService(); + + /** + * + * + *
+   * Required. The Service resource that is being created.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The service. + */ + com.google.cloud.agentregistry.v1.Service getService(); + + /** + * + * + *
+   * Required. The Service resource that is being created.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.agentregistry.v1.ServiceOrBuilder getServiceOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteBindingRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteBindingRequest.java new file mode 100644 index 000000000000..e270b2bc5836 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteBindingRequest.java @@ -0,0 +1,905 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for deleting a Binding
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.DeleteBindingRequest} + */ +@com.google.protobuf.Generated +public final class DeleteBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.DeleteBindingRequest) + DeleteBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteBindingRequest"); + } + + // Use DeleteBindingRequest.newBuilder() to construct. + private DeleteBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteBindingRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.DeleteBindingRequest.class, + com.google.cloud.agentregistry.v1.DeleteBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + 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.agentregistry.v1.DeleteBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.DeleteBindingRequest other = + (com.google.cloud.agentregistry.v1.DeleteBindingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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 = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.DeleteBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.DeleteBindingRequest 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.agentregistry.v1.DeleteBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.DeleteBindingRequest 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.agentregistry.v1.DeleteBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.DeleteBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.DeleteBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.DeleteBindingRequest 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.agentregistry.v1.DeleteBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.DeleteBindingRequest 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.agentregistry.v1.DeleteBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.DeleteBindingRequest 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.agentregistry.v1.DeleteBindingRequest 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; + } + + /** + * + * + *
+   * Message for deleting a Binding
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.DeleteBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.DeleteBindingRequest) + com.google.cloud.agentregistry.v1.DeleteBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.DeleteBindingRequest.class, + com.google.cloud.agentregistry.v1.DeleteBindingRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.DeleteBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.DeleteBindingRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.DeleteBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.DeleteBindingRequest build() { + com.google.cloud.agentregistry.v1.DeleteBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.DeleteBindingRequest buildPartial() { + com.google.cloud.agentregistry.v1.DeleteBindingRequest result = + new com.google.cloud.agentregistry.v1.DeleteBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.DeleteBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.DeleteBindingRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.DeleteBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.DeleteBindingRequest other) { + if (other == com.google.cloud.agentregistry.v1.DeleteBindingRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = 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.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.DeleteBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.DeleteBindingRequest) + private static final com.google.cloud.agentregistry.v1.DeleteBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.DeleteBindingRequest(); + } + + public static com.google.cloud.agentregistry.v1.DeleteBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBindingRequest 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.agentregistry.v1.DeleteBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteBindingRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteBindingRequestOrBuilder.java new file mode 100644 index 000000000000..329cec9817cb --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteBindingRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface DeleteBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.DeleteBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteServiceRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteServiceRequest.java new file mode 100644 index 000000000000..4a022c43d595 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteServiceRequest.java @@ -0,0 +1,905 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for deleting a Service
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.DeleteServiceRequest} + */ +@com.google.protobuf.Generated +public final class DeleteServiceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.DeleteServiceRequest) + DeleteServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteServiceRequest"); + } + + // Use DeleteServiceRequest.newBuilder() to construct. + private DeleteServiceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteServiceRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.DeleteServiceRequest.class, + com.google.cloud.agentregistry.v1.DeleteServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + 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.agentregistry.v1.DeleteServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.DeleteServiceRequest other = + (com.google.cloud.agentregistry.v1.DeleteServiceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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 = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.DeleteServiceRequest 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.agentregistry.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.DeleteServiceRequest 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.agentregistry.v1.DeleteServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.DeleteServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.DeleteServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.DeleteServiceRequest 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.agentregistry.v1.DeleteServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.DeleteServiceRequest 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.agentregistry.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.DeleteServiceRequest 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.agentregistry.v1.DeleteServiceRequest 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; + } + + /** + * + * + *
+   * Message for deleting a Service
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.DeleteServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.DeleteServiceRequest) + com.google.cloud.agentregistry.v1.DeleteServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.DeleteServiceRequest.class, + com.google.cloud.agentregistry.v1.DeleteServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.DeleteServiceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.DeleteServiceRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.DeleteServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.DeleteServiceRequest build() { + com.google.cloud.agentregistry.v1.DeleteServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.DeleteServiceRequest buildPartial() { + com.google.cloud.agentregistry.v1.DeleteServiceRequest result = + new com.google.cloud.agentregistry.v1.DeleteServiceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.DeleteServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.DeleteServiceRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.DeleteServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.DeleteServiceRequest other) { + if (other == com.google.cloud.agentregistry.v1.DeleteServiceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = 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.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.DeleteServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.DeleteServiceRequest) + private static final com.google.cloud.agentregistry.v1.DeleteServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.DeleteServiceRequest(); + } + + public static com.google.cloud.agentregistry.v1.DeleteServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteServiceRequest 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.agentregistry.v1.DeleteServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteServiceRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteServiceRequestOrBuilder.java new file mode 100644 index 000000000000..303bf2afd050 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/DeleteServiceRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface DeleteServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.DeleteServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Endpoint.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Endpoint.java new file mode 100644 index 000000000000..f971c5ba1b8d --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Endpoint.java @@ -0,0 +1,2855 @@ +/* + * 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/agentregistry/v1/endpoint.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Represents an Endpoint.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Endpoint} + */ +@com.google.protobuf.Generated +public final class Endpoint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Endpoint) + EndpointOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Endpoint"); + } + + // Use Endpoint.newBuilder() to construct. + private Endpoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Endpoint() { + name_ = ""; + endpointId_ = ""; + displayName_ = ""; + description_ = ""; + interfaces_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.EndpointProto + .internal_static_google_cloud_agentregistry_v1_Endpoint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.EndpointProto + .internal_static_google_cloud_agentregistry_v1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Endpoint.class, + com.google.cloud.agentregistry.v1.Endpoint.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the Endpoint.
+   * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the Endpoint.
+   * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for Endpoint.
+   * 
+ * + * string endpoint_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + 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(); + endpointId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for Endpoint.
+   * 
+ * + * string endpoint_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Output only. Display name for the Endpoint.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Display name for the Endpoint.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Output only. Description of an Endpoint.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Description of an Endpoint.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List interfaces_; + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getInterfacesList() { + return interfaces_; + } + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getInterfacesOrBuilderList() { + return interfaces_; + } + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getInterfacesCount() { + return interfaces_.size(); + } + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Interface getInterfaces(int index) { + return interfaces_.get(index); + } + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index) { + return interfaces_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 7; + + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.agentregistry.v1.EndpointProto + .internal_static_google_cloud_agentregistry_v1_Endpoint_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Struct.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + + /** + * + * + *
+   * Output only. Attributes of the Endpoint.
+   *
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeReference`:
+   * {"uri": "//..."} - the URI of the underlying resource hosting the
+   * Endpoint, for example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + * + * + *
+   * Output only. Attributes of the Endpoint.
+   *
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeReference`:
+   * {"uri": "//..."} - the URI of the underlying resource hosting the
+   * Endpoint, for example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + + /** + * + * + *
+   * Output only. Attributes of the Endpoint.
+   *
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeReference`:
+   * {"uri": "//..."} - the URI of the underlying resource hosting the
+   * Endpoint, for example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Struct getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Struct defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Output only. Attributes of the Endpoint.
+   *
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeReference`:
+   * {"uri": "//..."} - the URI of the underlying resource hosting the
+   * Endpoint, for example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Struct getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + for (int i = 0; i < interfaces_.size(); i++) { + output.writeMessage(4, interfaces_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 7); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, endpointId_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + for (int i = 0; i < interfaces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, interfaces_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = + AttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, attributes__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, endpointId_); + } + 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.agentregistry.v1.Endpoint)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Endpoint other = + (com.google.cloud.agentregistry.v1.Endpoint) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEndpointId().equals(other.getEndpointId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getInterfacesList().equals(other.getInterfacesList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetAttributes().equals(other.internalGetAttributes())) 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 = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getInterfacesCount() > 0) { + hash = (37 * hash) + INTERFACES_FIELD_NUMBER; + hash = (53 * hash) + getInterfacesList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Endpoint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Endpoint 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.agentregistry.v1.Endpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Endpoint 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.agentregistry.v1.Endpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Endpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Endpoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Endpoint 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.agentregistry.v1.Endpoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Endpoint 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.agentregistry.v1.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Endpoint 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.agentregistry.v1.Endpoint 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; + } + + /** + * + * + *
+   * Represents an Endpoint.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Endpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Endpoint) + com.google.cloud.agentregistry.v1.EndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.EndpointProto + .internal_static_google_cloud_agentregistry_v1_Endpoint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.EndpointProto + .internal_static_google_cloud_agentregistry_v1_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Endpoint.class, + com.google.cloud.agentregistry.v1.Endpoint.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Endpoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInterfacesFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + endpointId_ = ""; + displayName_ = ""; + description_ = ""; + if (interfacesBuilder_ == null) { + interfaces_ = java.util.Collections.emptyList(); + } else { + interfaces_ = null; + interfacesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableAttributes().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.EndpointProto + .internal_static_google_cloud_agentregistry_v1_Endpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Endpoint getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Endpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Endpoint build() { + com.google.cloud.agentregistry.v1.Endpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Endpoint buildPartial() { + com.google.cloud.agentregistry.v1.Endpoint result = + new com.google.cloud.agentregistry.v1.Endpoint(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.agentregistry.v1.Endpoint result) { + if (interfacesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + interfaces_ = java.util.Collections.unmodifiableList(interfaces_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.interfaces_ = interfaces_; + } else { + result.interfaces_ = interfacesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Endpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.attributes_ = + internalGetAttributes().build(AttributesDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Endpoint) { + return mergeFrom((com.google.cloud.agentregistry.v1.Endpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Endpoint other) { + if (other == com.google.cloud.agentregistry.v1.Endpoint.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (interfacesBuilder_ == null) { + if (!other.interfaces_.isEmpty()) { + if (interfaces_.isEmpty()) { + interfaces_ = other.interfaces_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureInterfacesIsMutable(); + interfaces_.addAll(other.interfaces_); + } + onChanged(); + } + } else { + if (!other.interfaces_.isEmpty()) { + if (interfacesBuilder_.isEmpty()) { + interfacesBuilder_.dispose(); + interfacesBuilder_ = null; + interfaces_ = other.interfaces_; + bitField0_ = (bitField0_ & ~0x00000010); + interfacesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInterfacesFieldBuilder() + : null; + } else { + interfacesBuilder_.addAllMessages(other.interfaces_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + bitField0_ |= 0x00000080; + 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 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + com.google.cloud.agentregistry.v1.Interface m = + input.readMessage( + com.google.cloud.agentregistry.v1.Interface.parser(), extensionRegistry); + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(m); + } else { + interfacesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .ensureBuilderMap() + .put(attributes__.getKey(), attributes__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 66 + 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_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the Endpoint.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the Endpoint.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the Endpoint.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + + /** + * + * + *
+     * Identifier. The resource name of the Endpoint.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the Endpoint.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + + private java.lang.Object endpointId_ = ""; + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for Endpoint.
+     * 
+ * + * string endpoint_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for Endpoint.
+     * 
+ * + * string endpoint_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for Endpoint.
+     * 
+ * + * string endpoint_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for Endpoint.
+     * 
+ * + * string endpoint_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for Endpoint.
+     * 
+ * + * string endpoint_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Output only. Display name for the Endpoint.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Display name for the Endpoint.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Display name for the Endpoint.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Display name for the Endpoint.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Display name for the Endpoint.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Output only. Description of an Endpoint.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Description of an Endpoint.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Description of an Endpoint.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Description of an Endpoint.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Description of an Endpoint.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List interfaces_ = + java.util.Collections.emptyList(); + + private void ensureInterfacesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + interfaces_ = + new java.util.ArrayList(interfaces_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder> + interfacesBuilder_; + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getInterfacesList() { + if (interfacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(interfaces_); + } else { + return interfacesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getInterfacesCount() { + if (interfacesBuilder_ == null) { + return interfaces_.size(); + } else { + return interfacesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Interface getInterfaces(int index) { + if (interfacesBuilder_ == null) { + return interfaces_.get(index); + } else { + return interfacesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterfaces(int index, com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.set(index, value); + onChanged(); + } else { + interfacesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterfaces( + int index, com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.set(index, builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInterfaces(com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.add(value); + onChanged(); + } else { + interfacesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInterfaces(int index, com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.add(index, value); + onChanged(); + } else { + interfacesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInterfaces( + com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addInterfaces( + int index, com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(index, builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllInterfaces( + java.lang.Iterable values) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, interfaces_); + onChanged(); + } else { + interfacesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterfaces() { + if (interfacesBuilder_ == null) { + interfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + interfacesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeInterfaces(int index) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.remove(index); + onChanged(); + } else { + interfacesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder getInterfacesBuilder(int index) { + return internalGetInterfacesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index) { + if (interfacesBuilder_ == null) { + return interfaces_.get(index); + } else { + return interfacesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getInterfacesOrBuilderList() { + if (interfacesBuilder_ != null) { + return interfacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(interfaces_); + } + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder addInterfacesBuilder() { + return internalGetInterfacesFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Interface.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder addInterfacesBuilder(int index) { + return internalGetInterfacesFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Interface.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The connection details for the Endpoint.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getInterfacesBuilderList() { + return internalGetInterfacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder> + internalGetInterfacesFieldBuilder() { + if (interfacesBuilder_ == null) { + interfacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder>( + interfaces_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + interfaces_ = null; + } + return interfacesBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private static final class AttributesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, com.google.protobuf.StructOrBuilder, com.google.protobuf.Struct> { + @java.lang.Override + public com.google.protobuf.Struct build(com.google.protobuf.StructOrBuilder val) { + if (val instanceof com.google.protobuf.Struct) { + return (com.google.protobuf.Struct) val; + } + return ((com.google.protobuf.Struct.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return AttributesDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final AttributesConverter attributesConverter = new AttributesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.StructOrBuilder, + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder> + attributes_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.StructOrBuilder, + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder> + internalGetAttributes() { + if (attributes_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(attributesConverter); + } + return attributes_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.StructOrBuilder, + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder> + internalGetMutableAttributes() { + if (attributes_ == null) { + attributes_ = new com.google.protobuf.MapFieldBuilder<>(attributesConverter); + } + bitField0_ |= 0x00000080; + onChanged(); + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().ensureBuilderMap().size(); + } + + /** + * + * + *
+     * Output only. Attributes of the Endpoint.
+     *
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeReference`:
+     * {"uri": "//..."} - the URI of the underlying resource hosting the
+     * Endpoint, for example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + * + * + *
+     * Output only. Attributes of the Endpoint.
+     *
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeReference`:
+     * {"uri": "//..."} - the URI of the underlying resource hosting the
+     * Endpoint, for example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getImmutableMap(); + } + + /** + * + * + *
+     * Output only. Attributes of the Endpoint.
+     *
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeReference`:
+     * {"uri": "//..."} - the URI of the underlying resource hosting the
+     * Endpoint, for example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Struct getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Struct defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableAttributes().ensureBuilderMap(); + return map.containsKey(key) ? attributesConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+     * Output only. Attributes of the Endpoint.
+     *
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeReference`:
+     * {"uri": "//..."} - the URI of the underlying resource hosting the
+     * Endpoint, for example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Struct getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableAttributes().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return attributesConverter.build(map.get(key)); + } + + public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableAttributes().clear(); + return this; + } + + /** + * + * + *
+     * Output only. Attributes of the Endpoint.
+     *
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeReference`:
+     * {"uri": "//..."} - the URI of the underlying resource hosting the
+     * Endpoint, for example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttributes().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + bitField0_ |= 0x00000080; + return internalGetMutableAttributes().ensureMessageMap(); + } + + /** + * + * + *
+     * Output only. Attributes of the Endpoint.
+     *
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeReference`:
+     * {"uri": "//..."} - the URI of the underlying resource hosting the
+     * Endpoint, for example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAttributes(java.lang.String key, com.google.protobuf.Struct value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAttributes().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000080; + return this; + } + + /** + * + * + *
+     * Output only. Attributes of the Endpoint.
+     *
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeReference`:
+     * {"uri": "//..."} - the URI of the underlying resource hosting the
+     * Endpoint, for example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllAttributes( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableAttributes().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000080; + return this; + } + + /** + * + * + *
+     * Output only. Attributes of the Endpoint.
+     *
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeReference`:
+     * {"uri": "//..."} - the URI of the underlying resource hosting the
+     * Endpoint, for example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Struct.Builder putAttributesBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableAttributes().ensureBuilderMap(); + com.google.protobuf.StructOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Struct.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Struct) { + entry = ((com.google.protobuf.Struct) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Struct.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Endpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Endpoint) + private static final com.google.cloud.agentregistry.v1.Endpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Endpoint(); + } + + public static com.google.cloud.agentregistry.v1.Endpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Endpoint 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.agentregistry.v1.Endpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointName.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointName.java new file mode 100644 index 000000000000..25c8907fdf6a --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EndpointName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ENDPOINT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/endpoints/{endpoint}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String endpoint; + + @Deprecated + protected EndpointName() { + project = null; + location = null; + endpoint = null; + } + + private EndpointName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + endpoint = Preconditions.checkNotNull(builder.getEndpoint()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEndpoint() { + return endpoint; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EndpointName of(String project, String location, String endpoint) { + return newBuilder().setProject(project).setLocation(location).setEndpoint(endpoint).build(); + } + + public static String format(String project, String location, String endpoint) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEndpoint(endpoint) + .build() + .toString(); + } + + public static EndpointName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ENDPOINT.validatedMatch( + formattedString, "EndpointName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("endpoint")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (EndpointName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ENDPOINT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (endpoint != null) { + fieldMapBuilder.put("endpoint", endpoint); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ENDPOINT.instantiate( + "project", project, "location", location, "endpoint", endpoint); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + EndpointName that = ((EndpointName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.endpoint, that.endpoint); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(endpoint); + return h; + } + + /** Builder for projects/{project}/locations/{location}/endpoints/{endpoint}. */ + public static class Builder { + private String project; + private String location; + private String endpoint; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEndpoint() { + return endpoint; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + private Builder(EndpointName endpointName) { + this.project = endpointName.project; + this.location = endpointName.location; + this.endpoint = endpointName.endpoint; + } + + public EndpointName build() { + return new EndpointName(this); + } + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointOrBuilder.java new file mode 100644 index 000000000000..f874679a6cbc --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointOrBuilder.java @@ -0,0 +1,383 @@ +/* + * 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/agentregistry/v1/endpoint.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface EndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Endpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the Endpoint.
+   * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the Endpoint.
+   * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for Endpoint.
+   * 
+ * + * string endpoint_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endpointId. + */ + java.lang.String getEndpointId(); + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for Endpoint.
+   * 
+ * + * string endpoint_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString getEndpointIdBytes(); + + /** + * + * + *
+   * Output only. Display name for the Endpoint.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. Display name for the Endpoint.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Description of an Endpoint.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Output only. Description of an Endpoint.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getInterfacesList(); + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.agentregistry.v1.Interface getInterfaces(int index); + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getInterfacesCount(); + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getInterfacesOrBuilderList(); + + /** + * + * + *
+   * Required. The connection details for the Endpoint.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Attributes of the Endpoint.
+   *
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeReference`:
+   * {"uri": "//..."} - the URI of the underlying resource hosting the
+   * Endpoint, for example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAttributesCount(); + + /** + * + * + *
+   * Output only. Attributes of the Endpoint.
+   *
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeReference`:
+   * {"uri": "//..."} - the URI of the underlying resource hosting the
+   * Endpoint, for example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsAttributes(java.lang.String key); + + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttributes(); + + /** + * + * + *
+   * Output only. Attributes of the Endpoint.
+   *
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeReference`:
+   * {"uri": "//..."} - the URI of the underlying resource hosting the
+   * Endpoint, for example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getAttributesMap(); + + /** + * + * + *
+   * Output only. Attributes of the Endpoint.
+   *
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeReference`:
+   * {"uri": "//..."} - the URI of the underlying resource hosting the
+   * Endpoint, for example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + com.google.protobuf.Struct getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Struct defaultValue); + + /** + * + * + *
+   * Output only. Attributes of the Endpoint.
+   *
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeReference`:
+   * {"uri": "//..."} - the URI of the underlying resource hosting the
+   * Endpoint, for example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.Struct getAttributesOrThrow(java.lang.String key); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointProto.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointProto.java new file mode 100644 index 000000000000..5e48d4c40ad8 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/EndpointProto.java @@ -0,0 +1,139 @@ +/* + * 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/agentregistry/v1/endpoint.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public final class EndpointProto extends com.google.protobuf.GeneratedFile { + private EndpointProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EndpointProto"); + } + + 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_agentregistry_v1_Endpoint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Endpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Endpoint_AttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Endpoint_AttributesEntry_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" + + ",google/cloud/agentregistry/v1/endpoint" + + ".proto\022\035google.cloud.agentregistry.v1\032\037g" + + "oogle/api/field_behavior.proto\032\031google/a" + + "pi/resource.proto\032.google/cloud/agentreg" + + "istry/v1/properties.proto\032\034google/protob" + + "uf/struct.proto\032\037google/protobuf/timestamp.proto\"\270\004\n" + + "\010Endpoint\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\013endpoint_id\030\010 \001(\tB\003\340A\003\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\003\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\003\022A\n\n" + + "interfaces\030\004" + + " \003(\0132(.google.cloud.agentregistry.v1.InterfaceB\003\340A\002\0224\n" + + "\013create_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\006" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022P\n\n" + + "attributes\030\007 \003(\01327.goo" + + "gle.cloud.agentregistry.v1.Endpoint.AttributesEntryB\003\340A\003\032J\n" + + "\017AttributesEntry\022\013\n" + + "\003key\030\001 \001(\t\022&\n" + + "\005value\030\002 \001(\0132\027.google.protobuf.Struct:\0028\001:}\352Az\n" + + "%agentregistry.googlea" + + "pis.com/Endpoint\022 + * Message for fetching available Bindings. + * + * + * Protobuf type {@code google.cloud.agentregistry.v1.FetchAvailableBindingsRequest} + */ +@com.google.protobuf.Generated +public final class FetchAvailableBindingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.FetchAvailableBindingsRequest) + FetchAvailableBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FetchAvailableBindingsRequest"); + } + + // Use FetchAvailableBindingsRequest.newBuilder() to construct. + private FetchAvailableBindingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchAvailableBindingsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.class, + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.Builder.class); + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SOURCE_IDENTIFIER(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return SOURCE_IDENTIFIER; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + private int targetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object target_; + + public enum TargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TARGET_IDENTIFIER(3), + TARGET_NOT_SET(0); + private final int value; + + private TargetCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 3: + return TARGET_IDENTIFIER; + case 0: + return TARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public static final int SOURCE_IDENTIFIER_FIELD_NUMBER = 2; + + /** + * + * + *
+   * The identifier of the source Agent.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * 
+ * + * string source_identifier = 2; + * + * @return Whether the sourceIdentifier field is set. + */ + public boolean hasSourceIdentifier() { + return sourceCase_ == 2; + } + + /** + * + * + *
+   * The identifier of the source Agent.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * 
+ * + * string source_identifier = 2; + * + * @return The sourceIdentifier. + */ + public java.lang.String getSourceIdentifier() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + 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(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } + } + + /** + * + * + *
+   * The identifier of the source Agent.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * 
+ * + * string source_identifier = 2; + * + * @return The bytes for sourceIdentifier. + */ + public com.google.protobuf.ByteString getSourceIdentifierBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_IDENTIFIER_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * * `urn:mcp:{publisher}:{namespace}:{name}`
+   * * `urn:endpoint:{publisher}:{namespace}:{name}`
+   * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the targetIdentifier field is set. + */ + public boolean hasTargetIdentifier() { + return targetCase_ == 3; + } + + /** + * + * + *
+   * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * * `urn:mcp:{publisher}:{namespace}:{name}`
+   * * `urn:endpoint:{publisher}:{namespace}:{name}`
+   * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The targetIdentifier. + */ + public java.lang.String getTargetIdentifier() { + java.lang.Object ref = ""; + if (targetCase_ == 3) { + ref = target_; + } + 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(); + if (targetCase_ == 3) { + target_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * * `urn:mcp:{publisher}:{namespace}:{name}`
+   * * `urn:endpoint:{publisher}:{namespace}:{name}`
+   * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for targetIdentifier. + */ + public com.google.protobuf.ByteString getTargetIdentifierBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 3) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 3) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent, in the format
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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, in the format
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 = 4; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. Page size is 500 if unspecified and is capped at `500` even if a
+   * larger value is given.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 5 [(.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 token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 5 [(.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 (sourceCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, source_); + } + if (targetCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, 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 (sourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, source_); + } + if (targetCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, 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.agentregistry.v1.FetchAvailableBindingsRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest other = + (com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getSourceIdentifier().equals(other.getSourceIdentifier())) return false; + break; + case 0: + default: + } + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 3: + if (!getTargetIdentifier().equals(other.getTargetIdentifier())) return false; + break; + case 0: + default: + } + 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(); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + SOURCE_IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getSourceIdentifier().hashCode(); + break; + case 0: + default: + } + switch (targetCase_) { + case 3: + hash = (37 * hash) + TARGET_IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getTargetIdentifier().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest 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.agentregistry.v1.FetchAvailableBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest 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.agentregistry.v1.FetchAvailableBindingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest 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.agentregistry.v1.FetchAvailableBindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest 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.agentregistry.v1.FetchAvailableBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest 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.agentregistry.v1.FetchAvailableBindingsRequest 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; + } + + /** + * + * + *
+   * Message for fetching available Bindings.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.FetchAvailableBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.FetchAvailableBindingsRequest) + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.class, + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.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_ = ""; + sourceCase_ = 0; + source_ = null; + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest + getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest build() { + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest buildPartial() { + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest result = + new com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageToken_ = pageToken_; + } + } + + private void buildPartialOneofs( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + result.targetCase_ = targetCase_; + result.target_ = this.target_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest other) { + if (other + == com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000010; + onChanged(); + } + switch (other.getSourceCase()) { + case SOURCE_IDENTIFIER: + { + sourceCase_ = 2; + source_ = other.source_; + onChanged(); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + switch (other.getTargetCase()) { + case TARGET_IDENTIFIER: + { + targetCase_ = 3; + target_ = other.target_; + onChanged(); + break; + } + case TARGET_NOT_SET: + { + break; + } + } + 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_ |= 0x00000004; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 2; + source_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 3; + target_ = s; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int targetCase_ = 0; + private java.lang.Object target_; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string source_identifier = 2; + * + * @return Whether the sourceIdentifier field is set. + */ + @java.lang.Override + public boolean hasSourceIdentifier() { + return sourceCase_ == 2; + } + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string source_identifier = 2; + * + * @return The sourceIdentifier. + */ + @java.lang.Override + public java.lang.String getSourceIdentifier() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string source_identifier = 2; + * + * @return The bytes for sourceIdentifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceIdentifierBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string source_identifier = 2; + * + * @param value The sourceIdentifier to set. + * @return This builder for chaining. + */ + public Builder setSourceIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string source_identifier = 2; + * + * @return This builder for chaining. + */ + public Builder clearSourceIdentifier() { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The identifier of the source Agent.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * 
+ * + * string source_identifier = 2; + * + * @param value The bytes for sourceIdentifier to set. + * @return This builder for chaining. + */ + public Builder setSourceIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the targetIdentifier field is set. + */ + @java.lang.Override + public boolean hasTargetIdentifier() { + return targetCase_ == 3; + } + + /** + * + * + *
+     * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The targetIdentifier. + */ + @java.lang.Override + public java.lang.String getTargetIdentifier() { + java.lang.Object ref = ""; + if (targetCase_ == 3) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 3) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for targetIdentifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetIdentifierBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 3) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 3) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The targetIdentifier to set. + * @return This builder for chaining. + */ + public Builder setTargetIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 3; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTargetIdentifier() { + if (targetCase_ == 3) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+     * Format:
+     *
+     * * `urn:agent:{publisher}:{namespace}:{name}`
+     * * `urn:mcp:{publisher}:{namespace}:{name}`
+     * * `urn:endpoint:{publisher}:{namespace}:{name}`
+     * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for targetIdentifier to set. + * @return This builder for chaining. + */ + public Builder setTargetIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 3; + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent, in the format
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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, in the format
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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, in the format
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent, in the format
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent, in the format
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. Page size is 500 if unspecified and is capped at `500` even if a
+     * larger value is given.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. Page size is 500 if unspecified and is capped at `500` even if a
+     * larger value is given.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. Page size is 500 if unspecified and is capped at `500` even if a
+     * larger value is given.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.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 token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.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 token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.FetchAvailableBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.FetchAvailableBindingsRequest) + private static final com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest(); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchAvailableBindingsRequest 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.agentregistry.v1.FetchAvailableBindingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..1da6a0553ec4 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsRequestOrBuilder.java @@ -0,0 +1,207 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface FetchAvailableBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.FetchAvailableBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The identifier of the source Agent.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * 
+ * + * string source_identifier = 2; + * + * @return Whether the sourceIdentifier field is set. + */ + boolean hasSourceIdentifier(); + + /** + * + * + *
+   * The identifier of the source Agent.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * 
+ * + * string source_identifier = 2; + * + * @return The sourceIdentifier. + */ + java.lang.String getSourceIdentifier(); + + /** + * + * + *
+   * The identifier of the source Agent.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * 
+ * + * string source_identifier = 2; + * + * @return The bytes for sourceIdentifier. + */ + com.google.protobuf.ByteString getSourceIdentifierBytes(); + + /** + * + * + *
+   * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * * `urn:mcp:{publisher}:{namespace}:{name}`
+   * * `urn:endpoint:{publisher}:{namespace}:{name}`
+   * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the targetIdentifier field is set. + */ + boolean hasTargetIdentifier(); + + /** + * + * + *
+   * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * * `urn:mcp:{publisher}:{namespace}:{name}`
+   * * `urn:endpoint:{publisher}:{namespace}:{name}`
+   * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The targetIdentifier. + */ + java.lang.String getTargetIdentifier(); + + /** + * + * + *
+   * Optional. The identifier of the target Agent, MCP Server, or Endpoint.
+   * Format:
+   *
+   * * `urn:agent:{publisher}:{namespace}:{name}`
+   * * `urn:mcp:{publisher}:{namespace}:{name}`
+   * * `urn:endpoint:{publisher}:{namespace}:{name}`
+   * 
+ * + * string target_identifier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for targetIdentifier. + */ + com.google.protobuf.ByteString getTargetIdentifierBytes(); + + /** + * + * + *
+   * Required. The parent, in the format
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent, in the format
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. Page size is 500 if unspecified and is capped at `500` even if a
+   * larger value is given.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.SourceCase getSourceCase(); + + com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest.TargetCase getTargetCase(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsResponse.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsResponse.java new file mode 100644 index 000000000000..3f9c8aa6eee1 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsResponse.java @@ -0,0 +1,1119 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for response to fetching available Bindings.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.FetchAvailableBindingsResponse} + */ +@com.google.protobuf.Generated +public final class FetchAvailableBindingsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.FetchAvailableBindingsResponse) + FetchAvailableBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FetchAvailableBindingsResponse"); + } + + // Use FetchAvailableBindingsResponse.newBuilder() to construct. + private FetchAvailableBindingsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchAvailableBindingsResponse() { + bindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse.class, + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse.Builder.class); + } + + public static final int BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List bindings_; + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public java.util.List getBindingsList() { + return bindings_; + } + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public java.util.List + getBindingsOrBuilderList() { + return bindings_; + } + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public int getBindingsCount() { + return bindings_.size(); + } + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding getBindings(int index) { + return bindings_.get(index); + } + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingsOrBuilder(int index) { + return bindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * 
+ * + * 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 < bindings_.size(); i++) { + output.writeMessage(1, bindings_.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 < bindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bindings_.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.agentregistry.v1.FetchAvailableBindingsResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse other = + (com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse) obj; + + if (!getBindingsList().equals(other.getBindingsList())) 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 (getBindingsCount() > 0) { + hash = (37 * hash) + BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getBindingsList().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.agentregistry.v1.FetchAvailableBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse 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.agentregistry.v1.FetchAvailableBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse 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.agentregistry.v1.FetchAvailableBindingsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse 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.agentregistry.v1.FetchAvailableBindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse 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.agentregistry.v1.FetchAvailableBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse 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.agentregistry.v1.FetchAvailableBindingsResponse 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; + } + + /** + * + * + *
+   * Message for response to fetching available Bindings.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.FetchAvailableBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.FetchAvailableBindingsResponse) + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse.class, + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bindingsBuilder_ == null) { + bindings_ = java.util.Collections.emptyList(); + } else { + bindings_ = null; + bindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_FetchAvailableBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse + getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse build() { + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse buildPartial() { + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse result = + new com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse result) { + if (bindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bindings_ = java.util.Collections.unmodifiableList(bindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bindings_ = bindings_; + } else { + result.bindings_ = bindingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse 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.agentregistry.v1.FetchAvailableBindingsResponse) { + return mergeFrom((com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse other) { + if (other + == com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse.getDefaultInstance()) + return this; + if (bindingsBuilder_ == null) { + if (!other.bindings_.isEmpty()) { + if (bindings_.isEmpty()) { + bindings_ = other.bindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBindingsIsMutable(); + bindings_.addAll(other.bindings_); + } + onChanged(); + } + } else { + if (!other.bindings_.isEmpty()) { + if (bindingsBuilder_.isEmpty()) { + bindingsBuilder_.dispose(); + bindingsBuilder_ = null; + bindings_ = other.bindings_; + bitField0_ = (bitField0_ & ~0x00000001); + bindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBindingsFieldBuilder() + : null; + } else { + bindingsBuilder_.addAllMessages(other.bindings_); + } + } + } + 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.Binding m = + input.readMessage( + com.google.cloud.agentregistry.v1.Binding.parser(), extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.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 bindings_ = + java.util.Collections.emptyList(); + + private void ensureBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bindings_ = new java.util.ArrayList(bindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder> + bindingsBuilder_; + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public java.util.List getBindingsList() { + if (bindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bindings_); + } else { + return bindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public int getBindingsCount() { + if (bindingsBuilder_ == null) { + return bindings_.size(); + } else { + return bindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.Binding getBindings(int index) { + if (bindingsBuilder_ == null) { + return bindings_.get(index); + } else { + return bindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder setBindings(int index, com.google.cloud.agentregistry.v1.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.set(index, value); + onChanged(); + } else { + bindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder setBindings( + int index, com.google.cloud.agentregistry.v1.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.set(index, builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addBindings(com.google.cloud.agentregistry.v1.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.add(value); + onChanged(); + } else { + bindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addBindings(int index, com.google.cloud.agentregistry.v1.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.add(index, value); + onChanged(); + } else { + bindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addBindings(com.google.cloud.agentregistry.v1.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addBindings( + int index, com.google.cloud.agentregistry.v1.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(index, builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addAllBindings( + java.lang.Iterable values) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bindings_); + onChanged(); + } else { + bindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder clearBindings() { + if (bindingsBuilder_ == null) { + bindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder removeBindings(int index) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.remove(index); + onChanged(); + } else { + bindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.Binding.Builder getBindingsBuilder(int index) { + return internalGetBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingsOrBuilder(int index) { + if (bindingsBuilder_ == null) { + return bindings_.get(index); + } else { + return bindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public java.util.List + getBindingsOrBuilderList() { + if (bindingsBuilder_ != null) { + return bindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bindings_); + } + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.Binding.Builder addBindingsBuilder() { + return internalGetBindingsFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Binding.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.Binding.Builder addBindingsBuilder(int index) { + return internalGetBindingsFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Binding.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Bindings.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public java.util.List + getBindingsBuilderList() { + return internalGetBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder> + internalGetBindingsFieldBuilder() { + if (bindingsBuilder_ == null) { + bindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder>( + bindings_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + bindings_ = null; + } + return bindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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.agentregistry.v1.FetchAvailableBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.FetchAvailableBindingsResponse) + private static final com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse(); + } + + public static com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchAvailableBindingsResponse 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.agentregistry.v1.FetchAvailableBindingsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsResponseOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..228be9d669f0 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/FetchAvailableBindingsResponseOrBuilder.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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface FetchAvailableBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.FetchAvailableBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + java.util.List getBindingsList(); + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + com.google.cloud.agentregistry.v1.Binding getBindings(int index); + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + int getBindingsCount(); + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + java.util.List + getBindingsOrBuilderList(); + + /** + * + * + *
+   * The list of Bindings.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetAgentRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetAgentRequest.java new file mode 100644 index 000000000000..33ba85eb960a --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetAgentRequest.java @@ -0,0 +1,610 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for getting a Agent
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetAgentRequest} + */ +@com.google.protobuf.Generated +public final class GetAgentRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.GetAgentRequest) + GetAgentRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetAgentRequest"); + } + + // Use GetAgentRequest.newBuilder() to construct. + private GetAgentRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetAgentRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetAgentRequest.class, + com.google.cloud.agentregistry.v1.GetAgentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetAgentRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.GetAgentRequest other = + (com.google.cloud.agentregistry.v1.GetAgentRequest) 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.agentregistry.v1.GetAgentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetAgentRequest 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.agentregistry.v1.GetAgentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetAgentRequest 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.agentregistry.v1.GetAgentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetAgentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.GetAgentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetAgentRequest 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.agentregistry.v1.GetAgentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetAgentRequest 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.agentregistry.v1.GetAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetAgentRequest 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.agentregistry.v1.GetAgentRequest 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; + } + + /** + * + * + *
+   * Message for getting a Agent
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetAgentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.GetAgentRequest) + com.google.cloud.agentregistry.v1.GetAgentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetAgentRequest.class, + com.google.cloud.agentregistry.v1.GetAgentRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.GetAgentRequest.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetAgentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetAgentRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.GetAgentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetAgentRequest build() { + com.google.cloud.agentregistry.v1.GetAgentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetAgentRequest buildPartial() { + com.google.cloud.agentregistry.v1.GetAgentRequest result = + new com.google.cloud.agentregistry.v1.GetAgentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.GetAgentRequest 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.agentregistry.v1.GetAgentRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.GetAgentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.GetAgentRequest other) { + if (other == com.google.cloud.agentregistry.v1.GetAgentRequest.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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetAgentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.GetAgentRequest) + private static final com.google.cloud.agentregistry.v1.GetAgentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.GetAgentRequest(); + } + + public static com.google.cloud.agentregistry.v1.GetAgentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAgentRequest 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.agentregistry.v1.GetAgentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetAgentRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetAgentRequestOrBuilder.java new file mode 100644 index 000000000000..5e489e2735cd --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetAgentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface GetAgentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.GetAgentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetBindingRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetBindingRequest.java new file mode 100644 index 000000000000..b64742009a91 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetBindingRequest.java @@ -0,0 +1,617 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for getting a Binding
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetBindingRequest} + */ +@com.google.protobuf.Generated +public final class GetBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.GetBindingRequest) + GetBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetBindingRequest"); + } + + // Use GetBindingRequest.newBuilder() to construct. + private GetBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetBindingRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetBindingRequest.class, + com.google.cloud.agentregistry.v1.GetBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.GetBindingRequest other = + (com.google.cloud.agentregistry.v1.GetBindingRequest) 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.agentregistry.v1.GetBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetBindingRequest 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.agentregistry.v1.GetBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetBindingRequest 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.agentregistry.v1.GetBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.GetBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetBindingRequest 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.agentregistry.v1.GetBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetBindingRequest 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.agentregistry.v1.GetBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetBindingRequest 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.agentregistry.v1.GetBindingRequest 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; + } + + /** + * + * + *
+   * Message for getting a Binding
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.GetBindingRequest) + com.google.cloud.agentregistry.v1.GetBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetBindingRequest.class, + com.google.cloud.agentregistry.v1.GetBindingRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.GetBindingRequest.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetBindingRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.GetBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetBindingRequest build() { + com.google.cloud.agentregistry.v1.GetBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetBindingRequest buildPartial() { + com.google.cloud.agentregistry.v1.GetBindingRequest result = + new com.google.cloud.agentregistry.v1.GetBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.GetBindingRequest 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.agentregistry.v1.GetBindingRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.GetBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.GetBindingRequest other) { + if (other == com.google.cloud.agentregistry.v1.GetBindingRequest.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 name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Binding.
+     * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.GetBindingRequest) + private static final com.google.cloud.agentregistry.v1.GetBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.GetBindingRequest(); + } + + public static com.google.cloud.agentregistry.v1.GetBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBindingRequest 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.agentregistry.v1.GetBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetBindingRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetBindingRequestOrBuilder.java new file mode 100644 index 000000000000..3e01e8d35f23 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetBindingRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface GetBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.GetBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Binding.
+   * Format: `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetEndpointRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetEndpointRequest.java new file mode 100644 index 000000000000..567a87c035a5 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetEndpointRequest.java @@ -0,0 +1,617 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for getting a Endpoint
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetEndpointRequest} + */ +@com.google.protobuf.Generated +public final class GetEndpointRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.GetEndpointRequest) + GetEndpointRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetEndpointRequest"); + } + + // Use GetEndpointRequest.newBuilder() to construct. + private GetEndpointRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetEndpointRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetEndpointRequest.class, + com.google.cloud.agentregistry.v1.GetEndpointRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the endpoint to retrieve.
+   * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the endpoint to retrieve.
+   * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetEndpointRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.GetEndpointRequest other = + (com.google.cloud.agentregistry.v1.GetEndpointRequest) 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.agentregistry.v1.GetEndpointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetEndpointRequest 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.agentregistry.v1.GetEndpointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetEndpointRequest 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.agentregistry.v1.GetEndpointRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetEndpointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.GetEndpointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetEndpointRequest 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.agentregistry.v1.GetEndpointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetEndpointRequest 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.agentregistry.v1.GetEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetEndpointRequest 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.agentregistry.v1.GetEndpointRequest 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; + } + + /** + * + * + *
+   * Message for getting a Endpoint
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetEndpointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.GetEndpointRequest) + com.google.cloud.agentregistry.v1.GetEndpointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetEndpointRequest.class, + com.google.cloud.agentregistry.v1.GetEndpointRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.GetEndpointRequest.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetEndpointRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetEndpointRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.GetEndpointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetEndpointRequest build() { + com.google.cloud.agentregistry.v1.GetEndpointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetEndpointRequest buildPartial() { + com.google.cloud.agentregistry.v1.GetEndpointRequest result = + new com.google.cloud.agentregistry.v1.GetEndpointRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.GetEndpointRequest 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.agentregistry.v1.GetEndpointRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.GetEndpointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.GetEndpointRequest other) { + if (other == com.google.cloud.agentregistry.v1.GetEndpointRequest.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 name of the endpoint to retrieve.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the endpoint to retrieve.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the endpoint to retrieve.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the endpoint to retrieve.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the endpoint to retrieve.
+     * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetEndpointRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.GetEndpointRequest) + private static final com.google.cloud.agentregistry.v1.GetEndpointRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.GetEndpointRequest(); + } + + public static com.google.cloud.agentregistry.v1.GetEndpointRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEndpointRequest 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.agentregistry.v1.GetEndpointRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetEndpointRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetEndpointRequestOrBuilder.java new file mode 100644 index 000000000000..4df347449e0c --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetEndpointRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface GetEndpointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.GetEndpointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the endpoint to retrieve.
+   * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the endpoint to retrieve.
+   * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetMcpServerRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetMcpServerRequest.java new file mode 100644 index 000000000000..c3ee405b4bdd --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetMcpServerRequest.java @@ -0,0 +1,611 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for getting a McpServer
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetMcpServerRequest} + */ +@com.google.protobuf.Generated +public final class GetMcpServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.GetMcpServerRequest) + GetMcpServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetMcpServerRequest"); + } + + // Use GetMcpServerRequest.newBuilder() to construct. + private GetMcpServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetMcpServerRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetMcpServerRequest.class, + com.google.cloud.agentregistry.v1.GetMcpServerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetMcpServerRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.GetMcpServerRequest other = + (com.google.cloud.agentregistry.v1.GetMcpServerRequest) 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.agentregistry.v1.GetMcpServerRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetMcpServerRequest 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.agentregistry.v1.GetMcpServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetMcpServerRequest 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.agentregistry.v1.GetMcpServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetMcpServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.GetMcpServerRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetMcpServerRequest 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.agentregistry.v1.GetMcpServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetMcpServerRequest 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.agentregistry.v1.GetMcpServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetMcpServerRequest 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.agentregistry.v1.GetMcpServerRequest 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; + } + + /** + * + * + *
+   * Message for getting a McpServer
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetMcpServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.GetMcpServerRequest) + com.google.cloud.agentregistry.v1.GetMcpServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetMcpServerRequest.class, + com.google.cloud.agentregistry.v1.GetMcpServerRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.GetMcpServerRequest.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetMcpServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetMcpServerRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.GetMcpServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetMcpServerRequest build() { + com.google.cloud.agentregistry.v1.GetMcpServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetMcpServerRequest buildPartial() { + com.google.cloud.agentregistry.v1.GetMcpServerRequest result = + new com.google.cloud.agentregistry.v1.GetMcpServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.GetMcpServerRequest 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.agentregistry.v1.GetMcpServerRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.GetMcpServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.GetMcpServerRequest other) { + if (other == com.google.cloud.agentregistry.v1.GetMcpServerRequest.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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetMcpServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.GetMcpServerRequest) + private static final com.google.cloud.agentregistry.v1.GetMcpServerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.GetMcpServerRequest(); + } + + public static com.google.cloud.agentregistry.v1.GetMcpServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMcpServerRequest 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.agentregistry.v1.GetMcpServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetMcpServerRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetMcpServerRequestOrBuilder.java new file mode 100644 index 000000000000..962313f08bef --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetMcpServerRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface GetMcpServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.GetMcpServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetServiceRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetServiceRequest.java new file mode 100644 index 000000000000..725066fa19cf --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetServiceRequest.java @@ -0,0 +1,617 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for getting a Service
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetServiceRequest} + */ +@com.google.protobuf.Generated +public final class GetServiceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.GetServiceRequest) + GetServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetServiceRequest"); + } + + // Use GetServiceRequest.newBuilder() to construct. + private GetServiceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetServiceRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetServiceRequest.class, + com.google.cloud.agentregistry.v1.GetServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.GetServiceRequest other = + (com.google.cloud.agentregistry.v1.GetServiceRequest) 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.agentregistry.v1.GetServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetServiceRequest 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.agentregistry.v1.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetServiceRequest 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.agentregistry.v1.GetServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.GetServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.GetServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetServiceRequest 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.agentregistry.v1.GetServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetServiceRequest 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.agentregistry.v1.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.GetServiceRequest 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.agentregistry.v1.GetServiceRequest 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; + } + + /** + * + * + *
+   * Message for getting a Service
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.GetServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.GetServiceRequest) + com.google.cloud.agentregistry.v1.GetServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.GetServiceRequest.class, + com.google.cloud.agentregistry.v1.GetServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.GetServiceRequest.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetServiceRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.GetServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetServiceRequest build() { + com.google.cloud.agentregistry.v1.GetServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.GetServiceRequest buildPartial() { + com.google.cloud.agentregistry.v1.GetServiceRequest result = + new com.google.cloud.agentregistry.v1.GetServiceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.GetServiceRequest 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.agentregistry.v1.GetServiceRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.GetServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.GetServiceRequest other) { + if (other == com.google.cloud.agentregistry.v1.GetServiceRequest.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 name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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.agentregistry.v1.GetServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.GetServiceRequest) + private static final com.google.cloud.agentregistry.v1.GetServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.GetServiceRequest(); + } + + public static com.google.cloud.agentregistry.v1.GetServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetServiceRequest 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.agentregistry.v1.GetServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetServiceRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetServiceRequestOrBuilder.java new file mode 100644 index 000000000000..5ba13fc8d0b1 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/GetServiceRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface GetServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.GetServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Interface.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Interface.java new file mode 100644 index 000000000000..db956e5b36e4 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Interface.java @@ -0,0 +1,967 @@ +/* + * 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/agentregistry/v1/properties.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Represents the connection details for an Agent or MCP Server.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Interface} + */ +@com.google.protobuf.Generated +public final class Interface extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Interface) + InterfaceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Interface"); + } + + // Use Interface.newBuilder() to construct. + private Interface(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Interface() { + url_ = ""; + protocolBinding_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.PropertiesProto + .internal_static_google_cloud_agentregistry_v1_Interface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.PropertiesProto + .internal_static_google_cloud_agentregistry_v1_Interface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Interface.class, + com.google.cloud.agentregistry.v1.Interface.Builder.class); + } + + /** + * + * + *
+   * The protocol binding of the interface.
+   * 
+ * + * Protobuf enum {@code google.cloud.agentregistry.v1.Interface.ProtocolBinding} + */ + public enum ProtocolBinding implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified transport protocol.
+     * 
+ * + * PROTOCOL_BINDING_UNSPECIFIED = 0; + */ + PROTOCOL_BINDING_UNSPECIFIED(0), + /** + * + * + *
+     * JSON-RPC specification.
+     * 
+ * + * JSONRPC = 1; + */ + JSONRPC(1), + /** + * + * + *
+     * gRPC specification.
+     * 
+ * + * GRPC = 2; + */ + GRPC(2), + /** + * + * + *
+     * HTTP+JSON specification.
+     * 
+ * + * HTTP_JSON = 3; + */ + HTTP_JSON(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProtocolBinding"); + } + + /** + * + * + *
+     * Unspecified transport protocol.
+     * 
+ * + * PROTOCOL_BINDING_UNSPECIFIED = 0; + */ + public static final int PROTOCOL_BINDING_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * JSON-RPC specification.
+     * 
+ * + * JSONRPC = 1; + */ + public static final int JSONRPC_VALUE = 1; + + /** + * + * + *
+     * gRPC specification.
+     * 
+ * + * GRPC = 2; + */ + public static final int GRPC_VALUE = 2; + + /** + * + * + *
+     * HTTP+JSON specification.
+     * 
+ * + * HTTP_JSON = 3; + */ + public static final int HTTP_JSON_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProtocolBinding valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ProtocolBinding forNumber(int value) { + switch (value) { + case 0: + return PROTOCOL_BINDING_UNSPECIFIED; + case 1: + return JSONRPC; + case 2: + return GRPC; + case 3: + return HTTP_JSON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ProtocolBinding findValueByNumber(int number) { + return ProtocolBinding.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.Interface.getDescriptor().getEnumTypes().get(0); + } + + private static final ProtocolBinding[] VALUES = values(); + + public static ProtocolBinding valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ProtocolBinding(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.agentregistry.v1.Interface.ProtocolBinding) + } + + public static final int URL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + + /** + * + * + *
+   * Required. The destination URL.
+   * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + 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(); + url_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The destination URL.
+   * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOL_BINDING_FIELD_NUMBER = 2; + private int protocolBinding_ = 0; + + /** + * + * + *
+   * Required. The protocol binding of the interface.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Interface.ProtocolBinding protocol_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for protocolBinding. + */ + @java.lang.Override + public int getProtocolBindingValue() { + return protocolBinding_; + } + + /** + * + * + *
+   * Required. The protocol binding of the interface.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Interface.ProtocolBinding protocol_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The protocolBinding. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Interface.ProtocolBinding getProtocolBinding() { + com.google.cloud.agentregistry.v1.Interface.ProtocolBinding result = + com.google.cloud.agentregistry.v1.Interface.ProtocolBinding.forNumber(protocolBinding_); + return result == null + ? com.google.cloud.agentregistry.v1.Interface.ProtocolBinding.UNRECOGNIZED + : result; + } + + 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(url_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, url_); + } + if (protocolBinding_ + != com.google.cloud.agentregistry.v1.Interface.ProtocolBinding.PROTOCOL_BINDING_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, protocolBinding_); + } + 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(url_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, url_); + } + if (protocolBinding_ + != com.google.cloud.agentregistry.v1.Interface.ProtocolBinding.PROTOCOL_BINDING_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, protocolBinding_); + } + 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.agentregistry.v1.Interface)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Interface other = + (com.google.cloud.agentregistry.v1.Interface) obj; + + if (!getUrl().equals(other.getUrl())) return false; + if (protocolBinding_ != other.protocolBinding_) 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) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + PROTOCOL_BINDING_FIELD_NUMBER; + hash = (53 * hash) + protocolBinding_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Interface parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Interface 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.agentregistry.v1.Interface parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Interface 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.agentregistry.v1.Interface parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Interface parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Interface parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Interface 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.agentregistry.v1.Interface parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Interface 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.agentregistry.v1.Interface parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Interface 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.agentregistry.v1.Interface 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; + } + + /** + * + * + *
+   * Represents the connection details for an Agent or MCP Server.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Interface} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Interface) + com.google.cloud.agentregistry.v1.InterfaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.PropertiesProto + .internal_static_google_cloud_agentregistry_v1_Interface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.PropertiesProto + .internal_static_google_cloud_agentregistry_v1_Interface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Interface.class, + com.google.cloud.agentregistry.v1.Interface.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Interface.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + url_ = ""; + protocolBinding_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.PropertiesProto + .internal_static_google_cloud_agentregistry_v1_Interface_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Interface getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Interface.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Interface build() { + com.google.cloud.agentregistry.v1.Interface result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Interface buildPartial() { + com.google.cloud.agentregistry.v1.Interface result = + new com.google.cloud.agentregistry.v1.Interface(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Interface result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.protocolBinding_ = protocolBinding_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Interface) { + return mergeFrom((com.google.cloud.agentregistry.v1.Interface) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Interface other) { + if (other == com.google.cloud.agentregistry.v1.Interface.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.protocolBinding_ != 0) { + setProtocolBindingValue(other.getProtocolBindingValue()); + } + 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: + { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + protocolBinding_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 url_ = ""; + + /** + * + * + *
+     * Required. The destination URL.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The destination URL.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The destination URL.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The destination URL.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The destination URL.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int protocolBinding_ = 0; + + /** + * + * + *
+     * Required. The protocol binding of the interface.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Interface.ProtocolBinding protocol_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for protocolBinding. + */ + @java.lang.Override + public int getProtocolBindingValue() { + return protocolBinding_; + } + + /** + * + * + *
+     * Required. The protocol binding of the interface.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Interface.ProtocolBinding protocol_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for protocolBinding to set. + * @return This builder for chaining. + */ + public Builder setProtocolBindingValue(int value) { + protocolBinding_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The protocol binding of the interface.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Interface.ProtocolBinding protocol_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The protocolBinding. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Interface.ProtocolBinding getProtocolBinding() { + com.google.cloud.agentregistry.v1.Interface.ProtocolBinding result = + com.google.cloud.agentregistry.v1.Interface.ProtocolBinding.forNumber(protocolBinding_); + return result == null + ? com.google.cloud.agentregistry.v1.Interface.ProtocolBinding.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. The protocol binding of the interface.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Interface.ProtocolBinding protocol_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The protocolBinding to set. + * @return This builder for chaining. + */ + public Builder setProtocolBinding( + com.google.cloud.agentregistry.v1.Interface.ProtocolBinding value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + protocolBinding_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The protocol binding of the interface.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Interface.ProtocolBinding protocol_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearProtocolBinding() { + bitField0_ = (bitField0_ & ~0x00000002); + protocolBinding_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Interface) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Interface) + private static final com.google.cloud.agentregistry.v1.Interface DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Interface(); + } + + public static com.google.cloud.agentregistry.v1.Interface getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Interface 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.agentregistry.v1.Interface getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/InterfaceOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/InterfaceOrBuilder.java new file mode 100644 index 000000000000..a7cf6ef4165b --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/InterfaceOrBuilder.java @@ -0,0 +1,84 @@ +/* + * 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/agentregistry/v1/properties.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface InterfaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Interface) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The destination URL.
+   * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + java.lang.String getUrl(); + + /** + * + * + *
+   * Required. The destination URL.
+   * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + com.google.protobuf.ByteString getUrlBytes(); + + /** + * + * + *
+   * Required. The protocol binding of the interface.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Interface.ProtocolBinding protocol_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for protocolBinding. + */ + int getProtocolBindingValue(); + + /** + * + * + *
+   * Required. The protocol binding of the interface.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Interface.ProtocolBinding protocol_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The protocolBinding. + */ + com.google.cloud.agentregistry.v1.Interface.ProtocolBinding getProtocolBinding(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsRequest.java new file mode 100644 index 000000000000..dbcc69063f86 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsRequest.java @@ -0,0 +1,1278 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for requesting list of Agents
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListAgentsRequest} + */ +@com.google.protobuf.Generated +public final class ListAgentsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListAgentsRequest) + ListAgentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAgentsRequest"); + } + + // Use ListAgentsRequest.newBuilder() to construct. + private ListAgentsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAgentsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListAgentsRequest.class, + com.google.cloud.agentregistry.v1.ListAgentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListAgentsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for ListAgentsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + 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.agentregistry.v1.ListAgentsRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListAgentsRequest other = + (com.google.cloud.agentregistry.v1.ListAgentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) 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 = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.ListAgentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsRequest 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.agentregistry.v1.ListAgentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsRequest 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.agentregistry.v1.ListAgentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsRequest 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.agentregistry.v1.ListAgentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsRequest 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.agentregistry.v1.ListAgentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsRequest 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.agentregistry.v1.ListAgentsRequest 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; + } + + /** + * + * + *
+   * Message for requesting list of Agents
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListAgentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListAgentsRequest) + com.google.cloud.agentregistry.v1.ListAgentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListAgentsRequest.class, + com.google.cloud.agentregistry.v1.ListAgentsRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListAgentsRequest.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_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListAgentsRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListAgentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListAgentsRequest build() { + com.google.cloud.agentregistry.v1.ListAgentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListAgentsRequest buildPartial() { + com.google.cloud.agentregistry.v1.ListAgentsRequest result = + new com.google.cloud.agentregistry.v1.ListAgentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.ListAgentsRequest 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_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.ListAgentsRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListAgentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListAgentsRequest other) { + if (other == com.google.cloud.agentregistry.v1.ListAgentsRequest.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(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + 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 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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. Parent value for ListAgentsRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for ListAgentsRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for ListAgentsRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for ListAgentsRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListAgentsRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.ListAgentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListAgentsRequest) + private static final com.google.cloud.agentregistry.v1.ListAgentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListAgentsRequest(); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAgentsRequest 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.agentregistry.v1.ListAgentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsRequestOrBuilder.java new file mode 100644 index 000000000000..dab569c6848c --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListAgentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListAgentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListAgentsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListAgentsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsResponse.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsResponse.java new file mode 100644 index 000000000000..7aaa52d073f0 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsResponse.java @@ -0,0 +1,1110 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for response to listing Agents
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListAgentsResponse} + */ +@com.google.protobuf.Generated +public final class ListAgentsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListAgentsResponse) + ListAgentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAgentsResponse"); + } + + // Use ListAgentsResponse.newBuilder() to construct. + private ListAgentsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAgentsResponse() { + agents_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListAgentsResponse.class, + com.google.cloud.agentregistry.v1.ListAgentsResponse.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 identifying a page of results the server should return.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * 
+ * + * 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.agentregistry.v1.ListAgentsResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListAgentsResponse other = + (com.google.cloud.agentregistry.v1.ListAgentsResponse) 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.agentregistry.v1.ListAgentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsResponse 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.agentregistry.v1.ListAgentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsResponse 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.agentregistry.v1.ListAgentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsResponse 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.agentregistry.v1.ListAgentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsResponse 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.agentregistry.v1.ListAgentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsResponse 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.agentregistry.v1.ListAgentsResponse 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; + } + + /** + * + * + *
+   * Message for response to listing Agents
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListAgentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListAgentsResponse) + com.google.cloud.agentregistry.v1.ListAgentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListAgentsResponse.class, + com.google.cloud.agentregistry.v1.ListAgentsResponse.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListAgentsResponse.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListAgentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListAgentsResponse getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListAgentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListAgentsResponse build() { + com.google.cloud.agentregistry.v1.ListAgentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListAgentsResponse buildPartial() { + com.google.cloud.agentregistry.v1.ListAgentsResponse result = + new com.google.cloud.agentregistry.v1.ListAgentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistry.v1.ListAgentsResponse 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.agentregistry.v1.ListAgentsResponse 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.agentregistry.v1.ListAgentsResponse) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListAgentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListAgentsResponse other) { + if (other == com.google.cloud.agentregistry.v1.ListAgentsResponse.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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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.agentregistry.v1.ListAgentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListAgentsResponse) + private static final com.google.cloud.agentregistry.v1.ListAgentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListAgentsResponse(); + } + + public static com.google.cloud.agentregistry.v1.ListAgentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAgentsResponse 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.agentregistry.v1.ListAgentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsResponseOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsResponseOrBuilder.java new file mode 100644 index 000000000000..465d495c7339 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListAgentsResponseOrBuilder.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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListAgentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListAgentsResponse) + 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 identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsRequest.java new file mode 100644 index 000000000000..62172f25912f --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsRequest.java @@ -0,0 +1,1297 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for requesting a list of Bindings.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListBindingsRequest} + */ +@com.google.protobuf.Generated +public final class ListBindingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListBindingsRequest) + ListBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListBindingsRequest"); + } + + // Use ListBindingsRequest.newBuilder() to construct. + private ListBindingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBindingsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListBindingsRequest.class, + com.google.cloud.agentregistry.v1.ListBindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location to list bindings in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list bindings in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+   * requested. Page size is 500 if unspecified and is capped at `500` even if a
+   * larger value is given.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. A query string used to filter the list of bindings returned.
+   * The filter expression must follow AIP-160 syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A query string used to filter the list of bindings returned.
+   * The filter expression must follow AIP-160 syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + 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.agentregistry.v1.ListBindingsRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListBindingsRequest other = + (com.google.cloud.agentregistry.v1.ListBindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) 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 = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.ListBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsRequest 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.agentregistry.v1.ListBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsRequest 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.agentregistry.v1.ListBindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsRequest 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.agentregistry.v1.ListBindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsRequest 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.agentregistry.v1.ListBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsRequest 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.agentregistry.v1.ListBindingsRequest 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; + } + + /** + * + * + *
+   * Message for requesting a list of Bindings.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListBindingsRequest) + com.google.cloud.agentregistry.v1.ListBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListBindingsRequest.class, + com.google.cloud.agentregistry.v1.ListBindingsRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListBindingsRequest.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_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListBindingsRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListBindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListBindingsRequest build() { + com.google.cloud.agentregistry.v1.ListBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListBindingsRequest buildPartial() { + com.google.cloud.agentregistry.v1.ListBindingsRequest result = + new com.google.cloud.agentregistry.v1.ListBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.ListBindingsRequest 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_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.ListBindingsRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListBindingsRequest other) { + if (other == com.google.cloud.agentregistry.v1.ListBindingsRequest.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(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + 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 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 project and location to list bindings in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list bindings in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list bindings in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list bindings in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project and location to list bindings in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+     * requested. Page size is 500 if unspecified and is capped at `500` even if a
+     * larger value is given.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. Page size is 500 if unspecified and is capped at `500` even if a
+     * larger value is given.
+     * 
+ * + * 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. Requested page size. Server may return fewer items than
+     * requested. Page size is 500 if unspecified and is capped at `500` even if a
+     * larger value is given.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. A query string used to filter the list of bindings returned.
+     * The filter expression must follow AIP-160 syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of bindings returned.
+     * The filter expression must follow AIP-160 syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of bindings returned.
+     * The filter expression must follow AIP-160 syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of bindings returned.
+     * The filter expression must follow AIP-160 syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of bindings returned.
+     * The filter expression must follow AIP-160 syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.ListBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListBindingsRequest) + private static final com.google.cloud.agentregistry.v1.ListBindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListBindingsRequest(); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBindingsRequest 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.agentregistry.v1.ListBindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..1ea27fa0c4ec --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsRequestOrBuilder.java @@ -0,0 +1,155 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to list bindings in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location to list bindings in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. Page size is 500 if unspecified and is capped at `500` even if a
+   * larger value is given.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A query string used to filter the list of bindings returned.
+   * The filter expression must follow AIP-160 syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A query string used to filter the list of bindings returned.
+   * The filter expression must follow AIP-160 syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsResponse.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsResponse.java new file mode 100644 index 000000000000..62b8bc4f6f61 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsResponse.java @@ -0,0 +1,1172 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for response to listing Bindings
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListBindingsResponse} + */ +@com.google.protobuf.Generated +public final class ListBindingsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListBindingsResponse) + ListBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListBindingsResponse"); + } + + // Use ListBindingsResponse.newBuilder() to construct. + private ListBindingsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBindingsResponse() { + bindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListBindingsResponse.class, + com.google.cloud.agentregistry.v1.ListBindingsResponse.Builder.class); + } + + public static final int BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List bindings_; + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public java.util.List getBindingsList() { + return bindings_; + } + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public java.util.List + getBindingsOrBuilderList() { + return bindings_; + } + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public int getBindingsCount() { + return bindings_.size(); + } + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding getBindings(int index) { + return bindings_.get(index); + } + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingsOrBuilder(int index) { + return bindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token].
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token].
+   * 
+ * + * 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 < bindings_.size(); i++) { + output.writeMessage(1, bindings_.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 < bindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bindings_.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.agentregistry.v1.ListBindingsResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListBindingsResponse other = + (com.google.cloud.agentregistry.v1.ListBindingsResponse) obj; + + if (!getBindingsList().equals(other.getBindingsList())) 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 (getBindingsCount() > 0) { + hash = (37 * hash) + BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getBindingsList().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.agentregistry.v1.ListBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsResponse 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.agentregistry.v1.ListBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsResponse 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.agentregistry.v1.ListBindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsResponse 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.agentregistry.v1.ListBindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsResponse 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.agentregistry.v1.ListBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsResponse 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.agentregistry.v1.ListBindingsResponse 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; + } + + /** + * + * + *
+   * Message for response to listing Bindings
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListBindingsResponse) + com.google.cloud.agentregistry.v1.ListBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListBindingsResponse.class, + com.google.cloud.agentregistry.v1.ListBindingsResponse.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bindingsBuilder_ == null) { + bindings_ = java.util.Collections.emptyList(); + } else { + bindings_ = null; + bindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListBindingsResponse getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListBindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListBindingsResponse build() { + com.google.cloud.agentregistry.v1.ListBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListBindingsResponse buildPartial() { + com.google.cloud.agentregistry.v1.ListBindingsResponse result = + new com.google.cloud.agentregistry.v1.ListBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistry.v1.ListBindingsResponse result) { + if (bindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bindings_ = java.util.Collections.unmodifiableList(bindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bindings_ = bindings_; + } else { + result.bindings_ = bindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.ListBindingsResponse 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.agentregistry.v1.ListBindingsResponse) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListBindingsResponse other) { + if (other == com.google.cloud.agentregistry.v1.ListBindingsResponse.getDefaultInstance()) + return this; + if (bindingsBuilder_ == null) { + if (!other.bindings_.isEmpty()) { + if (bindings_.isEmpty()) { + bindings_ = other.bindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBindingsIsMutable(); + bindings_.addAll(other.bindings_); + } + onChanged(); + } + } else { + if (!other.bindings_.isEmpty()) { + if (bindingsBuilder_.isEmpty()) { + bindingsBuilder_.dispose(); + bindingsBuilder_ = null; + bindings_ = other.bindings_; + bitField0_ = (bitField0_ & ~0x00000001); + bindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBindingsFieldBuilder() + : null; + } else { + bindingsBuilder_.addAllMessages(other.bindings_); + } + } + } + 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.Binding m = + input.readMessage( + com.google.cloud.agentregistry.v1.Binding.parser(), extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.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 bindings_ = + java.util.Collections.emptyList(); + + private void ensureBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bindings_ = new java.util.ArrayList(bindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder> + bindingsBuilder_; + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public java.util.List getBindingsList() { + if (bindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bindings_); + } else { + return bindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public int getBindingsCount() { + if (bindingsBuilder_ == null) { + return bindings_.size(); + } else { + return bindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.Binding getBindings(int index) { + if (bindingsBuilder_ == null) { + return bindings_.get(index); + } else { + return bindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder setBindings(int index, com.google.cloud.agentregistry.v1.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.set(index, value); + onChanged(); + } else { + bindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder setBindings( + int index, com.google.cloud.agentregistry.v1.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.set(index, builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addBindings(com.google.cloud.agentregistry.v1.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.add(value); + onChanged(); + } else { + bindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addBindings(int index, com.google.cloud.agentregistry.v1.Binding value) { + if (bindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBindingsIsMutable(); + bindings_.add(index, value); + onChanged(); + } else { + bindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addBindings(com.google.cloud.agentregistry.v1.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addBindings( + int index, com.google.cloud.agentregistry.v1.Binding.Builder builderForValue) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(index, builderForValue.build()); + onChanged(); + } else { + bindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder addAllBindings( + java.lang.Iterable values) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bindings_); + onChanged(); + } else { + bindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder clearBindings() { + if (bindingsBuilder_ == null) { + bindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public Builder removeBindings(int index) { + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.remove(index); + onChanged(); + } else { + bindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.Binding.Builder getBindingsBuilder(int index) { + return internalGetBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingsOrBuilder(int index) { + if (bindingsBuilder_ == null) { + return bindings_.get(index); + } else { + return bindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public java.util.List + getBindingsOrBuilderList() { + if (bindingsBuilder_ != null) { + return bindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bindings_); + } + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.Binding.Builder addBindingsBuilder() { + return internalGetBindingsFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Binding.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public com.google.cloud.agentregistry.v1.Binding.Builder addBindingsBuilder(int index) { + return internalGetBindingsFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Binding.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Binding resources matching the parent and filter criteria in
+     * the request. Each Binding resource follows the format:
+     * `projects/{project}/locations/{location}/bindings/{binding}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + public java.util.List + getBindingsBuilderList() { + return internalGetBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder> + internalGetBindingsFieldBuilder() { + if (bindingsBuilder_ == null) { + bindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder>( + bindings_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + bindings_ = null; + } + return bindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token].
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token].
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token].
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token].
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token].
+     * 
+ * + * 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.agentregistry.v1.ListBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListBindingsResponse) + private static final com.google.cloud.agentregistry.v1.ListBindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListBindingsResponse(); + } + + public static com.google.cloud.agentregistry.v1.ListBindingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBindingsResponse 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.agentregistry.v1.ListBindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsResponseOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..946f9ecf4be5 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListBindingsResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + java.util.List getBindingsList(); + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + com.google.cloud.agentregistry.v1.Binding getBindings(int index); + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + int getBindingsCount(); + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + java.util.List + getBindingsOrBuilderList(); + + /** + * + * + *
+   * The list of Binding resources matching the parent and filter criteria in
+   * the request. Each Binding resource follows the format:
+   * `projects/{project}/locations/{location}/bindings/{binding}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Binding bindings = 1; + */ + com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token].
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token].
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsRequest.java new file mode 100644 index 000000000000..3c9e53b5ae3d --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsRequest.java @@ -0,0 +1,1181 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for requesting list of Endpoints
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListEndpointsRequest} + */ +@com.google.protobuf.Generated +public final class ListEndpointsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListEndpointsRequest) + ListEndpointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListEndpointsRequest"); + } + + // Use ListEndpointsRequest.newBuilder() to construct. + private ListEndpointsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListEndpointsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListEndpointsRequest.class, + com.google.cloud.agentregistry.v1.ListEndpointsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location to list endpoints in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list endpoints in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. A query string used to filter the list of endpoints returned.
+   * The filter expression must follow AIP-160 syntax.
+   *
+   * Filtering is supported on the `name`, `display_name`, `description`,
+   * `version`, and `interfaces` fields.
+   *
+   * Some examples:
+   *
+   * * `name = "projects/p1/locations/l1/endpoints/e1"`
+   * * `display_name = "my-endpoint"`
+   * * `description = "my-endpoint-description"`
+   * * `version = "v1"`
+   * * `interfaces.transport = "HTTP_JSON"`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A query string used to filter the list of endpoints returned.
+   * The filter expression must follow AIP-160 syntax.
+   *
+   * Filtering is supported on the `name`, `display_name`, `description`,
+   * `version`, and `interfaces` fields.
+   *
+   * Some examples:
+   *
+   * * `name = "projects/p1/locations/l1/endpoints/e1"`
+   * * `display_name = "my-endpoint"`
+   * * `description = "my-endpoint-description"`
+   * * `version = "v1"`
+   * * `interfaces.transport = "HTTP_JSON"`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + 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.agentregistry.v1.ListEndpointsRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListEndpointsRequest other = + (com.google.cloud.agentregistry.v1.ListEndpointsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) 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 = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsRequest 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.agentregistry.v1.ListEndpointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsRequest 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.agentregistry.v1.ListEndpointsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsRequest 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.agentregistry.v1.ListEndpointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsRequest 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.agentregistry.v1.ListEndpointsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsRequest 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.agentregistry.v1.ListEndpointsRequest 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; + } + + /** + * + * + *
+   * Message for requesting list of Endpoints
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListEndpointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListEndpointsRequest) + com.google.cloud.agentregistry.v1.ListEndpointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListEndpointsRequest.class, + com.google.cloud.agentregistry.v1.ListEndpointsRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListEndpointsRequest.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_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListEndpointsRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListEndpointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListEndpointsRequest build() { + com.google.cloud.agentregistry.v1.ListEndpointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListEndpointsRequest buildPartial() { + com.google.cloud.agentregistry.v1.ListEndpointsRequest result = + new com.google.cloud.agentregistry.v1.ListEndpointsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.ListEndpointsRequest 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_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.ListEndpointsRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListEndpointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListEndpointsRequest other) { + if (other == com.google.cloud.agentregistry.v1.ListEndpointsRequest.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(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + 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 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 project and location to list endpoints in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list endpoints in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list endpoints in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list endpoints in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project and location to list endpoints in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. A query string used to filter the list of endpoints returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * `version`, and `interfaces` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/endpoints/e1"`
+     * * `display_name = "my-endpoint"`
+     * * `description = "my-endpoint-description"`
+     * * `version = "v1"`
+     * * `interfaces.transport = "HTTP_JSON"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of endpoints returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * `version`, and `interfaces` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/endpoints/e1"`
+     * * `display_name = "my-endpoint"`
+     * * `description = "my-endpoint-description"`
+     * * `version = "v1"`
+     * * `interfaces.transport = "HTTP_JSON"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of endpoints returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * `version`, and `interfaces` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/endpoints/e1"`
+     * * `display_name = "my-endpoint"`
+     * * `description = "my-endpoint-description"`
+     * * `version = "v1"`
+     * * `interfaces.transport = "HTTP_JSON"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of endpoints returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * `version`, and `interfaces` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/endpoints/e1"`
+     * * `display_name = "my-endpoint"`
+     * * `description = "my-endpoint-description"`
+     * * `version = "v1"`
+     * * `interfaces.transport = "HTTP_JSON"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of endpoints returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * `version`, and `interfaces` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/endpoints/e1"`
+     * * `display_name = "my-endpoint"`
+     * * `description = "my-endpoint-description"`
+     * * `version = "v1"`
+     * * `interfaces.transport = "HTTP_JSON"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.ListEndpointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListEndpointsRequest) + private static final com.google.cloud.agentregistry.v1.ListEndpointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListEndpointsRequest(); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEndpointsRequest 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.agentregistry.v1.ListEndpointsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsRequestOrBuilder.java new file mode 100644 index 000000000000..8fb3a2cf58f5 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListEndpointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListEndpointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to list endpoints in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location to list endpoints in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A query string used to filter the list of endpoints returned.
+   * The filter expression must follow AIP-160 syntax.
+   *
+   * Filtering is supported on the `name`, `display_name`, `description`,
+   * `version`, and `interfaces` fields.
+   *
+   * Some examples:
+   *
+   * * `name = "projects/p1/locations/l1/endpoints/e1"`
+   * * `display_name = "my-endpoint"`
+   * * `description = "my-endpoint-description"`
+   * * `version = "v1"`
+   * * `interfaces.transport = "HTTP_JSON"`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A query string used to filter the list of endpoints returned.
+   * The filter expression must follow AIP-160 syntax.
+   *
+   * Filtering is supported on the `name`, `display_name`, `description`,
+   * `version`, and `interfaces` fields.
+   *
+   * Some examples:
+   *
+   * * `name = "projects/p1/locations/l1/endpoints/e1"`
+   * * `display_name = "my-endpoint"`
+   * * `description = "my-endpoint-description"`
+   * * `version = "v1"`
+   * * `interfaces.transport = "HTTP_JSON"`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsResponse.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsResponse.java new file mode 100644 index 000000000000..b5042e191fd6 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsResponse.java @@ -0,0 +1,1174 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for response to listing Endpoints
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListEndpointsResponse} + */ +@com.google.protobuf.Generated +public final class ListEndpointsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListEndpointsResponse) + ListEndpointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListEndpointsResponse"); + } + + // Use ListEndpointsResponse.newBuilder() to construct. + private ListEndpointsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListEndpointsResponse() { + endpoints_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListEndpointsResponse.class, + com.google.cloud.agentregistry.v1.ListEndpointsResponse.Builder.class); + } + + public static final int ENDPOINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List endpoints_; + + /** + * + * + *
+   * The list of Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public java.util.List getEndpointsList() { + return endpoints_; + } + + /** + * + * + *
+   * The list of Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public java.util.List + getEndpointsOrBuilderList() { + return endpoints_; + } + + /** + * + * + *
+   * The list of Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + @java.lang.Override + public int getEndpointsCount() { + return endpoints_.size(); + } + + /** + * + * + *
+   * The list of Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token].
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token].
+   * 
+ * + * 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.agentregistry.v1.ListEndpointsResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListEndpointsResponse other = + (com.google.cloud.agentregistry.v1.ListEndpointsResponse) 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.agentregistry.v1.ListEndpointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsResponse 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.agentregistry.v1.ListEndpointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsResponse 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.agentregistry.v1.ListEndpointsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsResponse 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.agentregistry.v1.ListEndpointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsResponse 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.agentregistry.v1.ListEndpointsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsResponse 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.agentregistry.v1.ListEndpointsResponse 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; + } + + /** + * + * + *
+   * Message for response to listing Endpoints
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListEndpointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListEndpointsResponse) + com.google.cloud.agentregistry.v1.ListEndpointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListEndpointsResponse.class, + com.google.cloud.agentregistry.v1.ListEndpointsResponse.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListEndpointsResponse.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListEndpointsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListEndpointsResponse getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListEndpointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListEndpointsResponse build() { + com.google.cloud.agentregistry.v1.ListEndpointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListEndpointsResponse buildPartial() { + com.google.cloud.agentregistry.v1.ListEndpointsResponse result = + new com.google.cloud.agentregistry.v1.ListEndpointsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistry.v1.ListEndpointsResponse 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.agentregistry.v1.ListEndpointsResponse 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.agentregistry.v1.ListEndpointsResponse) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListEndpointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListEndpointsResponse other) { + if (other == com.google.cloud.agentregistry.v1.ListEndpointsResponse.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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + public int getEndpointsCount() { + if (endpointsBuilder_ == null) { + return endpoints_.size(); + } else { + return endpointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 Endpoint resources matching the parent and filter criteria in
+     * the request. Each Endpoint resource follows the format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token].
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token].
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token].
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token].
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token].
+     * 
+ * + * 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.agentregistry.v1.ListEndpointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListEndpointsResponse) + private static final com.google.cloud.agentregistry.v1.ListEndpointsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListEndpointsResponse(); + } + + public static com.google.cloud.agentregistry.v1.ListEndpointsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEndpointsResponse 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.agentregistry.v1.ListEndpointsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsResponseOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsResponseOrBuilder.java new file mode 100644 index 000000000000..c4c1fb82eb4e --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListEndpointsResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListEndpointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListEndpointsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + java.util.List getEndpointsList(); + + /** + * + * + *
+   * The list of Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + com.google.cloud.agentregistry.v1.Endpoint getEndpoints(int index); + + /** + * + * + *
+   * The list of Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + int getEndpointsCount(); + + /** + * + * + *
+   * The list of Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + java.util.List + getEndpointsOrBuilderList(); + + /** + * + * + *
+   * The list of Endpoint resources matching the parent and filter criteria in
+   * the request. Each Endpoint resource follows the format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Endpoint endpoints = 1; + */ + com.google.cloud.agentregistry.v1.EndpointOrBuilder getEndpointsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token].
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token].
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersRequest.java new file mode 100644 index 000000000000..ad2987c51f58 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersRequest.java @@ -0,0 +1,1286 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for requesting list of McpServers
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListMcpServersRequest} + */ +@com.google.protobuf.Generated +public final class ListMcpServersRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListMcpServersRequest) + ListMcpServersRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMcpServersRequest"); + } + + // Use ListMcpServersRequest.newBuilder() to construct. + private ListMcpServersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMcpServersRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListMcpServersRequest.class, + com.google.cloud.agentregistry.v1.ListMcpServersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListMcpServersRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for ListMcpServersRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + 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.agentregistry.v1.ListMcpServersRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListMcpServersRequest other = + (com.google.cloud.agentregistry.v1.ListMcpServersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) 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 = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersRequest 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.agentregistry.v1.ListMcpServersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersRequest 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.agentregistry.v1.ListMcpServersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersRequest 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.agentregistry.v1.ListMcpServersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersRequest 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.agentregistry.v1.ListMcpServersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersRequest 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.agentregistry.v1.ListMcpServersRequest 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; + } + + /** + * + * + *
+   * Message for requesting list of McpServers
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListMcpServersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListMcpServersRequest) + com.google.cloud.agentregistry.v1.ListMcpServersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListMcpServersRequest.class, + com.google.cloud.agentregistry.v1.ListMcpServersRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListMcpServersRequest.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_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListMcpServersRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListMcpServersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListMcpServersRequest build() { + com.google.cloud.agentregistry.v1.ListMcpServersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListMcpServersRequest buildPartial() { + com.google.cloud.agentregistry.v1.ListMcpServersRequest result = + new com.google.cloud.agentregistry.v1.ListMcpServersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.ListMcpServersRequest 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_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.ListMcpServersRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListMcpServersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListMcpServersRequest other) { + if (other == com.google.cloud.agentregistry.v1.ListMcpServersRequest.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(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + 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 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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. Parent value for ListMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for ListMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for ListMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for ListMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.ListMcpServersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListMcpServersRequest) + private static final com.google.cloud.agentregistry.v1.ListMcpServersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListMcpServersRequest(); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMcpServersRequest 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.agentregistry.v1.ListMcpServersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersRequestOrBuilder.java new file mode 100644 index 000000000000..fcfc678930ad --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListMcpServersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListMcpServersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListMcpServersRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListMcpServersRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersResponse.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersResponse.java new file mode 100644 index 000000000000..28c0f87a75f7 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersResponse.java @@ -0,0 +1,1114 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for response to listing McpServers
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListMcpServersResponse} + */ +@com.google.protobuf.Generated +public final class ListMcpServersResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListMcpServersResponse) + ListMcpServersResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMcpServersResponse"); + } + + // Use ListMcpServersResponse.newBuilder() to construct. + private ListMcpServersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMcpServersResponse() { + mcpServers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListMcpServersResponse.class, + com.google.cloud.agentregistry.v1.ListMcpServersResponse.Builder.class); + } + + public static final int MCP_SERVERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List mcpServers_; + + /** + * + * + *
+   * The list of McpServers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public java.util.List getMcpServersList() { + return mcpServers_; + } + + /** + * + * + *
+   * The list of McpServers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public java.util.List + getMcpServersOrBuilderList() { + return mcpServers_; + } + + /** + * + * + *
+   * The list of McpServers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public int getMcpServersCount() { + return mcpServers_.size(); + } + + /** + * + * + *
+   * The list of McpServers.
+   * 
+ * + * 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 McpServers.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * 
+ * + * 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.agentregistry.v1.ListMcpServersResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListMcpServersResponse other = + (com.google.cloud.agentregistry.v1.ListMcpServersResponse) 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.agentregistry.v1.ListMcpServersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersResponse 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.agentregistry.v1.ListMcpServersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersResponse 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.agentregistry.v1.ListMcpServersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersResponse 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.agentregistry.v1.ListMcpServersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersResponse 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.agentregistry.v1.ListMcpServersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersResponse 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.agentregistry.v1.ListMcpServersResponse 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; + } + + /** + * + * + *
+   * Message for response to listing McpServers
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListMcpServersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListMcpServersResponse) + com.google.cloud.agentregistry.v1.ListMcpServersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListMcpServersResponse.class, + com.google.cloud.agentregistry.v1.ListMcpServersResponse.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListMcpServersResponse.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListMcpServersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListMcpServersResponse getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListMcpServersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListMcpServersResponse build() { + com.google.cloud.agentregistry.v1.ListMcpServersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListMcpServersResponse buildPartial() { + com.google.cloud.agentregistry.v1.ListMcpServersResponse result = + new com.google.cloud.agentregistry.v1.ListMcpServersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistry.v1.ListMcpServersResponse 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.agentregistry.v1.ListMcpServersResponse 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.agentregistry.v1.ListMcpServersResponse) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListMcpServersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListMcpServersResponse other) { + if (other == com.google.cloud.agentregistry.v1.ListMcpServersResponse.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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 McpServers.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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.agentregistry.v1.ListMcpServersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListMcpServersResponse) + private static final com.google.cloud.agentregistry.v1.ListMcpServersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListMcpServersResponse(); + } + + public static com.google.cloud.agentregistry.v1.ListMcpServersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMcpServersResponse 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.agentregistry.v1.ListMcpServersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersResponseOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersResponseOrBuilder.java new file mode 100644 index 000000000000..5afac75094c0 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListMcpServersResponseOrBuilder.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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListMcpServersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListMcpServersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of McpServers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + java.util.List getMcpServersList(); + + /** + * + * + *
+   * The list of McpServers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + com.google.cloud.agentregistry.v1.McpServer getMcpServers(int index); + + /** + * + * + *
+   * The list of McpServers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + int getMcpServersCount(); + + /** + * + * + *
+   * The list of McpServers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + java.util.List + getMcpServersOrBuilderList(); + + /** + * + * + *
+   * The list of McpServers.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + com.google.cloud.agentregistry.v1.McpServerOrBuilder getMcpServersOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesRequest.java new file mode 100644 index 000000000000..61e644b1f2f0 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesRequest.java @@ -0,0 +1,1174 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for requesting list of Services
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListServicesRequest} + */ +@com.google.protobuf.Generated +public final class ListServicesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListServicesRequest) + ListServicesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListServicesRequest"); + } + + // Use ListServicesRequest.newBuilder() to construct. + private ListServicesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListServicesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListServicesRequest.class, + com.google.cloud.agentregistry.v1.ListServicesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location to list services in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list services in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. A query string used to filter the list of services returned.
+   * The filter expression must follow AIP-160 syntax.
+   *
+   * Filtering is supported on the `name`, `display_name`, `description`,
+   * and `labels` fields.
+   *
+   * Some examples:
+   *
+   * * `name = "projects/p1/locations/l1/services/s1"`
+   * * `display_name = "my-service"`
+   * * `description : "myservice description"`
+   * * `labels.env = "prod"`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A query string used to filter the list of services returned.
+   * The filter expression must follow AIP-160 syntax.
+   *
+   * Filtering is supported on the `name`, `display_name`, `description`,
+   * and `labels` fields.
+   *
+   * Some examples:
+   *
+   * * `name = "projects/p1/locations/l1/services/s1"`
+   * * `display_name = "my-service"`
+   * * `description : "myservice description"`
+   * * `labels.env = "prod"`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + 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.agentregistry.v1.ListServicesRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListServicesRequest other = + (com.google.cloud.agentregistry.v1.ListServicesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) 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 = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.ListServicesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListServicesRequest 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.agentregistry.v1.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListServicesRequest 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.agentregistry.v1.ListServicesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListServicesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListServicesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListServicesRequest 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.agentregistry.v1.ListServicesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListServicesRequest 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.agentregistry.v1.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListServicesRequest 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.agentregistry.v1.ListServicesRequest 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; + } + + /** + * + * + *
+   * Message for requesting list of Services
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListServicesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListServicesRequest) + com.google.cloud.agentregistry.v1.ListServicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListServicesRequest.class, + com.google.cloud.agentregistry.v1.ListServicesRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListServicesRequest.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_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListServicesRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListServicesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListServicesRequest build() { + com.google.cloud.agentregistry.v1.ListServicesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListServicesRequest buildPartial() { + com.google.cloud.agentregistry.v1.ListServicesRequest result = + new com.google.cloud.agentregistry.v1.ListServicesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.ListServicesRequest 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_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.ListServicesRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListServicesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListServicesRequest other) { + if (other == com.google.cloud.agentregistry.v1.ListServicesRequest.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(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + 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 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 project and location to list services in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list services in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list services in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 project and location to list services in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project and location to list services in.
+     * Expected format: `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. A query string used to filter the list of services returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * and `labels` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/services/s1"`
+     * * `display_name = "my-service"`
+     * * `description : "myservice description"`
+     * * `labels.env = "prod"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of services returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * and `labels` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/services/s1"`
+     * * `display_name = "my-service"`
+     * * `description : "myservice description"`
+     * * `labels.env = "prod"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of services returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * and `labels` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/services/s1"`
+     * * `display_name = "my-service"`
+     * * `description : "myservice description"`
+     * * `labels.env = "prod"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of services returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * and `labels` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/services/s1"`
+     * * `display_name = "my-service"`
+     * * `description : "myservice description"`
+     * * `labels.env = "prod"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A query string used to filter the list of services returned.
+     * The filter expression must follow AIP-160 syntax.
+     *
+     * Filtering is supported on the `name`, `display_name`, `description`,
+     * and `labels` fields.
+     *
+     * Some examples:
+     *
+     * * `name = "projects/p1/locations/l1/services/s1"`
+     * * `display_name = "my-service"`
+     * * `description : "myservice description"`
+     * * `labels.env = "prod"`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.ListServicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListServicesRequest) + private static final com.google.cloud.agentregistry.v1.ListServicesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListServicesRequest(); + } + + public static com.google.cloud.agentregistry.v1.ListServicesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesRequest 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.agentregistry.v1.ListServicesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesRequestOrBuilder.java new file mode 100644 index 000000000000..293526d8c731 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesRequestOrBuilder.java @@ -0,0 +1,148 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListServicesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListServicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to list services in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location to list services in.
+   * Expected format: `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A query string used to filter the list of services returned.
+   * The filter expression must follow AIP-160 syntax.
+   *
+   * Filtering is supported on the `name`, `display_name`, `description`,
+   * and `labels` fields.
+   *
+   * Some examples:
+   *
+   * * `name = "projects/p1/locations/l1/services/s1"`
+   * * `display_name = "my-service"`
+   * * `description : "myservice description"`
+   * * `labels.env = "prod"`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A query string used to filter the list of services returned.
+   * The filter expression must follow AIP-160 syntax.
+   *
+   * Filtering is supported on the `name`, `display_name`, `description`,
+   * and `labels` fields.
+   *
+   * Some examples:
+   *
+   * * `name = "projects/p1/locations/l1/services/s1"`
+   * * `display_name = "my-service"`
+   * * `description : "myservice description"`
+   * * `labels.env = "prod"`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesResponse.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesResponse.java new file mode 100644 index 000000000000..02253a84eeb9 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesResponse.java @@ -0,0 +1,1172 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for response to listing Services
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListServicesResponse} + */ +@com.google.protobuf.Generated +public final class ListServicesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.ListServicesResponse) + ListServicesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListServicesResponse"); + } + + // Use ListServicesResponse.newBuilder() to construct. + private ListServicesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListServicesResponse() { + services_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListServicesResponse.class, + com.google.cloud.agentregistry.v1.ListServicesResponse.Builder.class); + } + + public static final int SERVICES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List services_; + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + @java.lang.Override + public java.util.List getServicesList() { + return services_; + } + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + @java.lang.Override + public java.util.List + getServicesOrBuilderList() { + return services_; + } + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + @java.lang.Override + public int getServicesCount() { + return services_.size(); + } + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service getServices(int index) { + return services_.get(index); + } + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.ServiceOrBuilder getServicesOrBuilder(int index) { + return services_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token].
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token].
+   * 
+ * + * 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 < services_.size(); i++) { + output.writeMessage(1, services_.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 < services_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.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.agentregistry.v1.ListServicesResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.ListServicesResponse other = + (com.google.cloud.agentregistry.v1.ListServicesResponse) obj; + + if (!getServicesList().equals(other.getServicesList())) 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 (getServicesCount() > 0) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServicesList().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.agentregistry.v1.ListServicesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListServicesResponse 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.agentregistry.v1.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListServicesResponse 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.agentregistry.v1.ListServicesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.ListServicesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.ListServicesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListServicesResponse 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.agentregistry.v1.ListServicesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListServicesResponse 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.agentregistry.v1.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.ListServicesResponse 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.agentregistry.v1.ListServicesResponse 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; + } + + /** + * + * + *
+   * Message for response to listing Services
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.ListServicesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.ListServicesResponse) + com.google.cloud.agentregistry.v1.ListServicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.ListServicesResponse.class, + com.google.cloud.agentregistry.v1.ListServicesResponse.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.ListServicesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + } else { + services_ = null; + servicesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListServicesResponse getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.ListServicesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListServicesResponse build() { + com.google.cloud.agentregistry.v1.ListServicesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.ListServicesResponse buildPartial() { + com.google.cloud.agentregistry.v1.ListServicesResponse result = + new com.google.cloud.agentregistry.v1.ListServicesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistry.v1.ListServicesResponse result) { + if (servicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + services_ = java.util.Collections.unmodifiableList(services_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.services_ = services_; + } else { + result.services_ = servicesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.ListServicesResponse 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.agentregistry.v1.ListServicesResponse) { + return mergeFrom((com.google.cloud.agentregistry.v1.ListServicesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.ListServicesResponse other) { + if (other == com.google.cloud.agentregistry.v1.ListServicesResponse.getDefaultInstance()) + return this; + if (servicesBuilder_ == null) { + if (!other.services_.isEmpty()) { + if (services_.isEmpty()) { + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServicesIsMutable(); + services_.addAll(other.services_); + } + onChanged(); + } + } else { + if (!other.services_.isEmpty()) { + if (servicesBuilder_.isEmpty()) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + servicesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetServicesFieldBuilder() + : null; + } else { + servicesBuilder_.addAllMessages(other.services_); + } + } + } + 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.Service m = + input.readMessage( + com.google.cloud.agentregistry.v1.Service.parser(), extensionRegistry); + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(m); + } else { + servicesBuilder_.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 services_ = + java.util.Collections.emptyList(); + + private void ensureServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + services_ = new java.util.ArrayList(services_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Service, + com.google.cloud.agentregistry.v1.Service.Builder, + com.google.cloud.agentregistry.v1.ServiceOrBuilder> + servicesBuilder_; + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public java.util.List getServicesList() { + if (servicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(services_); + } else { + return servicesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public int getServicesCount() { + if (servicesBuilder_ == null) { + return services_.size(); + } else { + return servicesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public com.google.cloud.agentregistry.v1.Service getServices(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public Builder setServices(int index, com.google.cloud.agentregistry.v1.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.set(index, value); + onChanged(); + } else { + servicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public Builder setServices( + int index, com.google.cloud.agentregistry.v1.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.set(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public Builder addServices(com.google.cloud.agentregistry.v1.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(value); + onChanged(); + } else { + servicesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public Builder addServices(int index, com.google.cloud.agentregistry.v1.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(index, value); + onChanged(); + } else { + servicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public Builder addServices(com.google.cloud.agentregistry.v1.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public Builder addServices( + int index, com.google.cloud.agentregistry.v1.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public Builder addAllServices( + java.lang.Iterable values) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, services_); + onChanged(); + } else { + servicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public Builder clearServices() { + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servicesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public Builder removeServices(int index) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.remove(index); + onChanged(); + } else { + servicesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public com.google.cloud.agentregistry.v1.Service.Builder getServicesBuilder(int index) { + return internalGetServicesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public com.google.cloud.agentregistry.v1.ServiceOrBuilder getServicesOrBuilder(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public java.util.List + getServicesOrBuilderList() { + if (servicesBuilder_ != null) { + return servicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(services_); + } + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public com.google.cloud.agentregistry.v1.Service.Builder addServicesBuilder() { + return internalGetServicesFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Service.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public com.google.cloud.agentregistry.v1.Service.Builder addServicesBuilder(int index) { + return internalGetServicesFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Service.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Service resources matching the parent and filter criteria in
+     * the request. Each Service resource follows the format:
+     * `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + public java.util.List + getServicesBuilderList() { + return internalGetServicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Service, + com.google.cloud.agentregistry.v1.Service.Builder, + com.google.cloud.agentregistry.v1.ServiceOrBuilder> + internalGetServicesFieldBuilder() { + if (servicesBuilder_ == null) { + servicesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Service, + com.google.cloud.agentregistry.v1.Service.Builder, + com.google.cloud.agentregistry.v1.ServiceOrBuilder>( + services_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + services_ = null; + } + return servicesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token].
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token].
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token].
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token].
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * Used in
+     * [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token].
+     * 
+ * + * 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.agentregistry.v1.ListServicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.ListServicesResponse) + private static final com.google.cloud.agentregistry.v1.ListServicesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.ListServicesResponse(); + } + + public static com.google.cloud.agentregistry.v1.ListServicesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesResponse 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.agentregistry.v1.ListServicesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesResponseOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesResponseOrBuilder.java new file mode 100644 index 000000000000..5afe8c22c8a9 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ListServicesResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ListServicesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.ListServicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + java.util.List getServicesList(); + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + com.google.cloud.agentregistry.v1.Service getServices(int index); + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + int getServicesCount(); + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + java.util.List + getServicesOrBuilderList(); + + /** + * + * + *
+   * The list of Service resources matching the parent and filter criteria in
+   * the request. Each Service resource follows the format:
+   * `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Service services = 1; + */ + com.google.cloud.agentregistry.v1.ServiceOrBuilder getServicesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token].
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * Used in
+   * [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token].
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/LocationName.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/LocationName.java new file mode 100644 index 000000000000..e57dd2193634 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServer.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServer.java new file mode 100644 index 000000000000..89bc6699b268 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServer.java @@ -0,0 +1,5725 @@ +/* + * 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/agentregistry/v1/mcp_server.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Represents an MCP (Model Context Protocol) Server.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.McpServer} + */ +@com.google.protobuf.Generated +public final class McpServer extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.McpServer) + McpServerOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "McpServer"); + } + + // Use McpServer.newBuilder() to construct. + private McpServer(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private McpServer() { + name_ = ""; + mcpServerId_ = ""; + displayName_ = ""; + description_ = ""; + interfaces_ = java.util.Collections.emptyList(); + tools_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.McpServer.class, + com.google.cloud.agentregistry.v1.McpServer.Builder.class); + } + + public interface ToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.McpServer.Tool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Human-readable name of the tool.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+     * Output only. Human-readable name of the tool.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Output only. Description of what the tool does.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+     * Output only. Description of what the tool does.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Output only. Annotations associated with the tool.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annotations field is set. + */ + boolean hasAnnotations(); + + /** + * + * + *
+     * Output only. Annotations associated with the tool.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annotations. + */ + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations getAnnotations(); + + /** + * + * + *
+     * Output only. Annotations associated with the tool.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.McpServer.Tool.AnnotationsOrBuilder getAnnotationsOrBuilder(); + } + + /** + * + * + *
+   * Represents a single tool provided by an MCP Server.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.McpServer.Tool} + */ + public static final class Tool extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.McpServer.Tool) + ToolOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Tool"); + } + + // Use Tool.newBuilder() to construct. + private Tool(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Tool() { + name_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.McpServer.Tool.class, + com.google.cloud.agentregistry.v1.McpServer.Tool.Builder.class); + } + + public interface AnnotationsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.McpServer.Tool.Annotations) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Output only. A human-readable title for the tool.
+       * 
+ * + * string title = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
+       * Output only. A human-readable title for the tool.
+       * 
+ * + * string title = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+       * Output only. If true, the tool may perform destructive updates to its
+       * environment. If false, the tool performs only additive updates. NOTE:
+       * This property is meaningful only when `read_only_hint == false`
+       * Default: true
+       * 
+ * + * bool destructive_hint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destructiveHint. + */ + boolean getDestructiveHint(); + + /** + * + * + *
+       * Output only. If true, calling the tool repeatedly with the same
+       * arguments will have no additional effect on its environment. NOTE: This
+       * property is meaningful only when `read_only_hint == false` Default:
+       * false
+       * 
+ * + * bool idempotent_hint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The idempotentHint. + */ + boolean getIdempotentHint(); + + /** + * + * + *
+       * Output only. If true, this tool may interact with an "open world" of
+       * external entities. If false, the tool's domain of interaction is
+       * closed. For example, the world of a web search tool is open, whereas
+       * that of a memory tool is not. Default: true
+       * 
+ * + * bool open_world_hint = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The openWorldHint. + */ + boolean getOpenWorldHint(); + + /** + * + * + *
+       * Output only. If true, the tool does not modify its environment.
+       * Default: false
+       * 
+ * + * bool read_only_hint = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The readOnlyHint. + */ + boolean getReadOnlyHint(); + } + + /** + * + * + *
+     * Annotations describing the characteristics and behavior of a tool or
+     * operation.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.McpServer.Tool.Annotations} + */ + public static final class Annotations extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.McpServer.Tool.Annotations) + AnnotationsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Annotations"); + } + + // Use Annotations.newBuilder() to construct. + private Annotations(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Annotations() { + title_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.class, + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.Builder.class); + } + + public static final int TITLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
+       * Output only. A human-readable title for the tool.
+       * 
+ * + * string title = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + + /** + * + * + *
+       * Output only. A human-readable title for the tool.
+       * 
+ * + * string title = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTRUCTIVE_HINT_FIELD_NUMBER = 2; + private boolean destructiveHint_ = false; + + /** + * + * + *
+       * Output only. If true, the tool may perform destructive updates to its
+       * environment. If false, the tool performs only additive updates. NOTE:
+       * This property is meaningful only when `read_only_hint == false`
+       * Default: true
+       * 
+ * + * bool destructive_hint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destructiveHint. + */ + @java.lang.Override + public boolean getDestructiveHint() { + return destructiveHint_; + } + + public static final int IDEMPOTENT_HINT_FIELD_NUMBER = 3; + private boolean idempotentHint_ = false; + + /** + * + * + *
+       * Output only. If true, calling the tool repeatedly with the same
+       * arguments will have no additional effect on its environment. NOTE: This
+       * property is meaningful only when `read_only_hint == false` Default:
+       * false
+       * 
+ * + * bool idempotent_hint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The idempotentHint. + */ + @java.lang.Override + public boolean getIdempotentHint() { + return idempotentHint_; + } + + public static final int OPEN_WORLD_HINT_FIELD_NUMBER = 4; + private boolean openWorldHint_ = false; + + /** + * + * + *
+       * Output only. If true, this tool may interact with an "open world" of
+       * external entities. If false, the tool's domain of interaction is
+       * closed. For example, the world of a web search tool is open, whereas
+       * that of a memory tool is not. Default: true
+       * 
+ * + * bool open_world_hint = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The openWorldHint. + */ + @java.lang.Override + public boolean getOpenWorldHint() { + return openWorldHint_; + } + + public static final int READ_ONLY_HINT_FIELD_NUMBER = 5; + private boolean readOnlyHint_ = false; + + /** + * + * + *
+       * Output only. If true, the tool does not modify its environment.
+       * Default: false
+       * 
+ * + * bool read_only_hint = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The readOnlyHint. + */ + @java.lang.Override + public boolean getReadOnlyHint() { + return readOnlyHint_; + } + + 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(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, title_); + } + if (destructiveHint_ != false) { + output.writeBool(2, destructiveHint_); + } + if (idempotentHint_ != false) { + output.writeBool(3, idempotentHint_); + } + if (openWorldHint_ != false) { + output.writeBool(4, openWorldHint_); + } + if (readOnlyHint_ != false) { + output.writeBool(5, readOnlyHint_); + } + 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(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, title_); + } + if (destructiveHint_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, destructiveHint_); + } + if (idempotentHint_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, idempotentHint_); + } + if (openWorldHint_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, openWorldHint_); + } + if (readOnlyHint_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, readOnlyHint_); + } + 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.agentregistry.v1.McpServer.Tool.Annotations)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations other = + (com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations) obj; + + if (!getTitle().equals(other.getTitle())) return false; + if (getDestructiveHint() != other.getDestructiveHint()) return false; + if (getIdempotentHint() != other.getIdempotentHint()) return false; + if (getOpenWorldHint() != other.getOpenWorldHint()) return false; + if (getReadOnlyHint() != other.getReadOnlyHint()) 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) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESTRUCTIVE_HINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDestructiveHint()); + hash = (37 * hash) + IDEMPOTENT_HINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIdempotentHint()); + hash = (37 * hash) + OPEN_WORLD_HINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOpenWorldHint()); + hash = (37 * hash) + READ_ONLY_HINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReadOnlyHint()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations 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.agentregistry.v1.McpServer.Tool.Annotations parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations 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.agentregistry.v1.McpServer.Tool.Annotations parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations 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.agentregistry.v1.McpServer.Tool.Annotations parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations 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.agentregistry.v1.McpServer.Tool.Annotations parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations 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.agentregistry.v1.McpServer.Tool.Annotations 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; + } + + /** + * + * + *
+       * Annotations describing the characteristics and behavior of a tool or
+       * operation.
+       * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.McpServer.Tool.Annotations} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.McpServer.Tool.Annotations) + com.google.cloud.agentregistry.v1.McpServer.Tool.AnnotationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.class, + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + destructiveHint_ = false; + idempotentHint_ = false; + openWorldHint_ = false; + readOnlyHint_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations + getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations build() { + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations buildPartial() { + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations result = + new com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.destructiveHint_ = destructiveHint_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.idempotentHint_ = idempotentHint_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.openWorldHint_ = openWorldHint_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.readOnlyHint_ = readOnlyHint_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations) { + return mergeFrom((com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations other) { + if (other + == com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.getDefaultInstance()) + return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDestructiveHint() != false) { + setDestructiveHint(other.getDestructiveHint()); + } + if (other.getIdempotentHint() != false) { + setIdempotentHint(other.getIdempotentHint()); + } + if (other.getOpenWorldHint() != false) { + setOpenWorldHint(other.getOpenWorldHint()); + } + if (other.getReadOnlyHint() != false) { + setReadOnlyHint(other.getReadOnlyHint()); + } + 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: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + destructiveHint_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + idempotentHint_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + openWorldHint_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + readOnlyHint_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + 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 title_ = ""; + + /** + * + * + *
+         * Output only. A human-readable title for the tool.
+         * 
+ * + * string title = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+         * Output only. A human-readable title for the tool.
+         * 
+ * + * string title = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+         * Output only. A human-readable title for the tool.
+         * 
+ * + * string title = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. A human-readable title for the tool.
+         * 
+ * + * string title = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. A human-readable title for the tool.
+         * 
+ * + * string title = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean destructiveHint_; + + /** + * + * + *
+         * Output only. If true, the tool may perform destructive updates to its
+         * environment. If false, the tool performs only additive updates. NOTE:
+         * This property is meaningful only when `read_only_hint == false`
+         * Default: true
+         * 
+ * + * bool destructive_hint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destructiveHint. + */ + @java.lang.Override + public boolean getDestructiveHint() { + return destructiveHint_; + } + + /** + * + * + *
+         * Output only. If true, the tool may perform destructive updates to its
+         * environment. If false, the tool performs only additive updates. NOTE:
+         * This property is meaningful only when `read_only_hint == false`
+         * Default: true
+         * 
+ * + * bool destructive_hint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The destructiveHint to set. + * @return This builder for chaining. + */ + public Builder setDestructiveHint(boolean value) { + + destructiveHint_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. If true, the tool may perform destructive updates to its
+         * environment. If false, the tool performs only additive updates. NOTE:
+         * This property is meaningful only when `read_only_hint == false`
+         * Default: true
+         * 
+ * + * bool destructive_hint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDestructiveHint() { + bitField0_ = (bitField0_ & ~0x00000002); + destructiveHint_ = false; + onChanged(); + return this; + } + + private boolean idempotentHint_; + + /** + * + * + *
+         * Output only. If true, calling the tool repeatedly with the same
+         * arguments will have no additional effect on its environment. NOTE: This
+         * property is meaningful only when `read_only_hint == false` Default:
+         * false
+         * 
+ * + * bool idempotent_hint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The idempotentHint. + */ + @java.lang.Override + public boolean getIdempotentHint() { + return idempotentHint_; + } + + /** + * + * + *
+         * Output only. If true, calling the tool repeatedly with the same
+         * arguments will have no additional effect on its environment. NOTE: This
+         * property is meaningful only when `read_only_hint == false` Default:
+         * false
+         * 
+ * + * bool idempotent_hint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The idempotentHint to set. + * @return This builder for chaining. + */ + public Builder setIdempotentHint(boolean value) { + + idempotentHint_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. If true, calling the tool repeatedly with the same
+         * arguments will have no additional effect on its environment. NOTE: This
+         * property is meaningful only when `read_only_hint == false` Default:
+         * false
+         * 
+ * + * bool idempotent_hint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIdempotentHint() { + bitField0_ = (bitField0_ & ~0x00000004); + idempotentHint_ = false; + onChanged(); + return this; + } + + private boolean openWorldHint_; + + /** + * + * + *
+         * Output only. If true, this tool may interact with an "open world" of
+         * external entities. If false, the tool's domain of interaction is
+         * closed. For example, the world of a web search tool is open, whereas
+         * that of a memory tool is not. Default: true
+         * 
+ * + * bool open_world_hint = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The openWorldHint. + */ + @java.lang.Override + public boolean getOpenWorldHint() { + return openWorldHint_; + } + + /** + * + * + *
+         * Output only. If true, this tool may interact with an "open world" of
+         * external entities. If false, the tool's domain of interaction is
+         * closed. For example, the world of a web search tool is open, whereas
+         * that of a memory tool is not. Default: true
+         * 
+ * + * bool open_world_hint = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The openWorldHint to set. + * @return This builder for chaining. + */ + public Builder setOpenWorldHint(boolean value) { + + openWorldHint_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. If true, this tool may interact with an "open world" of
+         * external entities. If false, the tool's domain of interaction is
+         * closed. For example, the world of a web search tool is open, whereas
+         * that of a memory tool is not. Default: true
+         * 
+ * + * bool open_world_hint = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearOpenWorldHint() { + bitField0_ = (bitField0_ & ~0x00000008); + openWorldHint_ = false; + onChanged(); + return this; + } + + private boolean readOnlyHint_; + + /** + * + * + *
+         * Output only. If true, the tool does not modify its environment.
+         * Default: false
+         * 
+ * + * bool read_only_hint = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The readOnlyHint. + */ + @java.lang.Override + public boolean getReadOnlyHint() { + return readOnlyHint_; + } + + /** + * + * + *
+         * Output only. If true, the tool does not modify its environment.
+         * Default: false
+         * 
+ * + * bool read_only_hint = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The readOnlyHint to set. + * @return This builder for chaining. + */ + public Builder setReadOnlyHint(boolean value) { + + readOnlyHint_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. If true, the tool does not modify its environment.
+         * Default: false
+         * 
+ * + * bool read_only_hint = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReadOnlyHint() { + bitField0_ = (bitField0_ & ~0x00000010); + readOnlyHint_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.McpServer.Tool.Annotations) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.McpServer.Tool.Annotations) + private static final com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations(); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Annotations 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.agentregistry.v1.McpServer.Tool.Annotations + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+     * Output only. Human-readable name of the tool.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. Human-readable name of the tool.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+     * Output only. Description of what the tool does.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. Description of what the tool does.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 3; + private com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations_; + + /** + * + * + *
+     * Output only. Annotations associated with the tool.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annotations field is set. + */ + @java.lang.Override + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. Annotations associated with the tool.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annotations. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations getAnnotations() { + return annotations_ == null + ? com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.getDefaultInstance() + : annotations_; + } + + /** + * + * + *
+     * Output only. Annotations associated with the tool.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.Tool.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + return annotations_ == null + ? com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.getDefaultInstance() + : annotations_; + } + + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAnnotations()); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAnnotations()); + } + 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.agentregistry.v1.McpServer.Tool)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.McpServer.Tool other = + (com.google.cloud.agentregistry.v1.McpServer.Tool) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasAnnotations() != other.hasAnnotations()) return false; + if (hasAnnotations()) { + if (!getAnnotations().equals(other.getAnnotations())) 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 = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasAnnotations()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotations().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool 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.agentregistry.v1.McpServer.Tool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool 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.agentregistry.v1.McpServer.Tool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool 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.agentregistry.v1.McpServer.Tool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool 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.agentregistry.v1.McpServer.Tool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool 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.agentregistry.v1.McpServer.Tool 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; + } + + /** + * + * + *
+     * Represents a single tool provided by an MCP Server.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.McpServer.Tool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.McpServer.Tool) + com.google.cloud.agentregistry.v1.McpServer.ToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.McpServer.Tool.class, + com.google.cloud.agentregistry.v1.McpServer.Tool.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.McpServer.Tool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAnnotationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_Tool_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.Tool getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.McpServer.Tool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.Tool build() { + com.google.cloud.agentregistry.v1.McpServer.Tool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.Tool buildPartial() { + com.google.cloud.agentregistry.v1.McpServer.Tool result = + new com.google.cloud.agentregistry.v1.McpServer.Tool(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.McpServer.Tool result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.annotations_ = + annotationsBuilder_ == null ? annotations_ : annotationsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.McpServer.Tool) { + return mergeFrom((com.google.cloud.agentregistry.v1.McpServer.Tool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.McpServer.Tool other) { + if (other == com.google.cloud.agentregistry.v1.McpServer.Tool.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAnnotations()) { + mergeAnnotations(other.getAnnotations()); + } + 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 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetAnnotationsFieldBuilder().getBuilder(), extensionRegistry); + 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 name_ = ""; + + /** + * + * + *
+       * Output only. Human-readable name of the tool.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+       * Output only. Human-readable name of the tool.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+       * Output only. Human-readable name of the tool.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + + /** + * + * + *
+       * Output only. Human-readable name of the tool.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Human-readable name of the tool.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+       * Output only. Description of what the tool does.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. Description of what the tool does.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. Description of what the tool does.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Description of what the tool does.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Description of what the tool does.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations, + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.Builder, + com.google.cloud.agentregistry.v1.McpServer.Tool.AnnotationsOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+       * Output only. Annotations associated with the tool.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annotations field is set. + */ + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Output only. Annotations associated with the tool.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annotations. + */ + public com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations getAnnotations() { + if (annotationsBuilder_ == null) { + return annotations_ == null + ? com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.getDefaultInstance() + : annotations_; + } else { + return annotationsBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Output only. Annotations associated with the tool.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnnotations( + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotations_ = value; + } else { + annotationsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Annotations associated with the tool.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnnotations( + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.Builder builderForValue) { + if (annotationsBuilder_ == null) { + annotations_ = builderForValue.build(); + } else { + annotationsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Annotations associated with the tool.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAnnotations( + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations value) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && annotations_ != null + && annotations_ + != com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations + .getDefaultInstance()) { + getAnnotationsBuilder().mergeFrom(value); + } else { + annotations_ = value; + } + } else { + annotationsBuilder_.mergeFrom(value); + } + if (annotations_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. Annotations associated with the tool.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000004); + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Annotations associated with the tool.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.Builder + getAnnotationsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetAnnotationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. Annotations associated with the tool.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.McpServer.Tool.AnnotationsOrBuilder + getAnnotationsOrBuilder() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilder(); + } else { + return annotations_ == null + ? com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.getDefaultInstance() + : annotations_; + } + } + + /** + * + * + *
+       * Output only. Annotations associated with the tool.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations, + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.Builder, + com.google.cloud.agentregistry.v1.McpServer.Tool.AnnotationsOrBuilder> + internalGetAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations, + com.google.cloud.agentregistry.v1.McpServer.Tool.Annotations.Builder, + com.google.cloud.agentregistry.v1.McpServer.Tool.AnnotationsOrBuilder>( + getAnnotations(), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.McpServer.Tool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.McpServer.Tool) + private static final com.google.cloud.agentregistry.v1.McpServer.Tool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.McpServer.Tool(); + } + + public static com.google.cloud.agentregistry.v1.McpServer.Tool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tool 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.agentregistry.v1.McpServer.Tool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the MCP Server.
+   * Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the MCP Server.
+   * Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + public static final int MCP_SERVER_ID_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object mcpServerId_ = ""; + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for MCP Servers.
+   * 
+ * + * string mcp_server_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mcpServerId. + */ + @java.lang.Override + public java.lang.String getMcpServerId() { + java.lang.Object ref = mcpServerId_; + 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(); + mcpServerId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for MCP Servers.
+   * 
+ * + * string mcp_server_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mcpServerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMcpServerIdBytes() { + java.lang.Object ref = mcpServerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mcpServerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Output only. The display name of the MCP Server.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The display name of the MCP Server.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Output only. The description of the MCP Server.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The description of the MCP Server.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List interfaces_; + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getInterfacesList() { + return interfaces_; + } + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getInterfacesOrBuilderList() { + return interfaces_; + } + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getInterfacesCount() { + return interfaces_.size(); + } + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Interface getInterfaces(int index) { + return interfaces_.get(index); + } + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index) { + return interfaces_.get(index); + } + + public static final int TOOLS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List tools_; + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getToolsList() { + return tools_; + } + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getToolsOrBuilderList() { + return tools_; + } + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getToolsCount() { + return tools_.size(); + } + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.Tool getTools(int index) { + return tools_.get(index); + } + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer.ToolOrBuilder getToolsOrBuilder(int index) { + return tools_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 8; + + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Struct.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + + /** + * + * + *
+   * Output only. Attributes of the MCP Server.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the MCP Server.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the MCP Server, for
+   * example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + * + * + *
+   * Output only. Attributes of the MCP Server.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the MCP Server.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the MCP Server, for
+   * example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + + /** + * + * + *
+   * Output only. Attributes of the MCP Server.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the MCP Server.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the MCP Server, for
+   * example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Struct getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Struct defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Output only. Attributes of the MCP Server.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the MCP Server.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the MCP Server, for
+   * example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Struct getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + for (int i = 0; i < interfaces_.size(); i++) { + output.writeMessage(4, interfaces_.get(i)); + } + for (int i = 0; i < tools_.size(); i++) { + output.writeMessage(5, tools_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 8); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mcpServerId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, mcpServerId_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + for (int i = 0; i < interfaces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, interfaces_.get(i)); + } + for (int i = 0; i < tools_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, tools_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = + AttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, attributes__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mcpServerId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, mcpServerId_); + } + 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.agentregistry.v1.McpServer)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.McpServer other = + (com.google.cloud.agentregistry.v1.McpServer) obj; + + if (!getName().equals(other.getName())) return false; + if (!getMcpServerId().equals(other.getMcpServerId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getInterfacesList().equals(other.getInterfacesList())) return false; + if (!getToolsList().equals(other.getToolsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetAttributes().equals(other.internalGetAttributes())) 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 = (37 * hash) + MCP_SERVER_ID_FIELD_NUMBER; + hash = (53 * hash) + getMcpServerId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getInterfacesCount() > 0) { + hash = (37 * hash) + INTERFACES_FIELD_NUMBER; + hash = (53 * hash) + getInterfacesList().hashCode(); + } + if (getToolsCount() > 0) { + hash = (37 * hash) + TOOLS_FIELD_NUMBER; + hash = (53 * hash) + getToolsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.McpServer parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.McpServer 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.agentregistry.v1.McpServer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.McpServer 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.agentregistry.v1.McpServer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.McpServer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.McpServer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.McpServer 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.agentregistry.v1.McpServer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.McpServer 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.agentregistry.v1.McpServer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.McpServer 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.agentregistry.v1.McpServer 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; + } + + /** + * + * + *
+   * Represents an MCP (Model Context Protocol) Server.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.McpServer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.McpServer) + com.google.cloud.agentregistry.v1.McpServerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.McpServer.class, + com.google.cloud.agentregistry.v1.McpServer.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.McpServer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInterfacesFieldBuilder(); + internalGetToolsFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + mcpServerId_ = ""; + displayName_ = ""; + description_ = ""; + if (interfacesBuilder_ == null) { + interfaces_ = java.util.Collections.emptyList(); + } else { + interfaces_ = null; + interfacesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (toolsBuilder_ == null) { + tools_ = java.util.Collections.emptyList(); + } else { + tools_ = null; + toolsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableAttributes().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.McpServerProto + .internal_static_google_cloud_agentregistry_v1_McpServer_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.McpServer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer build() { + com.google.cloud.agentregistry.v1.McpServer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.McpServer buildPartial() { + com.google.cloud.agentregistry.v1.McpServer result = + new com.google.cloud.agentregistry.v1.McpServer(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.agentregistry.v1.McpServer result) { + if (interfacesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + interfaces_ = java.util.Collections.unmodifiableList(interfaces_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.interfaces_ = interfaces_; + } else { + result.interfaces_ = interfacesBuilder_.build(); + } + if (toolsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + tools_ = java.util.Collections.unmodifiableList(tools_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.tools_ = tools_; + } else { + result.tools_ = toolsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.McpServer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mcpServerId_ = mcpServerId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.attributes_ = + internalGetAttributes().build(AttributesDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.McpServer) { + return mergeFrom((com.google.cloud.agentregistry.v1.McpServer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.McpServer other) { + if (other == com.google.cloud.agentregistry.v1.McpServer.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMcpServerId().isEmpty()) { + mcpServerId_ = other.mcpServerId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (interfacesBuilder_ == null) { + if (!other.interfaces_.isEmpty()) { + if (interfaces_.isEmpty()) { + interfaces_ = other.interfaces_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureInterfacesIsMutable(); + interfaces_.addAll(other.interfaces_); + } + onChanged(); + } + } else { + if (!other.interfaces_.isEmpty()) { + if (interfacesBuilder_.isEmpty()) { + interfacesBuilder_.dispose(); + interfacesBuilder_ = null; + interfaces_ = other.interfaces_; + bitField0_ = (bitField0_ & ~0x00000010); + interfacesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInterfacesFieldBuilder() + : null; + } else { + interfacesBuilder_.addAllMessages(other.interfaces_); + } + } + } + if (toolsBuilder_ == null) { + if (!other.tools_.isEmpty()) { + if (tools_.isEmpty()) { + tools_ = other.tools_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureToolsIsMutable(); + tools_.addAll(other.tools_); + } + onChanged(); + } + } else { + if (!other.tools_.isEmpty()) { + if (toolsBuilder_.isEmpty()) { + toolsBuilder_.dispose(); + toolsBuilder_ = null; + tools_ = other.tools_; + bitField0_ = (bitField0_ & ~0x00000020); + toolsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetToolsFieldBuilder() + : null; + } else { + toolsBuilder_.addAllMessages(other.tools_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + bitField0_ |= 0x00000100; + 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 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + com.google.cloud.agentregistry.v1.Interface m = + input.readMessage( + com.google.cloud.agentregistry.v1.Interface.parser(), extensionRegistry); + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(m); + } else { + interfacesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.agentregistry.v1.McpServer.Tool m = + input.readMessage( + com.google.cloud.agentregistry.v1.McpServer.Tool.parser(), + extensionRegistry); + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.add(m); + } else { + toolsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .ensureBuilderMap() + .put(attributes__.getKey(), attributes__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 66 + case 74: + { + mcpServerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 74 + 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_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the MCP Server.
+     * Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the MCP Server.
+     * Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the MCP Server.
+     * Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + + /** + * + * + *
+     * Identifier. The resource name of the MCP Server.
+     * Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the MCP Server.
+     * Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + + private java.lang.Object mcpServerId_ = ""; + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for MCP Servers.
+     * 
+ * + * string mcp_server_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mcpServerId. + */ + public java.lang.String getMcpServerId() { + java.lang.Object ref = mcpServerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mcpServerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for MCP Servers.
+     * 
+ * + * string mcp_server_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mcpServerId. + */ + public com.google.protobuf.ByteString getMcpServerIdBytes() { + java.lang.Object ref = mcpServerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mcpServerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for MCP Servers.
+     * 
+ * + * string mcp_server_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The mcpServerId to set. + * @return This builder for chaining. + */ + public Builder setMcpServerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mcpServerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for MCP Servers.
+     * 
+ * + * string mcp_server_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMcpServerId() { + mcpServerId_ = getDefaultInstance().getMcpServerId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A stable, globally unique identifier for MCP Servers.
+     * 
+ * + * string mcp_server_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for mcpServerId to set. + * @return This builder for chaining. + */ + public Builder setMcpServerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mcpServerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Output only. The display name of the MCP Server.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the MCP Server.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the MCP Server.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the MCP Server.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the MCP Server.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Output only. The description of the MCP Server.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The description of the MCP Server.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The description of the MCP Server.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The description of the MCP Server.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The description of the MCP Server.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List interfaces_ = + java.util.Collections.emptyList(); + + private void ensureInterfacesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + interfaces_ = + new java.util.ArrayList(interfaces_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder> + interfacesBuilder_; + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getInterfacesList() { + if (interfacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(interfaces_); + } else { + return interfacesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getInterfacesCount() { + if (interfacesBuilder_ == null) { + return interfaces_.size(); + } else { + return interfacesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Interface getInterfaces(int index) { + if (interfacesBuilder_ == null) { + return interfaces_.get(index); + } else { + return interfacesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInterfaces(int index, com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.set(index, value); + onChanged(); + } else { + interfacesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInterfaces( + int index, com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.set(index, builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInterfaces(com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.add(value); + onChanged(); + } else { + interfacesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInterfaces(int index, com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.add(index, value); + onChanged(); + } else { + interfacesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInterfaces( + com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInterfaces( + int index, com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(index, builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllInterfaces( + java.lang.Iterable values) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, interfaces_); + onChanged(); + } else { + interfacesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInterfaces() { + if (interfacesBuilder_ == null) { + interfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + interfacesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeInterfaces(int index) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.remove(index); + onChanged(); + } else { + interfacesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder getInterfacesBuilder(int index) { + return internalGetInterfacesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index) { + if (interfacesBuilder_ == null) { + return interfaces_.get(index); + } else { + return interfacesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getInterfacesOrBuilderList() { + if (interfacesBuilder_ != null) { + return interfacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(interfaces_); + } + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder addInterfacesBuilder() { + return internalGetInterfacesFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Interface.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder addInterfacesBuilder(int index) { + return internalGetInterfacesFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Interface.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The connection details for the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getInterfacesBuilderList() { + return internalGetInterfacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder> + internalGetInterfacesFieldBuilder() { + if (interfacesBuilder_ == null) { + interfacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder>( + interfaces_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + interfaces_ = null; + } + return interfacesBuilder_; + } + + private java.util.List tools_ = + java.util.Collections.emptyList(); + + private void ensureToolsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + tools_ = new java.util.ArrayList(tools_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.McpServer.Tool, + com.google.cloud.agentregistry.v1.McpServer.Tool.Builder, + com.google.cloud.agentregistry.v1.McpServer.ToolOrBuilder> + toolsBuilder_; + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getToolsList() { + if (toolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tools_); + } else { + return toolsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getToolsCount() { + if (toolsBuilder_ == null) { + return tools_.size(); + } else { + return toolsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.McpServer.Tool getTools(int index) { + if (toolsBuilder_ == null) { + return tools_.get(index); + } else { + return toolsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTools(int index, com.google.cloud.agentregistry.v1.McpServer.Tool value) { + if (toolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.set(index, value); + onChanged(); + } else { + toolsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTools( + int index, com.google.cloud.agentregistry.v1.McpServer.Tool.Builder builderForValue) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.set(index, builderForValue.build()); + onChanged(); + } else { + toolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTools(com.google.cloud.agentregistry.v1.McpServer.Tool value) { + if (toolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.add(value); + onChanged(); + } else { + toolsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTools(int index, com.google.cloud.agentregistry.v1.McpServer.Tool value) { + if (toolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.add(index, value); + onChanged(); + } else { + toolsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTools( + com.google.cloud.agentregistry.v1.McpServer.Tool.Builder builderForValue) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.add(builderForValue.build()); + onChanged(); + } else { + toolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTools( + int index, com.google.cloud.agentregistry.v1.McpServer.Tool.Builder builderForValue) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.add(index, builderForValue.build()); + onChanged(); + } else { + toolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllTools( + java.lang.Iterable values) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tools_); + onChanged(); + } else { + toolsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTools() { + if (toolsBuilder_ == null) { + tools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + toolsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeTools(int index) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.remove(index); + onChanged(); + } else { + toolsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.McpServer.Tool.Builder getToolsBuilder(int index) { + return internalGetToolsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.McpServer.ToolOrBuilder getToolsOrBuilder(int index) { + if (toolsBuilder_ == null) { + return tools_.get(index); + } else { + return toolsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getToolsOrBuilderList() { + if (toolsBuilder_ != null) { + return toolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tools_); + } + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.McpServer.Tool.Builder addToolsBuilder() { + return internalGetToolsFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.McpServer.Tool.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.agentregistry.v1.McpServer.Tool.Builder addToolsBuilder(int index) { + return internalGetToolsFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.McpServer.Tool.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Tools provided by the MCP Server.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getToolsBuilderList() { + return internalGetToolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.McpServer.Tool, + com.google.cloud.agentregistry.v1.McpServer.Tool.Builder, + com.google.cloud.agentregistry.v1.McpServer.ToolOrBuilder> + internalGetToolsFieldBuilder() { + if (toolsBuilder_ == null) { + toolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.McpServer.Tool, + com.google.cloud.agentregistry.v1.McpServer.Tool.Builder, + com.google.cloud.agentregistry.v1.McpServer.ToolOrBuilder>( + tools_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + tools_ = null; + } + return toolsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private static final class AttributesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, com.google.protobuf.StructOrBuilder, com.google.protobuf.Struct> { + @java.lang.Override + public com.google.protobuf.Struct build(com.google.protobuf.StructOrBuilder val) { + if (val instanceof com.google.protobuf.Struct) { + return (com.google.protobuf.Struct) val; + } + return ((com.google.protobuf.Struct.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return AttributesDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final AttributesConverter attributesConverter = new AttributesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.StructOrBuilder, + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder> + attributes_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.StructOrBuilder, + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder> + internalGetAttributes() { + if (attributes_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(attributesConverter); + } + return attributes_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.StructOrBuilder, + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder> + internalGetMutableAttributes() { + if (attributes_ == null) { + attributes_ = new com.google.protobuf.MapFieldBuilder<>(attributesConverter); + } + bitField0_ |= 0x00000100; + onChanged(); + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().ensureBuilderMap().size(); + } + + /** + * + * + *
+     * Output only. Attributes of the MCP Server.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the MCP Server.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the MCP Server, for
+     * example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + * + * + *
+     * Output only. Attributes of the MCP Server.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the MCP Server.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the MCP Server, for
+     * example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getImmutableMap(); + } + + /** + * + * + *
+     * Output only. Attributes of the MCP Server.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the MCP Server.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the MCP Server, for
+     * example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Struct getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Struct defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableAttributes().ensureBuilderMap(); + return map.containsKey(key) ? attributesConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+     * Output only. Attributes of the MCP Server.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the MCP Server.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the MCP Server, for
+     * example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Struct getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableAttributes().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return attributesConverter.build(map.get(key)); + } + + public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableAttributes().clear(); + return this; + } + + /** + * + * + *
+     * Output only. Attributes of the MCP Server.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the MCP Server.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the MCP Server, for
+     * example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttributes().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + bitField0_ |= 0x00000100; + return internalGetMutableAttributes().ensureMessageMap(); + } + + /** + * + * + *
+     * Output only. Attributes of the MCP Server.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the MCP Server.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the MCP Server, for
+     * example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAttributes(java.lang.String key, com.google.protobuf.Struct value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAttributes().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + + /** + * + * + *
+     * Output only. Attributes of the MCP Server.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the MCP Server.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the MCP Server, for
+     * example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllAttributes( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableAttributes().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000100; + return this; + } + + /** + * + * + *
+     * Output only. Attributes of the MCP Server.
+     * Valid values:
+     *
+     * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+     * "principal://..."} - the runtime identity associated with the MCP Server.
+     * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+     * - the URI of the underlying resource hosting the MCP Server, for
+     * example, the GKE Deployment.
+     * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Struct.Builder putAttributesBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableAttributes().ensureBuilderMap(); + com.google.protobuf.StructOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Struct.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Struct) { + entry = ((com.google.protobuf.Struct) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Struct.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.McpServer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.McpServer) + private static final com.google.cloud.agentregistry.v1.McpServer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.McpServer(); + } + + public static com.google.cloud.agentregistry.v1.McpServer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public McpServer 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.agentregistry.v1.McpServer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerName.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerName.java new file mode 100644 index 000000000000..c87bcc17a927 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class McpServerName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_MCP_SERVER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/mcpServers/{mcp_server}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String mcpServer; + + @Deprecated + protected McpServerName() { + project = null; + location = null; + mcpServer = null; + } + + private McpServerName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + mcpServer = Preconditions.checkNotNull(builder.getMcpServer()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMcpServer() { + return mcpServer; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static McpServerName of(String project, String location, String mcpServer) { + return newBuilder().setProject(project).setLocation(location).setMcpServer(mcpServer).build(); + } + + public static String format(String project, String location, String mcpServer) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setMcpServer(mcpServer) + .build() + .toString(); + } + + public static McpServerName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_MCP_SERVER.validatedMatch( + formattedString, "McpServerName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("mcp_server")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (McpServerName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_MCP_SERVER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (mcpServer != null) { + fieldMapBuilder.put("mcp_server", mcpServer); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_MCP_SERVER.instantiate( + "project", project, "location", location, "mcp_server", mcpServer); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + McpServerName that = ((McpServerName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.mcpServer, that.mcpServer); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(mcpServer); + return h; + } + + /** Builder for projects/{project}/locations/{location}/mcpServers/{mcp_server}. */ + public static class Builder { + private String project; + private String location; + private String mcpServer; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMcpServer() { + return mcpServer; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setMcpServer(String mcpServer) { + this.mcpServer = mcpServer; + return this; + } + + private Builder(McpServerName mcpServerName) { + this.project = mcpServerName.project; + this.location = mcpServerName.location; + this.mcpServer = mcpServerName.mcpServer; + } + + public McpServerName build() { + return new McpServerName(this); + } + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerOrBuilder.java new file mode 100644 index 000000000000..96d1e33dfde1 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerOrBuilder.java @@ -0,0 +1,454 @@ +/* + * 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/agentregistry/v1/mcp_server.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface McpServerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.McpServer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the MCP Server.
+   * Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the MCP Server.
+   * Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for MCP Servers.
+   * 
+ * + * string mcp_server_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mcpServerId. + */ + java.lang.String getMcpServerId(); + + /** + * + * + *
+   * Output only. A stable, globally unique identifier for MCP Servers.
+   * 
+ * + * string mcp_server_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mcpServerId. + */ + com.google.protobuf.ByteString getMcpServerIdBytes(); + + /** + * + * + *
+   * Output only. The display name of the MCP Server.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. The display name of the MCP Server.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The description of the MCP Server.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Output only. The description of the MCP Server.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getInterfacesList(); + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.Interface getInterfaces(int index); + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getInterfacesCount(); + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getInterfacesOrBuilderList(); + + /** + * + * + *
+   * Output only. The connection details for the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getToolsList(); + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.McpServer.Tool getTools(int index); + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getToolsCount(); + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getToolsOrBuilderList(); + + /** + * + * + *
+   * Output only. Tools provided by the MCP Server.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.McpServer.Tool tools = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.agentregistry.v1.McpServer.ToolOrBuilder getToolsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Attributes of the MCP Server.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the MCP Server.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the MCP Server, for
+   * example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAttributesCount(); + + /** + * + * + *
+   * Output only. Attributes of the MCP Server.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the MCP Server.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the MCP Server, for
+   * example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsAttributes(java.lang.String key); + + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttributes(); + + /** + * + * + *
+   * Output only. Attributes of the MCP Server.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the MCP Server.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the MCP Server, for
+   * example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getAttributesMap(); + + /** + * + * + *
+   * Output only. Attributes of the MCP Server.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the MCP Server.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the MCP Server, for
+   * example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + com.google.protobuf.Struct getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Struct defaultValue); + + /** + * + * + *
+   * Output only. Attributes of the MCP Server.
+   * Valid values:
+   *
+   * * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal":
+   * "principal://..."} - the runtime identity associated with the MCP Server.
+   * * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."}
+   * - the URI of the underlying resource hosting the MCP Server, for
+   * example, the GKE Deployment.
+   * 
+ * + * + * map<string, .google.protobuf.Struct> attributes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.Struct getAttributesOrThrow(java.lang.String key); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerProto.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerProto.java new file mode 100644 index 000000000000..0e33ceaa2e3e --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/McpServerProto.java @@ -0,0 +1,177 @@ +/* + * 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/agentregistry/v1/mcp_server.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public final class McpServerProto extends com.google.protobuf.GeneratedFile { + private McpServerProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "McpServerProto"); + } + + 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_agentregistry_v1_McpServer_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_McpServer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_McpServer_AttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_McpServer_AttributesEntry_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" + + ".google/cloud/agentregistry/v1/mcp_serv" + + "er.proto\022\035google.cloud.agentregistry.v1\032" + + "\037google/api/field_behavior.proto\032\031google" + + "/api/resource.proto\032.google/cloud/agentr" + + "egistry/v1/properties.proto\032\034google/prot" + + "obuf/struct.proto\032\037google/protobuf/timestamp.proto\"\256\007\n" + + "\tMcpServer\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\032\n\r" + + "mcp_server_id\030\t \001(\tB\003\340A\003\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\003\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\003\022A\n\n" + + "interfaces\030\004" + + " \003(\0132(.google.cloud.agentregistry.v1.InterfaceB\003\340A\003\022A\n" + + "\005tools\030\005" + + " \003(\0132-.google.cloud.agentregistry.v1.McpServer.ToolB\003\340A\003\0224\n" + + "\013create_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\007" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022Q\n\n" + + "attributes\030\010 \003(\01328.google.clou" + + "d.agentregistry.v1.McpServer.AttributesEntryB\003\340A\003\032\244\002\n" + + "\004Tool\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\003\022\030\n" + + "\013description\030\002 \001(\tB\003\340A\003\022S\n" + + "\013annotations\030\003" + + " \001(\01329.google.cloud.agentregistry.v1.McpServer.Tool.AnnotationsB\003\340A\003\032\231\001\n" + + "\013Annotations\022\022\n" + + "\005title\030\001 \001(\tB\003\340A\003\022\035\n" + + "\020destructive_hint\030\002 \001(\010B\003\340A\003\022\034\n" + + "\017idempotent_hint\030\003 \001(\010B\003\340A\003\022\034\n" + + "\017open_world_hint\030\004 \001(\010B\003\340A\003\022\033\n" + + "\016read_only_hint\030\005 \001(\010B\003\340A\003\032J\n" + + "\017AttributesEntry\022\013\n" + + "\003key\030\001 \001(\t\022&\n" + + "\005value\030\002" + + " \001(\0132\027.google.protobuf.Struct:\0028\001:\204\001\352A\200\001\n" + + "&agentregistry.googleapis.com/McpServer\022?projects/{p" + + "roject}/locations/{location}/mcpServers/{mcp_server}*\n" + + "mcpServers2\tmcpServerB\341\001\n" + + "!com.google.cloud.agentregistry.v1B\016McpSe" + + "rverProtoP\001ZGcloud.google.com/go/agentregistry/apiv1/agentregistrypb;agentregist" + + "rypb\252\002\035Google.Cloud.AgentRegistry.V1\312\002\035Google\\Cloud\\AgentRegistry\\V1\352\002" + + " Google::Cloud::AgentRegistry::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.agentregistry.v1.PropertiesProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_agentregistry_v1_McpServer_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_agentregistry_v1_McpServer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_McpServer_descriptor, + new java.lang.String[] { + "Name", + "McpServerId", + "DisplayName", + "Description", + "Interfaces", + "Tools", + "CreateTime", + "UpdateTime", + "Attributes", + }); + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_descriptor = + internal_static_google_cloud_agentregistry_v1_McpServer_descriptor.getNestedType(0); + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_descriptor, + new java.lang.String[] { + "Name", "Description", "Annotations", + }); + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_descriptor = + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_descriptor.getNestedType(0); + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_McpServer_Tool_Annotations_descriptor, + new java.lang.String[] { + "Title", "DestructiveHint", "IdempotentHint", "OpenWorldHint", "ReadOnlyHint", + }); + internal_static_google_cloud_agentregistry_v1_McpServer_AttributesEntry_descriptor = + internal_static_google_cloud_agentregistry_v1_McpServer_descriptor.getNestedType(1); + internal_static_google_cloud_agentregistry_v1_McpServer_AttributesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_McpServer_AttributesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.agentregistry.v1.PropertiesProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/OperationMetadata.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/OperationMetadata.java new file mode 100644 index 000000000000..2e5b41f69382 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/OperationMetadata.java @@ -0,0 +1,1873 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.OperationMetadata} + */ +@com.google.protobuf.Generated +public final class OperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationMetadata"); + } + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.OperationMetadata.class, + com.google.cloud.agentregistry.v1.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + 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(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + 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(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, apiVersion_); + } + 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.agentregistry.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.OperationMetadata other = + (com.google.cloud.agentregistry.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) 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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.OperationMetadata 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.agentregistry.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.OperationMetadata 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.agentregistry.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.OperationMetadata 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.agentregistry.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.OperationMetadata 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.agentregistry.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.OperationMetadata 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.agentregistry.v1.OperationMetadata 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; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.OperationMetadata) + com.google.cloud.agentregistry.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.OperationMetadata.class, + com.google.cloud.agentregistry.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.OperationMetadata build() { + com.google.cloud.agentregistry.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.OperationMetadata buildPartial() { + com.google.cloud.agentregistry.v1.OperationMetadata result = + new com.google.cloud.agentregistry.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.agentregistry.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.OperationMetadata other) { + if (other == com.google.cloud.agentregistry.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + 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: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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 com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.OperationMetadata) + private static final com.google.cloud.agentregistry.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.OperationMetadata(); + } + + public static com.google.cloud.agentregistry.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata 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.agentregistry.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/OperationMetadataOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..ddb429d03ea8 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,230 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/PropertiesProto.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/PropertiesProto.java new file mode 100644 index 000000000000..ee4fb48b0b2d --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/PropertiesProto.java @@ -0,0 +1,96 @@ +/* + * 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/agentregistry/v1/properties.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public final class PropertiesProto extends com.google.protobuf.GeneratedFile { + private PropertiesProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PropertiesProto"); + } + + 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_agentregistry_v1_Interface_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Interface_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.google/cloud/agentregistry/v1/properti" + + "es.proto\022\035google.cloud.agentregistry.v1\032" + + "\037google/api/field_behavior.proto\"\321\001\n\tInt" + + "erface\022\020\n\003url\030\001 \001(\tB\003\340A\002\022W\n\020protocol_bin" + + "ding\030\002 \001(\01628.google.cloud.agentregistry." + + "v1.Interface.ProtocolBindingB\003\340A\002\"Y\n\017Pro" + + "tocolBinding\022 \n\034PROTOCOL_BINDING_UNSPECI" + + "FIED\020\000\022\013\n\007JSONRPC\020\001\022\010\n\004GRPC\020\002\022\r\n\tHTTP_JS" + + "ON\020\003B\342\001\n!com.google.cloud.agentregistry." + + "v1B\017PropertiesProtoP\001ZGcloud.google.com/" + + "go/agentregistry/apiv1/agentregistrypb;a" + + "gentregistrypb\252\002\035Google.Cloud.AgentRegis" + + "try.V1\312\002\035Google\\Cloud\\AgentRegistry\\V1\352\002" + + " Google::Cloud::AgentRegistry::V1b\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_agentregistry_v1_Interface_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_agentregistry_v1_Interface_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Interface_descriptor, + new java.lang.String[] { + "Url", "ProtocolBinding", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsRequest.java new file mode 100644 index 000000000000..52f136cba295 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsRequest.java @@ -0,0 +1,1382 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for searching Agents
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.SearchAgentsRequest} + */ +@com.google.protobuf.Generated +public final class SearchAgentsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.SearchAgentsRequest) + SearchAgentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchAgentsRequest"); + } + + // Use SearchAgentsRequest.newBuilder() to construct. + private SearchAgentsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchAgentsRequest() { + parent_ = ""; + searchString_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.SearchAgentsRequest.class, + com.google.cloud.agentregistry.v1.SearchAgentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for SearchAgentsRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for SearchAgentsRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 SEARCH_STRING_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object searchString_ = ""; + + /** + * + * + *
+   * Optional. Search criteria used to select the Agents to return. If no search
+   * criteria is specified then all accessible Agents will be returned.
+   *
+   * Search expressions can be used to restrict results based upon searchable
+   * fields, where the operators can be used along with the suffix wildcard
+   * symbol `*`. See
+   * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+   * for more details.
+   *
+   * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+   *
+   * Searchable fields:
+   *
+   * | Field              | `=` | `:` | `*` | Keyword Search |
+   * |--------------------|-----|-----|-----|----------------|
+   * | agentId            | Yes | Yes | Yes | Included       |
+   * | name               | No  | Yes | Yes | Included       |
+   * | displayName        | No  | Yes | Yes | Included       |
+   * | description        | No  | Yes | No  | Included       |
+   * | skills             | No  | Yes | No  | Included       |
+   * | skills.id          | No  | Yes | No  | Included       |
+   * | skills.name        | No  | Yes | No  | Included       |
+   * | skills.description | No  | Yes | No  | Included       |
+   * | skills.tags        | No  | Yes | No  | Included       |
+   * | skills.examples    | No  | Yes | No  | Included       |
+   *
+   * Examples:
+   *
+   * * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
+   * to find the agent with the specified agent ID.
+   * * `name:important` to find agents whose name contains `important` as a
+   * word.
+   * * `displayName:works*` to find agents whose display name contains words
+   * that start with `works`.
+   * * `skills.tags:test` to find agents whose skills tags contain `test`.
+   * * `planner OR booking` to find agents whose metadata contains the words
+   * `planner` or `booking`.
+   * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The searchString. + */ + @java.lang.Override + public java.lang.String getSearchString() { + java.lang.Object ref = searchString_; + 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(); + searchString_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Search criteria used to select the Agents to return. If no search
+   * criteria is specified then all accessible Agents will be returned.
+   *
+   * Search expressions can be used to restrict results based upon searchable
+   * fields, where the operators can be used along with the suffix wildcard
+   * symbol `*`. See
+   * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+   * for more details.
+   *
+   * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+   *
+   * Searchable fields:
+   *
+   * | Field              | `=` | `:` | `*` | Keyword Search |
+   * |--------------------|-----|-----|-----|----------------|
+   * | agentId            | Yes | Yes | Yes | Included       |
+   * | name               | No  | Yes | Yes | Included       |
+   * | displayName        | No  | Yes | Yes | Included       |
+   * | description        | No  | Yes | No  | Included       |
+   * | skills             | No  | Yes | No  | Included       |
+   * | skills.id          | No  | Yes | No  | Included       |
+   * | skills.name        | No  | Yes | No  | Included       |
+   * | skills.description | No  | Yes | No  | Included       |
+   * | skills.tags        | No  | Yes | No  | Included       |
+   * | skills.examples    | No  | Yes | No  | Included       |
+   *
+   * Examples:
+   *
+   * * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
+   * to find the agent with the specified agent ID.
+   * * `name:important` to find agents whose name contains `important` as a
+   * word.
+   * * `displayName:works*` to find agents whose display name contains words
+   * that start with `works`.
+   * * `skills.tags:test` to find agents whose skills tags contain `test`.
+   * * `planner OR booking` to find agents whose metadata contains the words
+   * `planner` or `booking`.
+   * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for searchString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchStringBytes() { + java.lang.Object ref = searchString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 6; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of search results to return per page. The page
+   * size is capped at `100`, even if a larger value is specified. A negative
+   * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+   * `0`, a default value of `20` will be used. The server may return fewer
+   * results than requested.
+   * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters, must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 7 [(.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. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters, must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 7 [(.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(searchString_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, searchString_); + } + if (pageSize_ != 0) { + output.writeInt32(6, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(searchString_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, searchString_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, 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.agentregistry.v1.SearchAgentsRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.SearchAgentsRequest other = + (com.google.cloud.agentregistry.v1.SearchAgentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSearchString().equals(other.getSearchString())) 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) + SEARCH_STRING_FIELD_NUMBER; + hash = (53 * hash) + getSearchString().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.agentregistry.v1.SearchAgentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsRequest 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.agentregistry.v1.SearchAgentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsRequest 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.agentregistry.v1.SearchAgentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsRequest 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.agentregistry.v1.SearchAgentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsRequest 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.agentregistry.v1.SearchAgentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsRequest 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.agentregistry.v1.SearchAgentsRequest 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; + } + + /** + * + * + *
+   * Message for searching Agents
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.SearchAgentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.SearchAgentsRequest) + com.google.cloud.agentregistry.v1.SearchAgentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.SearchAgentsRequest.class, + com.google.cloud.agentregistry.v1.SearchAgentsRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.SearchAgentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + searchString_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchAgentsRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.SearchAgentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchAgentsRequest build() { + com.google.cloud.agentregistry.v1.SearchAgentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchAgentsRequest buildPartial() { + com.google.cloud.agentregistry.v1.SearchAgentsRequest result = + new com.google.cloud.agentregistry.v1.SearchAgentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.SearchAgentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.searchString_ = searchString_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.SearchAgentsRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.SearchAgentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.SearchAgentsRequest other) { + if (other == com.google.cloud.agentregistry.v1.SearchAgentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSearchString().isEmpty()) { + searchString_ = other.searchString_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + 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 26: + { + searchString_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 48: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 48 + case 58: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + 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. Parent value for SearchAgentsRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for SearchAgentsRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for SearchAgentsRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for SearchAgentsRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for SearchAgentsRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 java.lang.Object searchString_ = ""; + + /** + * + * + *
+     * Optional. Search criteria used to select the Agents to return. If no search
+     * criteria is specified then all accessible Agents will be returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | agentId            | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     * | description        | No  | Yes | No  | Included       |
+     * | skills             | No  | Yes | No  | Included       |
+     * | skills.id          | No  | Yes | No  | Included       |
+     * | skills.name        | No  | Yes | No  | Included       |
+     * | skills.description | No  | Yes | No  | Included       |
+     * | skills.tags        | No  | Yes | No  | Included       |
+     * | skills.examples    | No  | Yes | No  | Included       |
+     *
+     * Examples:
+     *
+     * * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
+     * to find the agent with the specified agent ID.
+     * * `name:important` to find agents whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find agents whose display name contains words
+     * that start with `works`.
+     * * `skills.tags:test` to find agents whose skills tags contain `test`.
+     * * `planner OR booking` to find agents whose metadata contains the words
+     * `planner` or `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The searchString. + */ + public java.lang.String getSearchString() { + java.lang.Object ref = searchString_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Search criteria used to select the Agents to return. If no search
+     * criteria is specified then all accessible Agents will be returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | agentId            | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     * | description        | No  | Yes | No  | Included       |
+     * | skills             | No  | Yes | No  | Included       |
+     * | skills.id          | No  | Yes | No  | Included       |
+     * | skills.name        | No  | Yes | No  | Included       |
+     * | skills.description | No  | Yes | No  | Included       |
+     * | skills.tags        | No  | Yes | No  | Included       |
+     * | skills.examples    | No  | Yes | No  | Included       |
+     *
+     * Examples:
+     *
+     * * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
+     * to find the agent with the specified agent ID.
+     * * `name:important` to find agents whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find agents whose display name contains words
+     * that start with `works`.
+     * * `skills.tags:test` to find agents whose skills tags contain `test`.
+     * * `planner OR booking` to find agents whose metadata contains the words
+     * `planner` or `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for searchString. + */ + public com.google.protobuf.ByteString getSearchStringBytes() { + java.lang.Object ref = searchString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Search criteria used to select the Agents to return. If no search
+     * criteria is specified then all accessible Agents will be returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | agentId            | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     * | description        | No  | Yes | No  | Included       |
+     * | skills             | No  | Yes | No  | Included       |
+     * | skills.id          | No  | Yes | No  | Included       |
+     * | skills.name        | No  | Yes | No  | Included       |
+     * | skills.description | No  | Yes | No  | Included       |
+     * | skills.tags        | No  | Yes | No  | Included       |
+     * | skills.examples    | No  | Yes | No  | Included       |
+     *
+     * Examples:
+     *
+     * * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
+     * to find the agent with the specified agent ID.
+     * * `name:important` to find agents whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find agents whose display name contains words
+     * that start with `works`.
+     * * `skills.tags:test` to find agents whose skills tags contain `test`.
+     * * `planner OR booking` to find agents whose metadata contains the words
+     * `planner` or `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The searchString to set. + * @return This builder for chaining. + */ + public Builder setSearchString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + searchString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Search criteria used to select the Agents to return. If no search
+     * criteria is specified then all accessible Agents will be returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | agentId            | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     * | description        | No  | Yes | No  | Included       |
+     * | skills             | No  | Yes | No  | Included       |
+     * | skills.id          | No  | Yes | No  | Included       |
+     * | skills.name        | No  | Yes | No  | Included       |
+     * | skills.description | No  | Yes | No  | Included       |
+     * | skills.tags        | No  | Yes | No  | Included       |
+     * | skills.examples    | No  | Yes | No  | Included       |
+     *
+     * Examples:
+     *
+     * * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
+     * to find the agent with the specified agent ID.
+     * * `name:important` to find agents whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find agents whose display name contains words
+     * that start with `works`.
+     * * `skills.tags:test` to find agents whose skills tags contain `test`.
+     * * `planner OR booking` to find agents whose metadata contains the words
+     * `planner` or `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSearchString() { + searchString_ = getDefaultInstance().getSearchString(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Search criteria used to select the Agents to return. If no search
+     * criteria is specified then all accessible Agents will be returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | agentId            | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     * | description        | No  | Yes | No  | Included       |
+     * | skills             | No  | Yes | No  | Included       |
+     * | skills.id          | No  | Yes | No  | Included       |
+     * | skills.name        | No  | Yes | No  | Included       |
+     * | skills.description | No  | Yes | No  | Included       |
+     * | skills.tags        | No  | Yes | No  | Included       |
+     * | skills.examples    | No  | Yes | No  | Included       |
+     *
+     * Examples:
+     *
+     * * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
+     * to find the agent with the specified agent ID.
+     * * `name:important` to find agents whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find agents whose display name contains words
+     * that start with `works`.
+     * * `skills.tags:test` to find agents whose skills tags contain `test`.
+     * * `planner OR booking` to find agents whose metadata contains the words
+     * `planner` or `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for searchString to set. + * @return This builder for chaining. + */ + public Builder setSearchStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + searchString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of search results to return per page. The page
+     * size is capped at `100`, even if a larger value is specified. A negative
+     * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+     * `0`, a default value of `20` will be used. The server may return fewer
+     * results than requested.
+     * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of search results to return per page. The page
+     * size is capped at `100`, even if a larger value is specified. A negative
+     * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+     * `0`, a default value of `20` will be used. The server may return fewer
+     * results than requested.
+     * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of search results to return per page. The page
+     * size is capped at `100`, even if a larger value is specified. A negative
+     * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+     * `0`, a default value of `20` will be used. The server may return fewer
+     * results than requested.
+     * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.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. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.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. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.SearchAgentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.SearchAgentsRequest) + private static final com.google.cloud.agentregistry.v1.SearchAgentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.SearchAgentsRequest(); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAgentsRequest 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.agentregistry.v1.SearchAgentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsRequestOrBuilder.java new file mode 100644 index 000000000000..042180f6f1f1 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsRequestOrBuilder.java @@ -0,0 +1,207 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface SearchAgentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.SearchAgentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for SearchAgentsRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for SearchAgentsRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Search criteria used to select the Agents to return. If no search
+   * criteria is specified then all accessible Agents will be returned.
+   *
+   * Search expressions can be used to restrict results based upon searchable
+   * fields, where the operators can be used along with the suffix wildcard
+   * symbol `*`. See
+   * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+   * for more details.
+   *
+   * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+   *
+   * Searchable fields:
+   *
+   * | Field              | `=` | `:` | `*` | Keyword Search |
+   * |--------------------|-----|-----|-----|----------------|
+   * | agentId            | Yes | Yes | Yes | Included       |
+   * | name               | No  | Yes | Yes | Included       |
+   * | displayName        | No  | Yes | Yes | Included       |
+   * | description        | No  | Yes | No  | Included       |
+   * | skills             | No  | Yes | No  | Included       |
+   * | skills.id          | No  | Yes | No  | Included       |
+   * | skills.name        | No  | Yes | No  | Included       |
+   * | skills.description | No  | Yes | No  | Included       |
+   * | skills.tags        | No  | Yes | No  | Included       |
+   * | skills.examples    | No  | Yes | No  | Included       |
+   *
+   * Examples:
+   *
+   * * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
+   * to find the agent with the specified agent ID.
+   * * `name:important` to find agents whose name contains `important` as a
+   * word.
+   * * `displayName:works*` to find agents whose display name contains words
+   * that start with `works`.
+   * * `skills.tags:test` to find agents whose skills tags contain `test`.
+   * * `planner OR booking` to find agents whose metadata contains the words
+   * `planner` or `booking`.
+   * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The searchString. + */ + java.lang.String getSearchString(); + + /** + * + * + *
+   * Optional. Search criteria used to select the Agents to return. If no search
+   * criteria is specified then all accessible Agents will be returned.
+   *
+   * Search expressions can be used to restrict results based upon searchable
+   * fields, where the operators can be used along with the suffix wildcard
+   * symbol `*`. See
+   * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+   * for more details.
+   *
+   * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+   *
+   * Searchable fields:
+   *
+   * | Field              | `=` | `:` | `*` | Keyword Search |
+   * |--------------------|-----|-----|-----|----------------|
+   * | agentId            | Yes | Yes | Yes | Included       |
+   * | name               | No  | Yes | Yes | Included       |
+   * | displayName        | No  | Yes | Yes | Included       |
+   * | description        | No  | Yes | No  | Included       |
+   * | skills             | No  | Yes | No  | Included       |
+   * | skills.id          | No  | Yes | No  | Included       |
+   * | skills.name        | No  | Yes | No  | Included       |
+   * | skills.description | No  | Yes | No  | Included       |
+   * | skills.tags        | No  | Yes | No  | Included       |
+   * | skills.examples    | No  | Yes | No  | Included       |
+   *
+   * Examples:
+   *
+   * * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
+   * to find the agent with the specified agent ID.
+   * * `name:important` to find agents whose name contains `important` as a
+   * word.
+   * * `displayName:works*` to find agents whose display name contains words
+   * that start with `works`.
+   * * `skills.tags:test` to find agents whose skills tags contain `test`.
+   * * `planner OR booking` to find agents whose metadata contains the words
+   * `planner` or `booking`.
+   * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for searchString. + */ + com.google.protobuf.ByteString getSearchStringBytes(); + + /** + * + * + *
+   * Optional. The maximum number of search results to return per page. The page
+   * size is capped at `100`, even if a larger value is specified. A negative
+   * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+   * `0`, a default value of `20` will be used. The server may return fewer
+   * results than requested.
+   * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters, must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters, must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsResponse.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsResponse.java new file mode 100644 index 000000000000..490c5d321d10 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsResponse.java @@ -0,0 +1,1125 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for response to searching Agents
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.SearchAgentsResponse} + */ +@com.google.protobuf.Generated +public final class SearchAgentsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.SearchAgentsResponse) + SearchAgentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchAgentsResponse"); + } + + // Use SearchAgentsResponse.newBuilder() to construct. + private SearchAgentsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchAgentsResponse() { + agents_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.SearchAgentsResponse.class, + com.google.cloud.agentregistry.v1.SearchAgentsResponse.Builder.class); + } + + public static final int AGENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List agents_; + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + @java.lang.Override + public java.util.List getAgentsList() { + return agents_; + } + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + @java.lang.Override + public java.util.List + getAgentsOrBuilderList() { + return agents_; + } + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + @java.lang.Override + public int getAgentsCount() { + return agents_.size(); + } + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * 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); + } + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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.agentregistry.v1.SearchAgentsResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.SearchAgentsResponse other = + (com.google.cloud.agentregistry.v1.SearchAgentsResponse) 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.agentregistry.v1.SearchAgentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsResponse 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.agentregistry.v1.SearchAgentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsResponse 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.agentregistry.v1.SearchAgentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsResponse 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.agentregistry.v1.SearchAgentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsResponse 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.agentregistry.v1.SearchAgentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsResponse 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.agentregistry.v1.SearchAgentsResponse 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; + } + + /** + * + * + *
+   * Message for response to searching Agents
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.SearchAgentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.SearchAgentsResponse) + com.google.cloud.agentregistry.v1.SearchAgentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.SearchAgentsResponse.class, + com.google.cloud.agentregistry.v1.SearchAgentsResponse.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.SearchAgentsResponse.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchAgentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchAgentsResponse getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.SearchAgentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchAgentsResponse build() { + com.google.cloud.agentregistry.v1.SearchAgentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchAgentsResponse buildPartial() { + com.google.cloud.agentregistry.v1.SearchAgentsResponse result = + new com.google.cloud.agentregistry.v1.SearchAgentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistry.v1.SearchAgentsResponse 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.agentregistry.v1.SearchAgentsResponse 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.agentregistry.v1.SearchAgentsResponse) { + return mergeFrom((com.google.cloud.agentregistry.v1.SearchAgentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.SearchAgentsResponse other) { + if (other == com.google.cloud.agentregistry.v1.SearchAgentsResponse.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_; + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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(); + } + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public int getAgentsCount() { + if (agentsBuilder_ == null) { + return agents_.size(); + } else { + return agentsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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); + } + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + public com.google.cloud.agentregistry.v1.Agent.Builder getAgentsBuilder(int index) { + return internalGetAgentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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); + } + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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_); + } + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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()); + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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()); + } + + /** + * + * + *
+     * A list of Agents that match the `search_string`.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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.agentregistry.v1.SearchAgentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.SearchAgentsResponse) + private static final com.google.cloud.agentregistry.v1.SearchAgentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.SearchAgentsResponse(); + } + + public static com.google.cloud.agentregistry.v1.SearchAgentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAgentsResponse 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.agentregistry.v1.SearchAgentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsResponseOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsResponseOrBuilder.java new file mode 100644 index 000000000000..2028357860f1 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchAgentsResponseOrBuilder.java @@ -0,0 +1,114 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface SearchAgentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.SearchAgentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + java.util.List getAgentsList(); + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + com.google.cloud.agentregistry.v1.Agent getAgents(int index); + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + int getAgentsCount(); + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + java.util.List + getAgentsOrBuilderList(); + + /** + * + * + *
+   * A list of Agents that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.Agent agents = 1; + */ + com.google.cloud.agentregistry.v1.AgentOrBuilder getAgentsOrBuilder(int index); + + /** + * + * + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersRequest.java new file mode 100644 index 000000000000..872a89048d43 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersRequest.java @@ -0,0 +1,1361 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for searching MCP Servers
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.SearchMcpServersRequest} + */ +@com.google.protobuf.Generated +public final class SearchMcpServersRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.SearchMcpServersRequest) + SearchMcpServersRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchMcpServersRequest"); + } + + // Use SearchMcpServersRequest.newBuilder() to construct. + private SearchMcpServersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchMcpServersRequest() { + parent_ = ""; + searchString_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.SearchMcpServersRequest.class, + com.google.cloud.agentregistry.v1.SearchMcpServersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for SearchMcpServersRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for SearchMcpServersRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 SEARCH_STRING_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object searchString_ = ""; + + /** + * + * + *
+   * Optional. Search criteria used to select the MCP Servers to return. If no
+   * search criteria is specified then all accessible MCP Servers will be
+   * returned.
+   *
+   * Search expressions can be used to restrict results based upon searchable
+   * fields, where the operators can be used along with the suffix wildcard
+   * symbol `*`. See
+   * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+   * for more details.
+   *
+   * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+   *
+   * Searchable fields:
+   *
+   * | Field              | `=` | `:` | `*` | Keyword Search |
+   * |--------------------|-----|-----|-----|----------------|
+   * | mcpServerId        | Yes | Yes | Yes | Included       |
+   * | name               | No  | Yes | Yes | Included       |
+   * | displayName        | No  | Yes | Yes | Included       |
+   *
+   * Examples:
+   *
+   * * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
+   * to find the MCP Server with the specified MCP Server ID.
+   * * `name:important` to find MCP Servers whose name contains `important` as a
+   * word.
+   * * `displayName:works*` to find MCP Servers whose display name contains
+   * words that start with `works`.
+   * * `planner OR booking` to find MCP Servers whose metadata contains the
+   * words `planner` or `booking`.
+   * * `mcpServerId:service-id AND (displayName:planner OR
+   * displayName:booking)` to find MCP Servers whose MCP Server ID contains
+   * `service-id` and whose display name contains `planner` or
+   * `booking`.
+   * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The searchString. + */ + @java.lang.Override + public java.lang.String getSearchString() { + java.lang.Object ref = searchString_; + 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(); + searchString_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Search criteria used to select the MCP Servers to return. If no
+   * search criteria is specified then all accessible MCP Servers will be
+   * returned.
+   *
+   * Search expressions can be used to restrict results based upon searchable
+   * fields, where the operators can be used along with the suffix wildcard
+   * symbol `*`. See
+   * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+   * for more details.
+   *
+   * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+   *
+   * Searchable fields:
+   *
+   * | Field              | `=` | `:` | `*` | Keyword Search |
+   * |--------------------|-----|-----|-----|----------------|
+   * | mcpServerId        | Yes | Yes | Yes | Included       |
+   * | name               | No  | Yes | Yes | Included       |
+   * | displayName        | No  | Yes | Yes | Included       |
+   *
+   * Examples:
+   *
+   * * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
+   * to find the MCP Server with the specified MCP Server ID.
+   * * `name:important` to find MCP Servers whose name contains `important` as a
+   * word.
+   * * `displayName:works*` to find MCP Servers whose display name contains
+   * words that start with `works`.
+   * * `planner OR booking` to find MCP Servers whose metadata contains the
+   * words `planner` or `booking`.
+   * * `mcpServerId:service-id AND (displayName:planner OR
+   * displayName:booking)` to find MCP Servers whose MCP Server ID contains
+   * `service-id` and whose display name contains `planner` or
+   * `booking`.
+   * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for searchString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchStringBytes() { + java.lang.Object ref = searchString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 6; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of search results to return per page. The page
+   * size is capped at `100`, even if a larger value is specified. A negative
+   * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+   * `0`, a default value of `20` will be used. The server may return fewer
+   * results than requested.
+   * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters, must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 7 [(.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. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters, must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 7 [(.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(searchString_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, searchString_); + } + if (pageSize_ != 0) { + output.writeInt32(6, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(searchString_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, searchString_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, 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.agentregistry.v1.SearchMcpServersRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.SearchMcpServersRequest other = + (com.google.cloud.agentregistry.v1.SearchMcpServersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSearchString().equals(other.getSearchString())) 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) + SEARCH_STRING_FIELD_NUMBER; + hash = (53 * hash) + getSearchString().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.agentregistry.v1.SearchMcpServersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersRequest 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.agentregistry.v1.SearchMcpServersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersRequest 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.agentregistry.v1.SearchMcpServersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersRequest 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.agentregistry.v1.SearchMcpServersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersRequest 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.agentregistry.v1.SearchMcpServersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersRequest 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.agentregistry.v1.SearchMcpServersRequest 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; + } + + /** + * + * + *
+   * Message for searching MCP Servers
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.SearchMcpServersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.SearchMcpServersRequest) + com.google.cloud.agentregistry.v1.SearchMcpServersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.SearchMcpServersRequest.class, + com.google.cloud.agentregistry.v1.SearchMcpServersRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.SearchMcpServersRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + searchString_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchMcpServersRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.SearchMcpServersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchMcpServersRequest build() { + com.google.cloud.agentregistry.v1.SearchMcpServersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchMcpServersRequest buildPartial() { + com.google.cloud.agentregistry.v1.SearchMcpServersRequest result = + new com.google.cloud.agentregistry.v1.SearchMcpServersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.SearchMcpServersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.searchString_ = searchString_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.SearchMcpServersRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.SearchMcpServersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.SearchMcpServersRequest other) { + if (other == com.google.cloud.agentregistry.v1.SearchMcpServersRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSearchString().isEmpty()) { + searchString_ = other.searchString_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + 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 26: + { + searchString_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 48: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 48 + case 58: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + 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. Parent value for SearchMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for SearchMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for SearchMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Parent value for SearchMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for SearchMcpServersRequest. Format:
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 java.lang.Object searchString_ = ""; + + /** + * + * + *
+     * Optional. Search criteria used to select the MCP Servers to return. If no
+     * search criteria is specified then all accessible MCP Servers will be
+     * returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | mcpServerId        | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     *
+     * Examples:
+     *
+     * * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
+     * to find the MCP Server with the specified MCP Server ID.
+     * * `name:important` to find MCP Servers whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find MCP Servers whose display name contains
+     * words that start with `works`.
+     * * `planner OR booking` to find MCP Servers whose metadata contains the
+     * words `planner` or `booking`.
+     * * `mcpServerId:service-id AND (displayName:planner OR
+     * displayName:booking)` to find MCP Servers whose MCP Server ID contains
+     * `service-id` and whose display name contains `planner` or
+     * `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The searchString. + */ + public java.lang.String getSearchString() { + java.lang.Object ref = searchString_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Search criteria used to select the MCP Servers to return. If no
+     * search criteria is specified then all accessible MCP Servers will be
+     * returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | mcpServerId        | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     *
+     * Examples:
+     *
+     * * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
+     * to find the MCP Server with the specified MCP Server ID.
+     * * `name:important` to find MCP Servers whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find MCP Servers whose display name contains
+     * words that start with `works`.
+     * * `planner OR booking` to find MCP Servers whose metadata contains the
+     * words `planner` or `booking`.
+     * * `mcpServerId:service-id AND (displayName:planner OR
+     * displayName:booking)` to find MCP Servers whose MCP Server ID contains
+     * `service-id` and whose display name contains `planner` or
+     * `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for searchString. + */ + public com.google.protobuf.ByteString getSearchStringBytes() { + java.lang.Object ref = searchString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Search criteria used to select the MCP Servers to return. If no
+     * search criteria is specified then all accessible MCP Servers will be
+     * returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | mcpServerId        | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     *
+     * Examples:
+     *
+     * * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
+     * to find the MCP Server with the specified MCP Server ID.
+     * * `name:important` to find MCP Servers whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find MCP Servers whose display name contains
+     * words that start with `works`.
+     * * `planner OR booking` to find MCP Servers whose metadata contains the
+     * words `planner` or `booking`.
+     * * `mcpServerId:service-id AND (displayName:planner OR
+     * displayName:booking)` to find MCP Servers whose MCP Server ID contains
+     * `service-id` and whose display name contains `planner` or
+     * `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The searchString to set. + * @return This builder for chaining. + */ + public Builder setSearchString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + searchString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Search criteria used to select the MCP Servers to return. If no
+     * search criteria is specified then all accessible MCP Servers will be
+     * returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | mcpServerId        | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     *
+     * Examples:
+     *
+     * * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
+     * to find the MCP Server with the specified MCP Server ID.
+     * * `name:important` to find MCP Servers whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find MCP Servers whose display name contains
+     * words that start with `works`.
+     * * `planner OR booking` to find MCP Servers whose metadata contains the
+     * words `planner` or `booking`.
+     * * `mcpServerId:service-id AND (displayName:planner OR
+     * displayName:booking)` to find MCP Servers whose MCP Server ID contains
+     * `service-id` and whose display name contains `planner` or
+     * `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSearchString() { + searchString_ = getDefaultInstance().getSearchString(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Search criteria used to select the MCP Servers to return. If no
+     * search criteria is specified then all accessible MCP Servers will be
+     * returned.
+     *
+     * Search expressions can be used to restrict results based upon searchable
+     * fields, where the operators can be used along with the suffix wildcard
+     * symbol `*`. See
+     * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+     * for more details.
+     *
+     * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+     *
+     * Searchable fields:
+     *
+     * | Field              | `=` | `:` | `*` | Keyword Search |
+     * |--------------------|-----|-----|-----|----------------|
+     * | mcpServerId        | Yes | Yes | Yes | Included       |
+     * | name               | No  | Yes | Yes | Included       |
+     * | displayName        | No  | Yes | Yes | Included       |
+     *
+     * Examples:
+     *
+     * * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
+     * to find the MCP Server with the specified MCP Server ID.
+     * * `name:important` to find MCP Servers whose name contains `important` as a
+     * word.
+     * * `displayName:works*` to find MCP Servers whose display name contains
+     * words that start with `works`.
+     * * `planner OR booking` to find MCP Servers whose metadata contains the
+     * words `planner` or `booking`.
+     * * `mcpServerId:service-id AND (displayName:planner OR
+     * displayName:booking)` to find MCP Servers whose MCP Server ID contains
+     * `service-id` and whose display name contains `planner` or
+     * `booking`.
+     * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for searchString to set. + * @return This builder for chaining. + */ + public Builder setSearchStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + searchString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of search results to return per page. The page
+     * size is capped at `100`, even if a larger value is specified. A negative
+     * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+     * `0`, a default value of `20` will be used. The server may return fewer
+     * results than requested.
+     * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of search results to return per page. The page
+     * size is capped at `100`, even if a larger value is specified. A negative
+     * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+     * `0`, a default value of `20` will be used. The server may return fewer
+     * results than requested.
+     * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of search results to return per page. The page
+     * size is capped at `100`, even if a larger value is specified. A negative
+     * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+     * `0`, a default value of `20` will be used. The server may return fewer
+     * results than requested.
+     * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.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. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.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. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters, must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 7 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.SearchMcpServersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.SearchMcpServersRequest) + private static final com.google.cloud.agentregistry.v1.SearchMcpServersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.SearchMcpServersRequest(); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchMcpServersRequest 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.agentregistry.v1.SearchMcpServersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersRequestOrBuilder.java new file mode 100644 index 000000000000..1b9b28ada89d --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersRequestOrBuilder.java @@ -0,0 +1,201 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface SearchMcpServersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.SearchMcpServersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for SearchMcpServersRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for SearchMcpServersRequest. Format:
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Search criteria used to select the MCP Servers to return. If no
+   * search criteria is specified then all accessible MCP Servers will be
+   * returned.
+   *
+   * Search expressions can be used to restrict results based upon searchable
+   * fields, where the operators can be used along with the suffix wildcard
+   * symbol `*`. See
+   * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+   * for more details.
+   *
+   * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+   *
+   * Searchable fields:
+   *
+   * | Field              | `=` | `:` | `*` | Keyword Search |
+   * |--------------------|-----|-----|-----|----------------|
+   * | mcpServerId        | Yes | Yes | Yes | Included       |
+   * | name               | No  | Yes | Yes | Included       |
+   * | displayName        | No  | Yes | Yes | Included       |
+   *
+   * Examples:
+   *
+   * * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
+   * to find the MCP Server with the specified MCP Server ID.
+   * * `name:important` to find MCP Servers whose name contains `important` as a
+   * word.
+   * * `displayName:works*` to find MCP Servers whose display name contains
+   * words that start with `works`.
+   * * `planner OR booking` to find MCP Servers whose metadata contains the
+   * words `planner` or `booking`.
+   * * `mcpServerId:service-id AND (displayName:planner OR
+   * displayName:booking)` to find MCP Servers whose MCP Server ID contains
+   * `service-id` and whose display name contains `planner` or
+   * `booking`.
+   * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The searchString. + */ + java.lang.String getSearchString(); + + /** + * + * + *
+   * Optional. Search criteria used to select the MCP Servers to return. If no
+   * search criteria is specified then all accessible MCP Servers will be
+   * returned.
+   *
+   * Search expressions can be used to restrict results based upon searchable
+   * fields, where the operators can be used along with the suffix wildcard
+   * symbol `*`. See
+   * [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
+   * for more details.
+   *
+   * Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
+   *
+   * Searchable fields:
+   *
+   * | Field              | `=` | `:` | `*` | Keyword Search |
+   * |--------------------|-----|-----|-----|----------------|
+   * | mcpServerId        | Yes | Yes | Yes | Included       |
+   * | name               | No  | Yes | Yes | Included       |
+   * | displayName        | No  | Yes | Yes | Included       |
+   *
+   * Examples:
+   *
+   * * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
+   * to find the MCP Server with the specified MCP Server ID.
+   * * `name:important` to find MCP Servers whose name contains `important` as a
+   * word.
+   * * `displayName:works*` to find MCP Servers whose display name contains
+   * words that start with `works`.
+   * * `planner OR booking` to find MCP Servers whose metadata contains the
+   * words `planner` or `booking`.
+   * * `mcpServerId:service-id AND (displayName:planner OR
+   * displayName:booking)` to find MCP Servers whose MCP Server ID contains
+   * `service-id` and whose display name contains `planner` or
+   * `booking`.
+   * 
+ * + * string search_string = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for searchString. + */ + com.google.protobuf.ByteString getSearchStringBytes(); + + /** + * + * + *
+   * Optional. The maximum number of search results to return per page. The page
+   * size is capped at `100`, even if a larger value is specified. A negative
+   * value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
+   * `0`, a default value of `20` will be used. The server may return fewer
+   * results than requested.
+   * 
+ * + * int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters, must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters, must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersResponse.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersResponse.java new file mode 100644 index 000000000000..afa794bfbf76 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersResponse.java @@ -0,0 +1,1128 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for response to searching MCP Servers
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.SearchMcpServersResponse} + */ +@com.google.protobuf.Generated +public final class SearchMcpServersResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.SearchMcpServersResponse) + SearchMcpServersResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchMcpServersResponse"); + } + + // Use SearchMcpServersResponse.newBuilder() to construct. + private SearchMcpServersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchMcpServersResponse() { + mcpServers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.SearchMcpServersResponse.class, + com.google.cloud.agentregistry.v1.SearchMcpServersResponse.Builder.class); + } + + public static final int MCP_SERVERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List mcpServers_; + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public java.util.List getMcpServersList() { + return mcpServers_; + } + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public java.util.List + getMcpServersOrBuilderList() { + return mcpServers_; + } + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + @java.lang.Override + public int getMcpServersCount() { + return mcpServers_.size(); + } + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * 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); + } + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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.agentregistry.v1.SearchMcpServersResponse)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.SearchMcpServersResponse other = + (com.google.cloud.agentregistry.v1.SearchMcpServersResponse) 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.agentregistry.v1.SearchMcpServersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersResponse 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.agentregistry.v1.SearchMcpServersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersResponse 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.agentregistry.v1.SearchMcpServersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersResponse 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.agentregistry.v1.SearchMcpServersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersResponse 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.agentregistry.v1.SearchMcpServersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersResponse 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.agentregistry.v1.SearchMcpServersResponse 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; + } + + /** + * + * + *
+   * Message for response to searching MCP Servers
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.SearchMcpServersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.SearchMcpServersResponse) + com.google.cloud.agentregistry.v1.SearchMcpServersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.SearchMcpServersResponse.class, + com.google.cloud.agentregistry.v1.SearchMcpServersResponse.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.SearchMcpServersResponse.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.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_SearchMcpServersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchMcpServersResponse getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.SearchMcpServersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchMcpServersResponse build() { + com.google.cloud.agentregistry.v1.SearchMcpServersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.SearchMcpServersResponse buildPartial() { + com.google.cloud.agentregistry.v1.SearchMcpServersResponse result = + new com.google.cloud.agentregistry.v1.SearchMcpServersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.agentregistry.v1.SearchMcpServersResponse 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.agentregistry.v1.SearchMcpServersResponse 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.agentregistry.v1.SearchMcpServersResponse) { + return mergeFrom((com.google.cloud.agentregistry.v1.SearchMcpServersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.SearchMcpServersResponse other) { + if (other == com.google.cloud.agentregistry.v1.SearchMcpServersResponse.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_; + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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(); + } + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public int getMcpServersCount() { + if (mcpServersBuilder_ == null) { + return mcpServers_.size(); + } else { + return mcpServersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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); + } + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + public com.google.cloud.agentregistry.v1.McpServer.Builder getMcpServersBuilder(int index) { + return internalGetMcpServersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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); + } + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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_); + } + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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()); + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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()); + } + + /** + * + * + *
+     * A list of McpServers that match the `search_string`.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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.agentregistry.v1.SearchMcpServersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.SearchMcpServersResponse) + private static final com.google.cloud.agentregistry.v1.SearchMcpServersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.SearchMcpServersResponse(); + } + + public static com.google.cloud.agentregistry.v1.SearchMcpServersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchMcpServersResponse 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.agentregistry.v1.SearchMcpServersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersResponseOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersResponseOrBuilder.java new file mode 100644 index 000000000000..ad4c125ca2f1 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/SearchMcpServersResponseOrBuilder.java @@ -0,0 +1,114 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface SearchMcpServersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.SearchMcpServersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + java.util.List getMcpServersList(); + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + com.google.cloud.agentregistry.v1.McpServer getMcpServers(int index); + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + int getMcpServersCount(); + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + java.util.List + getMcpServersOrBuilderList(); + + /** + * + * + *
+   * A list of McpServers that match the `search_string`.
+   * 
+ * + * repeated .google.cloud.agentregistry.v1.McpServer mcp_servers = 1; + */ + com.google.cloud.agentregistry.v1.McpServerOrBuilder getMcpServersOrBuilder(int index); + + /** + * + * + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Service.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Service.java new file mode 100644 index 000000000000..1f1c5a062eaf --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/Service.java @@ -0,0 +1,6841 @@ +/* + * 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/agentregistry/v1/service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Represents a user-defined Service.
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Service} + */ +@com.google.protobuf.Generated +public final class Service extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Service) + ServiceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Service"); + } + + // Use Service.newBuilder() to construct. + private Service(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Service() { + name_ = ""; + displayName_ = ""; + description_ = ""; + interfaces_ = java.util.Collections.emptyList(); + registryResource_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Service.class, + com.google.cloud.agentregistry.v1.Service.Builder.class); + } + + public interface AgentSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Service.AgentSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The type of the agent spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+     * Required. The type of the agent spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.agentregistry.v1.Service.AgentSpec.Type getType(); + + /** + * + * + *
+     * Optional. The content of the Agent spec in the JSON format.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + boolean hasContent(); + + /** + * + * + *
+     * Optional. The content of the Agent spec in the JSON format.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + com.google.protobuf.Struct getContent(); + + /** + * + * + *
+     * Optional. The content of the Agent spec in the JSON format.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.StructOrBuilder getContentOrBuilder(); + } + + /** + * + * + *
+   * The spec of the agent.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Service.AgentSpec} + */ + public static final class AgentSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Service.AgentSpec) + AgentSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentSpec"); + } + + // Use AgentSpec.newBuilder() to construct. + private AgentSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AgentSpec() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Service.AgentSpec.class, + com.google.cloud.agentregistry.v1.Service.AgentSpec.Builder.class); + } + + /** + * + * + *
+     * The type of the agent spec.
+     * 
+ * + * Protobuf enum {@code google.cloud.agentregistry.v1.Service.AgentSpec.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * There is no spec for the Agent. The `content` field must be empty.
+       * 
+ * + * NO_SPEC = 1; + */ + NO_SPEC(1), + /** + * + * + *
+       * The content is an A2A Agent Card following the A2A specification.
+       * The `interfaces` field must be empty.
+       * 
+ * + * A2A_AGENT_CARD = 2; + */ + A2A_AGENT_CARD(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * There is no spec for the Agent. The `content` field must be empty.
+       * 
+ * + * NO_SPEC = 1; + */ + public static final int NO_SPEC_VALUE = 1; + + /** + * + * + *
+       * The content is an A2A Agent Card following the A2A specification.
+       * The `interfaces` field must be empty.
+       * 
+ * + * A2A_AGENT_CARD = 2; + */ + public static final int A2A_AGENT_CARD_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return NO_SPEC; + case 2: + return A2A_AGENT_CARD; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.Service.AgentSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.agentregistry.v1.Service.AgentSpec.Type) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+     * Required. The type of the agent spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Required. The type of the agent spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.AgentSpec.Type getType() { + com.google.cloud.agentregistry.v1.Service.AgentSpec.Type result = + com.google.cloud.agentregistry.v1.Service.AgentSpec.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Service.AgentSpec.Type.UNRECOGNIZED + : result; + } + + public static final int CONTENT_FIELD_NUMBER = 2; + private com.google.protobuf.Struct content_; + + /** + * + * + *
+     * Optional. The content of the Agent spec in the JSON format.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The content of the Agent spec in the JSON format.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.Struct getContent() { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + + /** + * + * + *
+     * Optional. The content of the Agent spec in the JSON format.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getContentOrBuilder() { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + + 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 (type_ + != com.google.cloud.agentregistry.v1.Service.AgentSpec.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getContent()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.agentregistry.v1.Service.AgentSpec.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContent()); + } + 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.agentregistry.v1.Service.AgentSpec)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Service.AgentSpec other = + (com.google.cloud.agentregistry.v1.Service.AgentSpec) obj; + + if (type_ != other.type_) return false; + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent().equals(other.getContent())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Service.AgentSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service.AgentSpec 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.agentregistry.v1.Service.AgentSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service.AgentSpec 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.agentregistry.v1.Service.AgentSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service.AgentSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Service.AgentSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service.AgentSpec 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.agentregistry.v1.Service.AgentSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service.AgentSpec 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.agentregistry.v1.Service.AgentSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service.AgentSpec 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.agentregistry.v1.Service.AgentSpec 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; + } + + /** + * + * + *
+     * The spec of the agent.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Service.AgentSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Service.AgentSpec) + com.google.cloud.agentregistry.v1.Service.AgentSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Service.AgentSpec.class, + com.google.cloud.agentregistry.v1.Service.AgentSpec.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Service.AgentSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetContentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.AgentSpec getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Service.AgentSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.AgentSpec build() { + com.google.cloud.agentregistry.v1.Service.AgentSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.AgentSpec buildPartial() { + com.google.cloud.agentregistry.v1.Service.AgentSpec result = + new com.google.cloud.agentregistry.v1.Service.AgentSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Service.AgentSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = contentBuilder_ == null ? content_ : contentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Service.AgentSpec) { + return mergeFrom((com.google.cloud.agentregistry.v1.Service.AgentSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Service.AgentSpec other) { + if (other == com.google.cloud.agentregistry.v1.Service.AgentSpec.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasContent()) { + mergeContent(other.getContent()); + } + 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 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetContentFieldBuilder().getBuilder(), extensionRegistry); + 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 int type_ = 0; + + /** + * + * + *
+       * Required. The type of the agent spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+       * Required. The type of the agent spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The type of the agent spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.AgentSpec.Type getType() { + com.google.cloud.agentregistry.v1.Service.AgentSpec.Type result = + com.google.cloud.agentregistry.v1.Service.AgentSpec.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Service.AgentSpec.Type.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. The type of the agent spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.agentregistry.v1.Service.AgentSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The type of the agent spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Struct content_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + contentBuilder_; + + /** + * + * + *
+       * Optional. The content of the Agent spec in the JSON format.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. The content of the Agent spec in the JSON format.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + public com.google.protobuf.Struct getContent() { + if (contentBuilder_ == null) { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } else { + return contentBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. The content of the Agent spec in the JSON format.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setContent(com.google.protobuf.Struct value) { + if (contentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + } else { + contentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The content of the Agent spec in the JSON format.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setContent(com.google.protobuf.Struct.Builder builderForValue) { + if (contentBuilder_ == null) { + content_ = builderForValue.build(); + } else { + contentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The content of the Agent spec in the JSON format.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeContent(com.google.protobuf.Struct value) { + if (contentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && content_ != null + && content_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContentBuilder().mergeFrom(value); + } else { + content_ = value; + } + } else { + contentBuilder_.mergeFrom(value); + } + if (content_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. The content of the Agent spec in the JSON format.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000002); + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The content of the Agent spec in the JSON format.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Struct.Builder getContentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetContentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The content of the Agent spec in the JSON format.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.StructOrBuilder getContentOrBuilder() { + if (contentBuilder_ != null) { + return contentBuilder_.getMessageOrBuilder(); + } else { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + } + + /** + * + * + *
+       * Optional. The content of the Agent spec in the JSON format.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetContentFieldBuilder() { + if (contentBuilder_ == null) { + contentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getContent(), getParentForChildren(), isClean()); + content_ = null; + } + return contentBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Service.AgentSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Service.AgentSpec) + private static final com.google.cloud.agentregistry.v1.Service.AgentSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Service.AgentSpec(); + } + + public static com.google.cloud.agentregistry.v1.Service.AgentSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentSpec 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.agentregistry.v1.Service.AgentSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface McpServerSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Service.McpServerSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The type of the MCP Server spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+     * Required. The type of the MCP Server spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type getType(); + + /** + * + * + *
+     * Optional. The content of the MCP Server spec.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + boolean hasContent(); + + /** + * + * + *
+     * Optional. The content of the MCP Server spec.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + com.google.protobuf.Struct getContent(); + + /** + * + * + *
+     * Optional. The content of the MCP Server spec.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.StructOrBuilder getContentOrBuilder(); + } + + /** + * + * + *
+   * The spec of the MCP Server.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Service.McpServerSpec} + */ + public static final class McpServerSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Service.McpServerSpec) + McpServerSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "McpServerSpec"); + } + + // Use McpServerSpec.newBuilder() to construct. + private McpServerSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private McpServerSpec() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Service.McpServerSpec.class, + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Builder.class); + } + + /** + * + * + *
+     * The type of the MCP Server spec.
+     * 
+ * + * Protobuf enum {@code google.cloud.agentregistry.v1.Service.McpServerSpec.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * There is no spec for the MCP Server. The `content` field must be empty.
+       * 
+ * + * NO_SPEC = 1; + */ + NO_SPEC(1), + /** + * + * + *
+       * The content is a MCP Tool Spec following the One MCP specification.
+       * The payload is the same as the `tools/list` response.
+       * 
+ * + * TOOL_SPEC = 2; + */ + TOOL_SPEC(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * There is no spec for the MCP Server. The `content` field must be empty.
+       * 
+ * + * NO_SPEC = 1; + */ + public static final int NO_SPEC_VALUE = 1; + + /** + * + * + *
+       * The content is a MCP Tool Spec following the One MCP specification.
+       * The payload is the same as the `tools/list` response.
+       * 
+ * + * TOOL_SPEC = 2; + */ + public static final int TOOL_SPEC_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return NO_SPEC; + case 2: + return TOOL_SPEC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.agentregistry.v1.Service.McpServerSpec.Type) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+     * Required. The type of the MCP Server spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Required. The type of the MCP Server spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type getType() { + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type result = + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type.UNRECOGNIZED + : result; + } + + public static final int CONTENT_FIELD_NUMBER = 2; + private com.google.protobuf.Struct content_; + + /** + * + * + *
+     * Optional. The content of the MCP Server spec.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The content of the MCP Server spec.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.Struct getContent() { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + + /** + * + * + *
+     * Optional. The content of the MCP Server spec.
+     * This payload is validated against the schema for the specified type.
+     * The content size is limited to `10KB`.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getContentOrBuilder() { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + + 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 (type_ + != com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getContent()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContent()); + } + 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.agentregistry.v1.Service.McpServerSpec)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Service.McpServerSpec other = + (com.google.cloud.agentregistry.v1.Service.McpServerSpec) obj; + + if (type_ != other.type_) return false; + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent().equals(other.getContent())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Service.McpServerSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service.McpServerSpec 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.agentregistry.v1.Service.McpServerSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service.McpServerSpec 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.agentregistry.v1.Service.McpServerSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service.McpServerSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Service.McpServerSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service.McpServerSpec 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.agentregistry.v1.Service.McpServerSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service.McpServerSpec 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.agentregistry.v1.Service.McpServerSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service.McpServerSpec 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.agentregistry.v1.Service.McpServerSpec 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; + } + + /** + * + * + *
+     * The spec of the MCP Server.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Service.McpServerSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Service.McpServerSpec) + com.google.cloud.agentregistry.v1.Service.McpServerSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Service.McpServerSpec.class, + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Service.McpServerSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetContentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.McpServerSpec getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.McpServerSpec build() { + com.google.cloud.agentregistry.v1.Service.McpServerSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.McpServerSpec buildPartial() { + com.google.cloud.agentregistry.v1.Service.McpServerSpec result = + new com.google.cloud.agentregistry.v1.Service.McpServerSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Service.McpServerSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = contentBuilder_ == null ? content_ : contentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Service.McpServerSpec) { + return mergeFrom((com.google.cloud.agentregistry.v1.Service.McpServerSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Service.McpServerSpec other) { + if (other == com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasContent()) { + mergeContent(other.getContent()); + } + 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 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetContentFieldBuilder().getBuilder(), extensionRegistry); + 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 int type_ = 0; + + /** + * + * + *
+       * Required. The type of the MCP Server spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+       * Required. The type of the MCP Server spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The type of the MCP Server spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type getType() { + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type result = + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. The type of the MCP Server spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.agentregistry.v1.Service.McpServerSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The type of the MCP Server spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Struct content_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + contentBuilder_; + + /** + * + * + *
+       * Optional. The content of the MCP Server spec.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. The content of the MCP Server spec.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + public com.google.protobuf.Struct getContent() { + if (contentBuilder_ == null) { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } else { + return contentBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. The content of the MCP Server spec.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setContent(com.google.protobuf.Struct value) { + if (contentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + } else { + contentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The content of the MCP Server spec.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setContent(com.google.protobuf.Struct.Builder builderForValue) { + if (contentBuilder_ == null) { + content_ = builderForValue.build(); + } else { + contentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The content of the MCP Server spec.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeContent(com.google.protobuf.Struct value) { + if (contentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && content_ != null + && content_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContentBuilder().mergeFrom(value); + } else { + content_ = value; + } + } else { + contentBuilder_.mergeFrom(value); + } + if (content_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. The content of the MCP Server spec.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000002); + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The content of the MCP Server spec.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Struct.Builder getContentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetContentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The content of the MCP Server spec.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.StructOrBuilder getContentOrBuilder() { + if (contentBuilder_ != null) { + return contentBuilder_.getMessageOrBuilder(); + } else { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + } + + /** + * + * + *
+       * Optional. The content of the MCP Server spec.
+       * This payload is validated against the schema for the specified type.
+       * The content size is limited to `10KB`.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetContentFieldBuilder() { + if (contentBuilder_ == null) { + contentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getContent(), getParentForChildren(), isClean()); + content_ = null; + } + return contentBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Service.McpServerSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Service.McpServerSpec) + private static final com.google.cloud.agentregistry.v1.Service.McpServerSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Service.McpServerSpec(); + } + + public static com.google.cloud.agentregistry.v1.Service.McpServerSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public McpServerSpec 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.agentregistry.v1.Service.McpServerSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndpointSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Service.EndpointSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The type of the endpoint spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+     * Required. The type of the endpoint spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type getType(); + + /** + * + * + *
+     * Optional. The content of the endpoint spec.
+     * Reserved for future use.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + boolean hasContent(); + + /** + * + * + *
+     * Optional. The content of the endpoint spec.
+     * Reserved for future use.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + com.google.protobuf.Struct getContent(); + + /** + * + * + *
+     * Optional. The content of the endpoint spec.
+     * Reserved for future use.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.StructOrBuilder getContentOrBuilder(); + } + + /** + * + * + *
+   * The spec of the endpoint.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Service.EndpointSpec} + */ + public static final class EndpointSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.Service.EndpointSpec) + EndpointSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EndpointSpec"); + } + + // Use EndpointSpec.newBuilder() to construct. + private EndpointSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EndpointSpec() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Service.EndpointSpec.class, + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Builder.class); + } + + /** + * + * + *
+     * The type of the endpoint spec.
+     * 
+ * + * Protobuf enum {@code google.cloud.agentregistry.v1.Service.EndpointSpec.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * There is no spec for the Endpoint. The `content` field must be empty.
+       * 
+ * + * NO_SPEC = 1; + */ + NO_SPEC(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+       * Unspecified type.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * There is no spec for the Endpoint. The `content` field must be empty.
+       * 
+ * + * NO_SPEC = 1; + */ + public static final int NO_SPEC_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return NO_SPEC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.agentregistry.v1.Service.EndpointSpec.Type) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+     * Required. The type of the endpoint spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Required. The type of the endpoint spec content.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type getType() { + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type result = + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type.UNRECOGNIZED + : result; + } + + public static final int CONTENT_FIELD_NUMBER = 2; + private com.google.protobuf.Struct content_; + + /** + * + * + *
+     * Optional. The content of the endpoint spec.
+     * Reserved for future use.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The content of the endpoint spec.
+     * Reserved for future use.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.Struct getContent() { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + + /** + * + * + *
+     * Optional. The content of the endpoint spec.
+     * Reserved for future use.
+     * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getContentOrBuilder() { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + + 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 (type_ + != com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getContent()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContent()); + } + 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.agentregistry.v1.Service.EndpointSpec)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Service.EndpointSpec other = + (com.google.cloud.agentregistry.v1.Service.EndpointSpec) obj; + + if (type_ != other.type_) return false; + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent().equals(other.getContent())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Service.EndpointSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service.EndpointSpec 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.agentregistry.v1.Service.EndpointSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service.EndpointSpec 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.agentregistry.v1.Service.EndpointSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service.EndpointSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Service.EndpointSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service.EndpointSpec 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.agentregistry.v1.Service.EndpointSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service.EndpointSpec 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.agentregistry.v1.Service.EndpointSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service.EndpointSpec 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.agentregistry.v1.Service.EndpointSpec 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; + } + + /** + * + * + *
+     * The spec of the endpoint.
+     * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Service.EndpointSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Service.EndpointSpec) + com.google.cloud.agentregistry.v1.Service.EndpointSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Service.EndpointSpec.class, + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Service.EndpointSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetContentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.EndpointSpec getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.EndpointSpec build() { + com.google.cloud.agentregistry.v1.Service.EndpointSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.EndpointSpec buildPartial() { + com.google.cloud.agentregistry.v1.Service.EndpointSpec result = + new com.google.cloud.agentregistry.v1.Service.EndpointSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Service.EndpointSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = contentBuilder_ == null ? content_ : contentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Service.EndpointSpec) { + return mergeFrom((com.google.cloud.agentregistry.v1.Service.EndpointSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Service.EndpointSpec other) { + if (other == com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasContent()) { + mergeContent(other.getContent()); + } + 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 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetContentFieldBuilder().getBuilder(), extensionRegistry); + 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 int type_ = 0; + + /** + * + * + *
+       * Required. The type of the endpoint spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+       * Required. The type of the endpoint spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The type of the endpoint spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type getType() { + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type result = + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type.forNumber(type_); + return result == null + ? com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. The type of the endpoint spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.agentregistry.v1.Service.EndpointSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The type of the endpoint spec content.
+       * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Struct content_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + contentBuilder_; + + /** + * + * + *
+       * Optional. The content of the endpoint spec.
+       * Reserved for future use.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. The content of the endpoint spec.
+       * Reserved for future use.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + public com.google.protobuf.Struct getContent() { + if (contentBuilder_ == null) { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } else { + return contentBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. The content of the endpoint spec.
+       * Reserved for future use.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setContent(com.google.protobuf.Struct value) { + if (contentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + } else { + contentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The content of the endpoint spec.
+       * Reserved for future use.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setContent(com.google.protobuf.Struct.Builder builderForValue) { + if (contentBuilder_ == null) { + content_ = builderForValue.build(); + } else { + contentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The content of the endpoint spec.
+       * Reserved for future use.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeContent(com.google.protobuf.Struct value) { + if (contentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && content_ != null + && content_ != com.google.protobuf.Struct.getDefaultInstance()) { + getContentBuilder().mergeFrom(value); + } else { + content_ = value; + } + } else { + contentBuilder_.mergeFrom(value); + } + if (content_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. The content of the endpoint spec.
+       * Reserved for future use.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000002); + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The content of the endpoint spec.
+       * Reserved for future use.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Struct.Builder getContentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetContentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The content of the endpoint spec.
+       * Reserved for future use.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.StructOrBuilder getContentOrBuilder() { + if (contentBuilder_ != null) { + return contentBuilder_.getMessageOrBuilder(); + } else { + return content_ == null ? com.google.protobuf.Struct.getDefaultInstance() : content_; + } + } + + /** + * + * + *
+       * Optional. The content of the endpoint spec.
+       * Reserved for future use.
+       * 
+ * + * .google.protobuf.Struct content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetContentFieldBuilder() { + if (contentBuilder_ == null) { + contentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getContent(), getParentForChildren(), isClean()); + content_ = null; + } + return contentBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Service.EndpointSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Service.EndpointSpec) + private static final com.google.cloud.agentregistry.v1.Service.EndpointSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Service.EndpointSpec(); + } + + public static com.google.cloud.agentregistry.v1.Service.EndpointSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndpointSpec 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.agentregistry.v1.Service.EndpointSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int specCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object spec_; + + public enum SpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AGENT_SPEC(5), + MCP_SERVER_SPEC(6), + ENDPOINT_SPEC(7), + SPEC_NOT_SET(0); + private final int value; + + private SpecCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SpecCase valueOf(int value) { + return forNumber(value); + } + + public static SpecCase forNumber(int value) { + switch (value) { + case 5: + return AGENT_SPEC; + case 6: + return MCP_SERVER_SPEC; + case 7: + return ENDPOINT_SPEC; + case 0: + return SPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SpecCase getSpecCase() { + return SpecCase.forNumber(specCase_); + } + + public static final int AGENT_SPEC_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+   * the service is Agent.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentSpec field is set. + */ + @java.lang.Override + public boolean hasAgentSpec() { + return specCase_ == 5; + } + + /** + * + * + *
+   * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+   * the service is Agent.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentSpec. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.AgentSpec getAgentSpec() { + if (specCase_ == 5) { + return (com.google.cloud.agentregistry.v1.Service.AgentSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.AgentSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+   * the service is Agent.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.AgentSpecOrBuilder getAgentSpecOrBuilder() { + if (specCase_ == 5) { + return (com.google.cloud.agentregistry.v1.Service.AgentSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.AgentSpec.getDefaultInstance(); + } + + public static final int MCP_SERVER_SPEC_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+   * type of the service is MCP Server.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mcpServerSpec field is set. + */ + @java.lang.Override + public boolean hasMcpServerSpec() { + return specCase_ == 6; + } + + /** + * + * + *
+   * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+   * type of the service is MCP Server.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mcpServerSpec. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.McpServerSpec getMcpServerSpec() { + if (specCase_ == 6) { + return (com.google.cloud.agentregistry.v1.Service.McpServerSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+   * type of the service is MCP Server.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.McpServerSpecOrBuilder + getMcpServerSpecOrBuilder() { + if (specCase_ == 6) { + return (com.google.cloud.agentregistry.v1.Service.McpServerSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDefaultInstance(); + } + + public static final int ENDPOINT_SPEC_FIELD_NUMBER = 7; + + /** + * + * + *
+   * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+   * of the service is Endpoint.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endpointSpec field is set. + */ + @java.lang.Override + public boolean hasEndpointSpec() { + return specCase_ == 7; + } + + /** + * + * + *
+   * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+   * of the service is Endpoint.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endpointSpec. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.EndpointSpec getEndpointSpec() { + if (specCase_ == 7) { + return (com.google.cloud.agentregistry.v1.Service.EndpointSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+   * of the service is Endpoint.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.EndpointSpecOrBuilder + getEndpointSpecOrBuilder() { + if (specCase_ == 7) { + return (com.google.cloud.agentregistry.v1.Service.EndpointSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. User-defined display name for the Service.
+   * Can have a maximum length of `63` characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. User-defined display name for the Service.
+   * Can have a maximum length of `63` characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. User-defined description of an Service.
+   * Can have a maximum length of `2048` characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. User-defined description of an Service.
+   * Can have a maximum length of `2048` characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List interfaces_; + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getInterfacesList() { + return interfaces_; + } + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getInterfacesOrBuilderList() { + return interfaces_; + } + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getInterfacesCount() { + return interfaces_.size(); + } + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Interface getInterfaces(int index) { + return interfaces_.get(index); + } + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index) { + return interfaces_.get(index); + } + + public static final int REGISTRY_RESOURCE_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object registryResource_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the resulting Agent, MCP Server, or
+   * Endpoint. Format:
+   *
+   * * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
+   * * `projects/{project}/locations/{location}/agents/{agent}`
+   * * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * string registry_resource = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The registryResource. + */ + @java.lang.Override + public java.lang.String getRegistryResource() { + java.lang.Object ref = registryResource_; + 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(); + registryResource_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the resulting Agent, MCP Server, or
+   * Endpoint. Format:
+   *
+   * * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
+   * * `projects/{project}/locations/{location}/agents/{agent}`
+   * * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * string registry_resource = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for registryResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegistryResourceBytes() { + java.lang.Object ref = registryResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + for (int i = 0; i < interfaces_.size(); i++) { + output.writeMessage(4, interfaces_.get(i)); + } + if (specCase_ == 5) { + output.writeMessage(5, (com.google.cloud.agentregistry.v1.Service.AgentSpec) spec_); + } + if (specCase_ == 6) { + output.writeMessage(6, (com.google.cloud.agentregistry.v1.Service.McpServerSpec) spec_); + } + if (specCase_ == 7) { + output.writeMessage(7, (com.google.cloud.agentregistry.v1.Service.EndpointSpec) spec_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryResource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, registryResource_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + for (int i = 0; i < interfaces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, interfaces_.get(i)); + } + if (specCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.agentregistry.v1.Service.AgentSpec) spec_); + } + if (specCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.agentregistry.v1.Service.McpServerSpec) spec_); + } + if (specCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.agentregistry.v1.Service.EndpointSpec) spec_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryResource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, registryResource_); + } + 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.agentregistry.v1.Service)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.Service other = + (com.google.cloud.agentregistry.v1.Service) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getInterfacesList().equals(other.getInterfacesList())) return false; + if (!getRegistryResource().equals(other.getRegistryResource())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getSpecCase().equals(other.getSpecCase())) return false; + switch (specCase_) { + case 5: + if (!getAgentSpec().equals(other.getAgentSpec())) return false; + break; + case 6: + if (!getMcpServerSpec().equals(other.getMcpServerSpec())) return false; + break; + case 7: + if (!getEndpointSpec().equals(other.getEndpointSpec())) return false; + break; + case 0: + default: + } + 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 = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getInterfacesCount() > 0) { + hash = (37 * hash) + INTERFACES_FIELD_NUMBER; + hash = (53 * hash) + getInterfacesList().hashCode(); + } + hash = (37 * hash) + REGISTRY_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getRegistryResource().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (specCase_) { + case 5: + hash = (37 * hash) + AGENT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAgentSpec().hashCode(); + break; + case 6: + hash = (37 * hash) + MCP_SERVER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMcpServerSpec().hashCode(); + break; + case 7: + hash = (37 * hash) + ENDPOINT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEndpointSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.Service parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service 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.agentregistry.v1.Service parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service 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.agentregistry.v1.Service parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.Service parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.Service parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service 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.agentregistry.v1.Service parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service 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.agentregistry.v1.Service parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.Service 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.agentregistry.v1.Service 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; + } + + /** + * + * + *
+   * Represents a user-defined Service.
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.Service} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.Service) + com.google.cloud.agentregistry.v1.ServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.Service.class, + com.google.cloud.agentregistry.v1.Service.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.Service.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInterfacesFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (agentSpecBuilder_ != null) { + agentSpecBuilder_.clear(); + } + if (mcpServerSpecBuilder_ != null) { + mcpServerSpecBuilder_.clear(); + } + if (endpointSpecBuilder_ != null) { + endpointSpecBuilder_.clear(); + } + name_ = ""; + displayName_ = ""; + description_ = ""; + if (interfacesBuilder_ == null) { + interfaces_ = java.util.Collections.emptyList(); + } else { + interfaces_ = null; + interfacesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + registryResource_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + specCase_ = 0; + spec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.ServiceProto + .internal_static_google_cloud_agentregistry_v1_Service_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.Service.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service build() { + com.google.cloud.agentregistry.v1.Service result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service buildPartial() { + com.google.cloud.agentregistry.v1.Service result = + new com.google.cloud.agentregistry.v1.Service(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.agentregistry.v1.Service result) { + if (interfacesBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + interfaces_ = java.util.Collections.unmodifiableList(interfaces_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.interfaces_ = interfaces_; + } else { + result.interfaces_ = interfacesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.Service result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.registryResource_ = registryResource_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.agentregistry.v1.Service result) { + result.specCase_ = specCase_; + result.spec_ = this.spec_; + if (specCase_ == 5 && agentSpecBuilder_ != null) { + result.spec_ = agentSpecBuilder_.build(); + } + if (specCase_ == 6 && mcpServerSpecBuilder_ != null) { + result.spec_ = mcpServerSpecBuilder_.build(); + } + if (specCase_ == 7 && endpointSpecBuilder_ != null) { + result.spec_ = endpointSpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.Service) { + return mergeFrom((com.google.cloud.agentregistry.v1.Service) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.Service other) { + if (other == com.google.cloud.agentregistry.v1.Service.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (interfacesBuilder_ == null) { + if (!other.interfaces_.isEmpty()) { + if (interfaces_.isEmpty()) { + interfaces_ = other.interfaces_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureInterfacesIsMutable(); + interfaces_.addAll(other.interfaces_); + } + onChanged(); + } + } else { + if (!other.interfaces_.isEmpty()) { + if (interfacesBuilder_.isEmpty()) { + interfacesBuilder_.dispose(); + interfacesBuilder_ = null; + interfaces_ = other.interfaces_; + bitField0_ = (bitField0_ & ~0x00000040); + interfacesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInterfacesFieldBuilder() + : null; + } else { + interfacesBuilder_.addAllMessages(other.interfaces_); + } + } + } + if (!other.getRegistryResource().isEmpty()) { + registryResource_ = other.registryResource_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getSpecCase()) { + case AGENT_SPEC: + { + mergeAgentSpec(other.getAgentSpec()); + break; + } + case MCP_SERVER_SPEC: + { + mergeMcpServerSpec(other.getMcpServerSpec()); + break; + } + case ENDPOINT_SPEC: + { + mergeEndpointSpec(other.getEndpointSpec()); + break; + } + case SPEC_NOT_SET: + { + break; + } + } + 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_ |= 0x00000008; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26 + case 34: + { + com.google.cloud.agentregistry.v1.Interface m = + input.readMessage( + com.google.cloud.agentregistry.v1.Interface.parser(), extensionRegistry); + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(m); + } else { + interfacesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetAgentSpecFieldBuilder().getBuilder(), extensionRegistry); + specCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetMcpServerSpecFieldBuilder().getBuilder(), extensionRegistry); + specCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetEndpointSpecFieldBuilder().getBuilder(), extensionRegistry); + specCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 74 + case 82: + { + registryResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 82 + 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 specCase_ = 0; + private java.lang.Object spec_; + + public SpecCase getSpecCase() { + return SpecCase.forNumber(specCase_); + } + + public Builder clearSpec() { + specCase_ = 0; + spec_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service.AgentSpec, + com.google.cloud.agentregistry.v1.Service.AgentSpec.Builder, + com.google.cloud.agentregistry.v1.Service.AgentSpecOrBuilder> + agentSpecBuilder_; + + /** + * + * + *
+     * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+     * the service is Agent.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentSpec field is set. + */ + @java.lang.Override + public boolean hasAgentSpec() { + return specCase_ == 5; + } + + /** + * + * + *
+     * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+     * the service is Agent.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentSpec. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.AgentSpec getAgentSpec() { + if (agentSpecBuilder_ == null) { + if (specCase_ == 5) { + return (com.google.cloud.agentregistry.v1.Service.AgentSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.AgentSpec.getDefaultInstance(); + } else { + if (specCase_ == 5) { + return agentSpecBuilder_.getMessage(); + } + return com.google.cloud.agentregistry.v1.Service.AgentSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+     * the service is Agent.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAgentSpec(com.google.cloud.agentregistry.v1.Service.AgentSpec value) { + if (agentSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spec_ = value; + onChanged(); + } else { + agentSpecBuilder_.setMessage(value); + } + specCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+     * the service is Agent.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAgentSpec( + com.google.cloud.agentregistry.v1.Service.AgentSpec.Builder builderForValue) { + if (agentSpecBuilder_ == null) { + spec_ = builderForValue.build(); + onChanged(); + } else { + agentSpecBuilder_.setMessage(builderForValue.build()); + } + specCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+     * the service is Agent.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAgentSpec(com.google.cloud.agentregistry.v1.Service.AgentSpec value) { + if (agentSpecBuilder_ == null) { + if (specCase_ == 5 + && spec_ != com.google.cloud.agentregistry.v1.Service.AgentSpec.getDefaultInstance()) { + spec_ = + com.google.cloud.agentregistry.v1.Service.AgentSpec.newBuilder( + (com.google.cloud.agentregistry.v1.Service.AgentSpec) spec_) + .mergeFrom(value) + .buildPartial(); + } else { + spec_ = value; + } + onChanged(); + } else { + if (specCase_ == 5) { + agentSpecBuilder_.mergeFrom(value); + } else { + agentSpecBuilder_.setMessage(value); + } + } + specCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+     * the service is Agent.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAgentSpec() { + if (agentSpecBuilder_ == null) { + if (specCase_ == 5) { + specCase_ = 0; + spec_ = null; + onChanged(); + } + } else { + if (specCase_ == 5) { + specCase_ = 0; + spec_ = null; + } + agentSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+     * the service is Agent.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.agentregistry.v1.Service.AgentSpec.Builder getAgentSpecBuilder() { + return internalGetAgentSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+     * the service is Agent.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.AgentSpecOrBuilder getAgentSpecOrBuilder() { + if ((specCase_ == 5) && (agentSpecBuilder_ != null)) { + return agentSpecBuilder_.getMessageOrBuilder(); + } else { + if (specCase_ == 5) { + return (com.google.cloud.agentregistry.v1.Service.AgentSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.AgentSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+     * the service is Agent.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service.AgentSpec, + com.google.cloud.agentregistry.v1.Service.AgentSpec.Builder, + com.google.cloud.agentregistry.v1.Service.AgentSpecOrBuilder> + internalGetAgentSpecFieldBuilder() { + if (agentSpecBuilder_ == null) { + if (!(specCase_ == 5)) { + spec_ = com.google.cloud.agentregistry.v1.Service.AgentSpec.getDefaultInstance(); + } + agentSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service.AgentSpec, + com.google.cloud.agentregistry.v1.Service.AgentSpec.Builder, + com.google.cloud.agentregistry.v1.Service.AgentSpecOrBuilder>( + (com.google.cloud.agentregistry.v1.Service.AgentSpec) spec_, + getParentForChildren(), + isClean()); + spec_ = null; + } + specCase_ = 5; + onChanged(); + return agentSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service.McpServerSpec, + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Builder, + com.google.cloud.agentregistry.v1.Service.McpServerSpecOrBuilder> + mcpServerSpecBuilder_; + + /** + * + * + *
+     * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+     * type of the service is MCP Server.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mcpServerSpec field is set. + */ + @java.lang.Override + public boolean hasMcpServerSpec() { + return specCase_ == 6; + } + + /** + * + * + *
+     * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+     * type of the service is MCP Server.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mcpServerSpec. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.McpServerSpec getMcpServerSpec() { + if (mcpServerSpecBuilder_ == null) { + if (specCase_ == 6) { + return (com.google.cloud.agentregistry.v1.Service.McpServerSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDefaultInstance(); + } else { + if (specCase_ == 6) { + return mcpServerSpecBuilder_.getMessage(); + } + return com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+     * type of the service is MCP Server.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMcpServerSpec(com.google.cloud.agentregistry.v1.Service.McpServerSpec value) { + if (mcpServerSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spec_ = value; + onChanged(); + } else { + mcpServerSpecBuilder_.setMessage(value); + } + specCase_ = 6; + return this; + } + + /** + * + * + *
+     * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+     * type of the service is MCP Server.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMcpServerSpec( + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Builder builderForValue) { + if (mcpServerSpecBuilder_ == null) { + spec_ = builderForValue.build(); + onChanged(); + } else { + mcpServerSpecBuilder_.setMessage(builderForValue.build()); + } + specCase_ = 6; + return this; + } + + /** + * + * + *
+     * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+     * type of the service is MCP Server.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMcpServerSpec( + com.google.cloud.agentregistry.v1.Service.McpServerSpec value) { + if (mcpServerSpecBuilder_ == null) { + if (specCase_ == 6 + && spec_ + != com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDefaultInstance()) { + spec_ = + com.google.cloud.agentregistry.v1.Service.McpServerSpec.newBuilder( + (com.google.cloud.agentregistry.v1.Service.McpServerSpec) spec_) + .mergeFrom(value) + .buildPartial(); + } else { + spec_ = value; + } + onChanged(); + } else { + if (specCase_ == 6) { + mcpServerSpecBuilder_.mergeFrom(value); + } else { + mcpServerSpecBuilder_.setMessage(value); + } + } + specCase_ = 6; + return this; + } + + /** + * + * + *
+     * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+     * type of the service is MCP Server.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMcpServerSpec() { + if (mcpServerSpecBuilder_ == null) { + if (specCase_ == 6) { + specCase_ = 0; + spec_ = null; + onChanged(); + } + } else { + if (specCase_ == 6) { + specCase_ = 0; + spec_ = null; + } + mcpServerSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+     * type of the service is MCP Server.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.agentregistry.v1.Service.McpServerSpec.Builder + getMcpServerSpecBuilder() { + return internalGetMcpServerSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+     * type of the service is MCP Server.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.McpServerSpecOrBuilder + getMcpServerSpecOrBuilder() { + if ((specCase_ == 6) && (mcpServerSpecBuilder_ != null)) { + return mcpServerSpecBuilder_.getMessageOrBuilder(); + } else { + if (specCase_ == 6) { + return (com.google.cloud.agentregistry.v1.Service.McpServerSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+     * type of the service is MCP Server.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service.McpServerSpec, + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Builder, + com.google.cloud.agentregistry.v1.Service.McpServerSpecOrBuilder> + internalGetMcpServerSpecFieldBuilder() { + if (mcpServerSpecBuilder_ == null) { + if (!(specCase_ == 6)) { + spec_ = com.google.cloud.agentregistry.v1.Service.McpServerSpec.getDefaultInstance(); + } + mcpServerSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service.McpServerSpec, + com.google.cloud.agentregistry.v1.Service.McpServerSpec.Builder, + com.google.cloud.agentregistry.v1.Service.McpServerSpecOrBuilder>( + (com.google.cloud.agentregistry.v1.Service.McpServerSpec) spec_, + getParentForChildren(), + isClean()); + spec_ = null; + } + specCase_ = 6; + onChanged(); + return mcpServerSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service.EndpointSpec, + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Builder, + com.google.cloud.agentregistry.v1.Service.EndpointSpecOrBuilder> + endpointSpecBuilder_; + + /** + * + * + *
+     * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+     * of the service is Endpoint.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endpointSpec field is set. + */ + @java.lang.Override + public boolean hasEndpointSpec() { + return specCase_ == 7; + } + + /** + * + * + *
+     * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+     * of the service is Endpoint.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endpointSpec. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.EndpointSpec getEndpointSpec() { + if (endpointSpecBuilder_ == null) { + if (specCase_ == 7) { + return (com.google.cloud.agentregistry.v1.Service.EndpointSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDefaultInstance(); + } else { + if (specCase_ == 7) { + return endpointSpecBuilder_.getMessage(); + } + return com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+     * of the service is Endpoint.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndpointSpec(com.google.cloud.agentregistry.v1.Service.EndpointSpec value) { + if (endpointSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spec_ = value; + onChanged(); + } else { + endpointSpecBuilder_.setMessage(value); + } + specCase_ = 7; + return this; + } + + /** + * + * + *
+     * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+     * of the service is Endpoint.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndpointSpec( + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Builder builderForValue) { + if (endpointSpecBuilder_ == null) { + spec_ = builderForValue.build(); + onChanged(); + } else { + endpointSpecBuilder_.setMessage(builderForValue.build()); + } + specCase_ = 7; + return this; + } + + /** + * + * + *
+     * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+     * of the service is Endpoint.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEndpointSpec(com.google.cloud.agentregistry.v1.Service.EndpointSpec value) { + if (endpointSpecBuilder_ == null) { + if (specCase_ == 7 + && spec_ + != com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDefaultInstance()) { + spec_ = + com.google.cloud.agentregistry.v1.Service.EndpointSpec.newBuilder( + (com.google.cloud.agentregistry.v1.Service.EndpointSpec) spec_) + .mergeFrom(value) + .buildPartial(); + } else { + spec_ = value; + } + onChanged(); + } else { + if (specCase_ == 7) { + endpointSpecBuilder_.mergeFrom(value); + } else { + endpointSpecBuilder_.setMessage(value); + } + } + specCase_ = 7; + return this; + } + + /** + * + * + *
+     * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+     * of the service is Endpoint.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEndpointSpec() { + if (endpointSpecBuilder_ == null) { + if (specCase_ == 7) { + specCase_ = 0; + spec_ = null; + onChanged(); + } + } else { + if (specCase_ == 7) { + specCase_ = 0; + spec_ = null; + } + endpointSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+     * of the service is Endpoint.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.agentregistry.v1.Service.EndpointSpec.Builder getEndpointSpecBuilder() { + return internalGetEndpointSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+     * of the service is Endpoint.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service.EndpointSpecOrBuilder + getEndpointSpecOrBuilder() { + if ((specCase_ == 7) && (endpointSpecBuilder_ != null)) { + return endpointSpecBuilder_.getMessageOrBuilder(); + } else { + if (specCase_ == 7) { + return (com.google.cloud.agentregistry.v1.Service.EndpointSpec) spec_; + } + return com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+     * of the service is Endpoint.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service.EndpointSpec, + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Builder, + com.google.cloud.agentregistry.v1.Service.EndpointSpecOrBuilder> + internalGetEndpointSpecFieldBuilder() { + if (endpointSpecBuilder_ == null) { + if (!(specCase_ == 7)) { + spec_ = com.google.cloud.agentregistry.v1.Service.EndpointSpec.getDefaultInstance(); + } + endpointSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service.EndpointSpec, + com.google.cloud.agentregistry.v1.Service.EndpointSpec.Builder, + com.google.cloud.agentregistry.v1.Service.EndpointSpecOrBuilder>( + (com.google.cloud.agentregistry.v1.Service.EndpointSpec) spec_, + getParentForChildren(), + isClean()); + spec_ = null; + } + specCase_ = 7; + onChanged(); + return endpointSpecBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the Service.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. User-defined display name for the Service.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. User-defined display name for the Service.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. User-defined display name for the Service.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined display name for the Service.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined display name for the Service.
+     * Can have a maximum length of `63` characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. User-defined description of an Service.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. User-defined description of an Service.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. User-defined description of an Service.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined description of an Service.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined description of an Service.
+     * Can have a maximum length of `2048` characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List interfaces_ = + java.util.Collections.emptyList(); + + private void ensureInterfacesIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + interfaces_ = + new java.util.ArrayList(interfaces_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder> + interfacesBuilder_; + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getInterfacesList() { + if (interfacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(interfaces_); + } else { + return interfacesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getInterfacesCount() { + if (interfacesBuilder_ == null) { + return interfaces_.size(); + } else { + return interfacesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.agentregistry.v1.Interface getInterfaces(int index) { + if (interfacesBuilder_ == null) { + return interfaces_.get(index); + } else { + return interfacesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInterfaces(int index, com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.set(index, value); + onChanged(); + } else { + interfacesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInterfaces( + int index, com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.set(index, builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInterfaces(com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.add(value); + onChanged(); + } else { + interfacesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInterfaces(int index, com.google.cloud.agentregistry.v1.Interface value) { + if (interfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfacesIsMutable(); + interfaces_.add(index, value); + onChanged(); + } else { + interfacesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInterfaces( + com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInterfaces( + int index, com.google.cloud.agentregistry.v1.Interface.Builder builderForValue) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(index, builderForValue.build()); + onChanged(); + } else { + interfacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllInterfaces( + java.lang.Iterable values) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, interfaces_); + onChanged(); + } else { + interfacesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInterfaces() { + if (interfacesBuilder_ == null) { + interfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + interfacesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeInterfaces(int index) { + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.remove(index); + onChanged(); + } else { + interfacesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder getInterfacesBuilder(int index) { + return internalGetInterfacesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index) { + if (interfacesBuilder_ == null) { + return interfaces_.get(index); + } else { + return interfacesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInterfacesOrBuilderList() { + if (interfacesBuilder_ != null) { + return interfacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(interfaces_); + } + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder addInterfacesBuilder() { + return internalGetInterfacesFieldBuilder() + .addBuilder(com.google.cloud.agentregistry.v1.Interface.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.agentregistry.v1.Interface.Builder addInterfacesBuilder(int index) { + return internalGetInterfacesFieldBuilder() + .addBuilder(index, com.google.cloud.agentregistry.v1.Interface.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The connection details for the Service.
+     * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInterfacesBuilderList() { + return internalGetInterfacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder> + internalGetInterfacesFieldBuilder() { + if (interfacesBuilder_ == null) { + interfacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.agentregistry.v1.Interface, + com.google.cloud.agentregistry.v1.Interface.Builder, + com.google.cloud.agentregistry.v1.InterfaceOrBuilder>( + interfaces_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + interfaces_ = null; + } + return interfacesBuilder_; + } + + private java.lang.Object registryResource_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the resulting Agent, MCP Server, or
+     * Endpoint. Format:
+     *
+     * * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
+     * * `projects/{project}/locations/{location}/agents/{agent}`
+     * * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string registry_resource = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The registryResource. + */ + public java.lang.String getRegistryResource() { + java.lang.Object ref = registryResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + registryResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the resulting Agent, MCP Server, or
+     * Endpoint. Format:
+     *
+     * * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
+     * * `projects/{project}/locations/{location}/agents/{agent}`
+     * * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string registry_resource = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for registryResource. + */ + public com.google.protobuf.ByteString getRegistryResourceBytes() { + java.lang.Object ref = registryResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the resulting Agent, MCP Server, or
+     * Endpoint. Format:
+     *
+     * * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
+     * * `projects/{project}/locations/{location}/agents/{agent}`
+     * * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string registry_resource = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The registryResource to set. + * @return This builder for chaining. + */ + public Builder setRegistryResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + registryResource_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the resulting Agent, MCP Server, or
+     * Endpoint. Format:
+     *
+     * * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
+     * * `projects/{project}/locations/{location}/agents/{agent}`
+     * * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string registry_resource = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRegistryResource() { + registryResource_ = getDefaultInstance().getRegistryResource(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the resulting Agent, MCP Server, or
+     * Endpoint. Format:
+     *
+     * * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
+     * * `projects/{project}/locations/{location}/agents/{agent}`
+     * * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+     * 
+ * + * string registry_resource = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for registryResource to set. + * @return This builder for chaining. + */ + public Builder setRegistryResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + registryResource_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Create time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.Service) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.Service) + private static final com.google.cloud.agentregistry.v1.Service DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.Service(); + } + + public static com.google.cloud.agentregistry.v1.Service getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Service 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.agentregistry.v1.Service getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceName.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceName.java new file mode 100644 index 000000000000..cf3232a7535f --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ServiceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SERVICE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/services/{service}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String service; + + @Deprecated + protected ServiceName() { + project = null; + location = null; + service = null; + } + + private ServiceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + service = Preconditions.checkNotNull(builder.getService()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getService() { + return service; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ServiceName of(String project, String location, String service) { + return newBuilder().setProject(project).setLocation(location).setService(service).build(); + } + + public static String format(String project, String location, String service) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setService(service) + .build() + .toString(); + } + + public static ServiceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SERVICE.validatedMatch( + formattedString, "ServiceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("service")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ServiceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SERVICE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (service != null) { + fieldMapBuilder.put("service", service); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SERVICE.instantiate( + "project", project, "location", location, "service", service); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ServiceName that = ((ServiceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.service, that.service); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(service); + return h; + } + + /** Builder for projects/{project}/locations/{location}/services/{service}. */ + public static class Builder { + private String project; + private String location; + private String service; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getService() { + return service; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setService(String service) { + this.service = service; + return this; + } + + private Builder(ServiceName serviceName) { + this.project = serviceName.project; + this.location = serviceName.location; + this.service = serviceName.service; + } + + public ServiceName build() { + return new ServiceName(this); + } + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceOrBuilder.java new file mode 100644 index 000000000000..5a798be532ee --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceOrBuilder.java @@ -0,0 +1,434 @@ +/* + * 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/agentregistry/v1/service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface ServiceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.Service) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+   * the service is Agent.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentSpec field is set. + */ + boolean hasAgentSpec(); + + /** + * + * + *
+   * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+   * the service is Agent.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentSpec. + */ + com.google.cloud.agentregistry.v1.Service.AgentSpec getAgentSpec(); + + /** + * + * + *
+   * Optional. The spec of the Agent. When `agent_spec` is set, the type of
+   * the service is Agent.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.AgentSpec agent_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.agentregistry.v1.Service.AgentSpecOrBuilder getAgentSpecOrBuilder(); + + /** + * + * + *
+   * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+   * type of the service is MCP Server.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mcpServerSpec field is set. + */ + boolean hasMcpServerSpec(); + + /** + * + * + *
+   * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+   * type of the service is MCP Server.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mcpServerSpec. + */ + com.google.cloud.agentregistry.v1.Service.McpServerSpec getMcpServerSpec(); + + /** + * + * + *
+   * Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the
+   * type of the service is MCP Server.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.McpServerSpec mcp_server_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.agentregistry.v1.Service.McpServerSpecOrBuilder getMcpServerSpecOrBuilder(); + + /** + * + * + *
+   * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+   * of the service is Endpoint.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endpointSpec field is set. + */ + boolean hasEndpointSpec(); + + /** + * + * + *
+   * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+   * of the service is Endpoint.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endpointSpec. + */ + com.google.cloud.agentregistry.v1.Service.EndpointSpec getEndpointSpec(); + + /** + * + * + *
+   * Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type
+   * of the service is Endpoint.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service.EndpointSpec endpoint_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.agentregistry.v1.Service.EndpointSpecOrBuilder getEndpointSpecOrBuilder(); + + /** + * + * + *
+   * Identifier. The resource name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the Service.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. User-defined display name for the Service.
+   * Can have a maximum length of `63` characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. User-defined display name for the Service.
+   * Can have a maximum length of `63` characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-defined description of an Service.
+   * Can have a maximum length of `2048` characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. User-defined description of an Service.
+   * Can have a maximum length of `2048` characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getInterfacesList(); + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.agentregistry.v1.Interface getInterfaces(int index); + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getInterfacesCount(); + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getInterfacesOrBuilderList(); + + /** + * + * + *
+   * Optional. The connection details for the Service.
+   * 
+ * + * + * repeated .google.cloud.agentregistry.v1.Interface interfaces = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.agentregistry.v1.InterfaceOrBuilder getInterfacesOrBuilder(int index); + + /** + * + * + *
+   * Output only. The resource name of the resulting Agent, MCP Server, or
+   * Endpoint. Format:
+   *
+   * * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
+   * * `projects/{project}/locations/{location}/agents/{agent}`
+   * * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * string registry_resource = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The registryResource. + */ + java.lang.String getRegistryResource(); + + /** + * + * + *
+   * Output only. The resource name of the resulting Agent, MCP Server, or
+   * Endpoint. Format:
+   *
+   * * `projects/{project}/locations/{location}/mcpServers/{mcp_server}`
+   * * `projects/{project}/locations/{location}/agents/{agent}`
+   * * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+   * 
+ * + * string registry_resource = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for registryResource. + */ + com.google.protobuf.ByteString getRegistryResourceBytes(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + com.google.cloud.agentregistry.v1.Service.SpecCase getSpecCase(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceProto.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceProto.java new file mode 100644 index 000000000000..653967bbadec --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/ServiceProto.java @@ -0,0 +1,191 @@ +/* + * 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/agentregistry/v1/service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public final class ServiceProto extends com.google.protobuf.GeneratedFile { + private ServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ServiceProto"); + } + + 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_agentregistry_v1_Service_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Service_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_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" + + "+google/cloud/agentregistry/v1/service." + + "proto\022\035google.cloud.agentregistry.v1\032\037go" + + "ogle/api/field_behavior.proto\032\031google/ap" + + "i/resource.proto\032.google/cloud/agentregi" + + "stry/v1/properties.proto\032\034google/protobu" + + "f/struct.proto\032\037google/protobuf/timestamp.proto\"\337\t\n" + + "\007Service\022K\n\n" + + "agent_spec\030\005 \001(\0132" + + "0.google.cloud.agentregistry.v1.Service.AgentSpecB\003\340A\001H\000\022T\n" + + "\017mcp_server_spec\030\006 \001(" + + "\01324.google.cloud.agentregistry.v1.Service.McpServerSpecB\003\340A\001H\000\022Q\n\r" + + "endpoint_spec\030\007" + + " \001(\01323.google.cloud.agentregistry.v1.Service.EndpointSpecB\003\340A\001H\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\001\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\001\022A\n\n" + + "interfaces\030\004 \003(\0132(." + + "google.cloud.agentregistry.v1.InterfaceB\003\340A\001\022\036\n" + + "\021registry_resource\030\n" + + " \001(\tB\003\340A\003\0224\n" + + "\013create_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\t" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032\303\001\n" + + "\tAgentSpec\022H\n" + + "\004type\030\001" + + " \001(\01625.google.cloud.agentregistry.v1.Service.AgentSpec.TypeB\003\340A\002\022-\n" + + "\007content\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\"=\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\013\n" + + "\007NO_SPEC\020\001\022\022\n" + + "\016A2A_AGENT_CARD\020\002\032\306\001\n\r" + + "McpServerSpec\022L\n" + + "\004type\030\001 \001(\01629.google.cloud.agentregis" + + "try.v1.Service.McpServerSpec.TypeB\003\340A\002\022-\n" + + "\007content\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\"8\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\013\n" + + "\007NO_SPEC\020\001\022\r\n" + + "\tTOOL_SPEC\020\002\032\265\001\n" + + "\014EndpointSpec\022K\n" + + "\004type\030\001" + + " \001(\01628.google.cloud.agentregistry.v1.Service.EndpointSpec.TypeB\003\340A\002\022-\n" + + "\007content\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\")\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\013\n" + + "\007NO_SPEC\020\001:x\352Au\n" + + "$agentregistry.googleapis.com/Service\022:projects/{project}/locations" + + "/{location}/services/{service}*\010services2\007serviceB\006\n" + + "\004specB\337\001\n" + + "!com.google.cloud.agentregistry.v1B\014ServiceProtoP\001ZGcloud.g" + + "oogle.com/go/agentregistry/apiv1/agentre" + + "gistrypb;agentregistrypb\252\002\035Google.Cloud." + + "AgentRegistry.V1\312\002\035Google\\Cloud\\AgentRegistry\\V1\352\002" + + " Google::Cloud::AgentRegistry::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.agentregistry.v1.PropertiesProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_agentregistry_v1_Service_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_agentregistry_v1_Service_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Service_descriptor, + new java.lang.String[] { + "AgentSpec", + "McpServerSpec", + "EndpointSpec", + "Name", + "DisplayName", + "Description", + "Interfaces", + "RegistryResource", + "CreateTime", + "UpdateTime", + "Spec", + }); + internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_descriptor = + internal_static_google_cloud_agentregistry_v1_Service_descriptor.getNestedType(0); + internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Service_AgentSpec_descriptor, + new java.lang.String[] { + "Type", "Content", + }); + internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_descriptor = + internal_static_google_cloud_agentregistry_v1_Service_descriptor.getNestedType(1); + internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Service_McpServerSpec_descriptor, + new java.lang.String[] { + "Type", "Content", + }); + internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_descriptor = + internal_static_google_cloud_agentregistry_v1_Service_descriptor.getNestedType(2); + internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_agentregistry_v1_Service_EndpointSpec_descriptor, + new java.lang.String[] { + "Type", "Content", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.agentregistry.v1.PropertiesProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateBindingRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateBindingRequest.java new file mode 100644 index 000000000000..fb82702704c3 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateBindingRequest.java @@ -0,0 +1,1359 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for updating a Binding
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.UpdateBindingRequest} + */ +@com.google.protobuf.Generated +public final class UpdateBindingRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.UpdateBindingRequest) + UpdateBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateBindingRequest"); + } + + // Use UpdateBindingRequest.newBuilder() to construct. + private UpdateBindingRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateBindingRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.UpdateBindingRequest.class, + com.google.cloud.agentregistry.v1.UpdateBindingRequest.Builder.class); + } + + private int bitField0_; + public static final int BINDING_FIELD_NUMBER = 1; + private com.google.cloud.agentregistry.v1.Binding binding_; + + /** + * + * + *
+   * Required. The Binding resource that is being updated.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the binding field is set. + */ + @java.lang.Override + public boolean hasBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The Binding resource that is being updated.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The binding. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Binding getBinding() { + return binding_ == null + ? com.google.cloud.agentregistry.v1.Binding.getDefaultInstance() + : binding_; + } + + /** + * + * + *
+   * Required. The Binding resource that is being updated.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingOrBuilder() { + return binding_ == null + ? com.google.cloud.agentregistry.v1.Binding.getDefaultInstance() + : binding_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Binding resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Binding resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Binding resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getBinding()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBinding()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + 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.agentregistry.v1.UpdateBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.UpdateBindingRequest other = + (com.google.cloud.agentregistry.v1.UpdateBindingRequest) obj; + + if (hasBinding() != other.hasBinding()) return false; + if (hasBinding()) { + if (!getBinding().equals(other.getBinding())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasBinding()) { + hash = (37 * hash) + BINDING_FIELD_NUMBER; + hash = (53 * hash) + getBinding().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.UpdateBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.UpdateBindingRequest 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.agentregistry.v1.UpdateBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.UpdateBindingRequest 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.agentregistry.v1.UpdateBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.UpdateBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.UpdateBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.UpdateBindingRequest 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.agentregistry.v1.UpdateBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.UpdateBindingRequest 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.agentregistry.v1.UpdateBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.UpdateBindingRequest 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.agentregistry.v1.UpdateBindingRequest 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; + } + + /** + * + * + *
+   * Message for updating a Binding
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.UpdateBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.UpdateBindingRequest) + com.google.cloud.agentregistry.v1.UpdateBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.UpdateBindingRequest.class, + com.google.cloud.agentregistry.v1.UpdateBindingRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.UpdateBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBindingFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + binding_ = null; + if (bindingBuilder_ != null) { + bindingBuilder_.dispose(); + bindingBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.UpdateBindingRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.UpdateBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.UpdateBindingRequest build() { + com.google.cloud.agentregistry.v1.UpdateBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.UpdateBindingRequest buildPartial() { + com.google.cloud.agentregistry.v1.UpdateBindingRequest result = + new com.google.cloud.agentregistry.v1.UpdateBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.UpdateBindingRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.binding_ = bindingBuilder_ == null ? binding_ : bindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.UpdateBindingRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.UpdateBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.UpdateBindingRequest other) { + if (other == com.google.cloud.agentregistry.v1.UpdateBindingRequest.getDefaultInstance()) + return this; + if (other.hasBinding()) { + mergeBinding(other.getBinding()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage(internalGetBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.cloud.agentregistry.v1.Binding binding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder> + bindingBuilder_; + + /** + * + * + *
+     * Required. The Binding resource that is being updated.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the binding field is set. + */ + public boolean hasBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The Binding resource that is being updated.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The binding. + */ + public com.google.cloud.agentregistry.v1.Binding getBinding() { + if (bindingBuilder_ == null) { + return binding_ == null + ? com.google.cloud.agentregistry.v1.Binding.getDefaultInstance() + : binding_; + } else { + return bindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Binding resource that is being updated.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBinding(com.google.cloud.agentregistry.v1.Binding value) { + if (bindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + binding_ = value; + } else { + bindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Binding resource that is being updated.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBinding(com.google.cloud.agentregistry.v1.Binding.Builder builderForValue) { + if (bindingBuilder_ == null) { + binding_ = builderForValue.build(); + } else { + bindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Binding resource that is being updated.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBinding(com.google.cloud.agentregistry.v1.Binding value) { + if (bindingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && binding_ != null + && binding_ != com.google.cloud.agentregistry.v1.Binding.getDefaultInstance()) { + getBindingBuilder().mergeFrom(value); + } else { + binding_ = value; + } + } else { + bindingBuilder_.mergeFrom(value); + } + if (binding_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Binding resource that is being updated.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBinding() { + bitField0_ = (bitField0_ & ~0x00000001); + binding_ = null; + if (bindingBuilder_ != null) { + bindingBuilder_.dispose(); + bindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Binding resource that is being updated.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Binding.Builder getBindingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Binding resource that is being updated.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingOrBuilder() { + if (bindingBuilder_ != null) { + return bindingBuilder_.getMessageOrBuilder(); + } else { + return binding_ == null + ? com.google.cloud.agentregistry.v1.Binding.getDefaultInstance() + : binding_; + } + } + + /** + * + * + *
+     * Required. The Binding resource that is being updated.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder> + internalGetBindingFieldBuilder() { + if (bindingBuilder_ == null) { + bindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Binding, + com.google.cloud.agentregistry.v1.Binding.Builder, + com.google.cloud.agentregistry.v1.BindingOrBuilder>( + getBinding(), getParentForChildren(), isClean()); + binding_ = null; + } + return bindingBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Binding resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Binding resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Binding resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Binding resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Binding resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Binding resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Binding resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Binding resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Binding resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.UpdateBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.UpdateBindingRequest) + private static final com.google.cloud.agentregistry.v1.UpdateBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.UpdateBindingRequest(); + } + + public static com.google.cloud.agentregistry.v1.UpdateBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateBindingRequest 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.agentregistry.v1.UpdateBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateBindingRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateBindingRequestOrBuilder.java new file mode 100644 index 000000000000..676bb14783a4 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateBindingRequestOrBuilder.java @@ -0,0 +1,180 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface UpdateBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.UpdateBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Binding resource that is being updated.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the binding field is set. + */ + boolean hasBinding(); + + /** + * + * + *
+   * Required. The Binding resource that is being updated.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The binding. + */ + com.google.cloud.agentregistry.v1.Binding getBinding(); + + /** + * + * + *
+   * Required. The Binding resource that is being updated.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Binding binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.agentregistry.v1.BindingOrBuilder getBindingOrBuilder(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Binding resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Binding resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Binding resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateServiceRequest.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateServiceRequest.java new file mode 100644 index 000000000000..dc9691604b24 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateServiceRequest.java @@ -0,0 +1,1371 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +/** + * + * + *
+ * Message for updating a Service
+ * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.UpdateServiceRequest} + */ +@com.google.protobuf.Generated +public final class UpdateServiceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.agentregistry.v1.UpdateServiceRequest) + UpdateServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateServiceRequest"); + } + + // Use UpdateServiceRequest.newBuilder() to construct. + private UpdateServiceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateServiceRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.UpdateServiceRequest.class, + com.google.cloud.agentregistry.v1.UpdateServiceRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Service resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Service resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Service resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SERVICE_FIELD_NUMBER = 2; + private com.google.cloud.agentregistry.v1.Service service_; + + /** + * + * + *
+   * Required. The Service resource that is being updated.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The Service resource that is being updated.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The service. + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.Service getService() { + return service_ == null + ? com.google.cloud.agentregistry.v1.Service.getDefaultInstance() + : service_; + } + + /** + * + * + *
+   * Required. The Service resource that is being updated.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.agentregistry.v1.ServiceOrBuilder getServiceOrBuilder() { + return service_ == null + ? com.google.cloud.agentregistry.v1.Service.getDefaultInstance() + : service_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getService()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getService()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + 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.agentregistry.v1.UpdateServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.agentregistry.v1.UpdateServiceRequest other = + (com.google.cloud.agentregistry.v1.UpdateServiceRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService().equals(other.getService())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.agentregistry.v1.UpdateServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.UpdateServiceRequest 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.agentregistry.v1.UpdateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.UpdateServiceRequest 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.agentregistry.v1.UpdateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.agentregistry.v1.UpdateServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.agentregistry.v1.UpdateServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.UpdateServiceRequest 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.agentregistry.v1.UpdateServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.UpdateServiceRequest 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.agentregistry.v1.UpdateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.agentregistry.v1.UpdateServiceRequest 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.agentregistry.v1.UpdateServiceRequest 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; + } + + /** + * + * + *
+   * Message for updating a Service
+   * 
+ * + * Protobuf type {@code google.cloud.agentregistry.v1.UpdateServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.agentregistry.v1.UpdateServiceRequest) + com.google.cloud.agentregistry.v1.UpdateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.agentregistry.v1.UpdateServiceRequest.class, + com.google.cloud.agentregistry.v1.UpdateServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.agentregistry.v1.UpdateServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetServiceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.agentregistry.v1.AgentRegistryServiceProto + .internal_static_google_cloud_agentregistry_v1_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.UpdateServiceRequest getDefaultInstanceForType() { + return com.google.cloud.agentregistry.v1.UpdateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.UpdateServiceRequest build() { + com.google.cloud.agentregistry.v1.UpdateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.agentregistry.v1.UpdateServiceRequest buildPartial() { + com.google.cloud.agentregistry.v1.UpdateServiceRequest result = + new com.google.cloud.agentregistry.v1.UpdateServiceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.agentregistry.v1.UpdateServiceRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.service_ = serviceBuilder_ == null ? service_ : serviceBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.agentregistry.v1.UpdateServiceRequest) { + return mergeFrom((com.google.cloud.agentregistry.v1.UpdateServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.agentregistry.v1.UpdateServiceRequest other) { + if (other == com.google.cloud.agentregistry.v1.UpdateServiceRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasService()) { + mergeService(other.getService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetServiceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Service resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Service resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Service resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Service resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Service resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Service resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Service resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Service resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Service resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.agentregistry.v1.Service service_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service, + com.google.cloud.agentregistry.v1.Service.Builder, + com.google.cloud.agentregistry.v1.ServiceOrBuilder> + serviceBuilder_; + + /** + * + * + *
+     * Required. The Service resource that is being updated.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the service field is set. + */ + public boolean hasService() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The Service resource that is being updated.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The service. + */ + public com.google.cloud.agentregistry.v1.Service getService() { + if (serviceBuilder_ == null) { + return service_ == null + ? com.google.cloud.agentregistry.v1.Service.getDefaultInstance() + : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Service resource that is being updated.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setService(com.google.cloud.agentregistry.v1.Service value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + } else { + serviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Service resource that is being updated.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setService(com.google.cloud.agentregistry.v1.Service.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Service resource that is being updated.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeService(com.google.cloud.agentregistry.v1.Service value) { + if (serviceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && service_ != null + && service_ != com.google.cloud.agentregistry.v1.Service.getDefaultInstance()) { + getServiceBuilder().mergeFrom(value); + } else { + service_ = value; + } + } else { + serviceBuilder_.mergeFrom(value); + } + if (service_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Service resource that is being updated.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000002); + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Service resource that is being updated.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.Service.Builder getServiceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetServiceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Service resource that is being updated.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.agentregistry.v1.ServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null + ? com.google.cloud.agentregistry.v1.Service.getDefaultInstance() + : service_; + } + } + + /** + * + * + *
+     * Required. The Service resource that is being updated.
+     * Format: `projects/{project}/locations/{location}/services/{service}`.
+     * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service, + com.google.cloud.agentregistry.v1.Service.Builder, + com.google.cloud.agentregistry.v1.ServiceOrBuilder> + internalGetServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.agentregistry.v1.Service, + com.google.cloud.agentregistry.v1.Service.Builder, + com.google.cloud.agentregistry.v1.ServiceOrBuilder>( + getService(), getParentForChildren(), isClean()); + service_ = null; + } + return serviceBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.agentregistry.v1.UpdateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.agentregistry.v1.UpdateServiceRequest) + private static final com.google.cloud.agentregistry.v1.UpdateServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.agentregistry.v1.UpdateServiceRequest(); + } + + public static com.google.cloud.agentregistry.v1.UpdateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateServiceRequest 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.agentregistry.v1.UpdateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateServiceRequestOrBuilder.java b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateServiceRequestOrBuilder.java new file mode 100644 index 000000000000..0adaac9ac5f5 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/java/com/google/cloud/agentregistry/v1/UpdateServiceRequestOrBuilder.java @@ -0,0 +1,183 @@ +/* + * 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/agentregistry/v1/agentregistry_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.agentregistry.v1; + +@com.google.protobuf.Generated +public interface UpdateServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.agentregistry.v1.UpdateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Service resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Service resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Service resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The Service resource that is being updated.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the service field is set. + */ + boolean hasService(); + + /** + * + * + *
+   * Required. The Service resource that is being updated.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The service. + */ + com.google.cloud.agentregistry.v1.Service getService(); + + /** + * + * + *
+   * Required. The Service resource that is being updated.
+   * Format: `projects/{project}/locations/{location}/services/{service}`.
+   * 
+ * + * + * .google.cloud.agentregistry.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.agentregistry.v1.ServiceOrBuilder getServiceOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agent.proto b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agent.proto new file mode 100644 index 000000000000..c5c3081f4562 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agent.proto @@ -0,0 +1,168 @@ +// 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.agentregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/agentregistry/v1/properties.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AgentRegistry.V1"; +option go_package = "cloud.google.com/go/agentregistry/apiv1/agentregistrypb;agentregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "AgentProto"; +option java_package = "com.google.cloud.agentregistry.v1"; +option php_namespace = "Google\\Cloud\\AgentRegistry\\V1"; +option ruby_package = "Google::Cloud::AgentRegistry::V1"; + +// Represents an Agent. +// "A2A" below refers to the Agent-to-Agent protocol. +message Agent { + option (google.api.resource) = { + type: "agentregistry.googleapis.com/Agent" + pattern: "projects/{project}/locations/{location}/agents/{agent}" + plural: "agents" + singular: "agent" + }; + + // Represents the protocol of an Agent. + message Protocol { + // The type of the protocol. + enum Type { + // Unspecified type. + TYPE_UNSPECIFIED = 0; + + // The interfaces point to an A2A Agent following the A2A + // specification. + A2A_AGENT = 1; + + // Agent does not follow any standard protocol. + CUSTOM = 2; + } + + // Output only. The type of the protocol. + Type type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The version of the protocol, for example, the A2A Agent Card + // version. + string protocol_version = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The connection details for the Agent. + repeated Interface interfaces = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Represents the skills of an Agent. + message Skill { + // Output only. A unique identifier for the agent's skill. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A human-readable name for the agent's skill. + string name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A more detailed description of the skill. + string description = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Keywords describing the skill. + repeated string tags = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Example prompts or scenarios this skill can handle. + repeated string examples = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Full Agent Card payload, often obtained from the A2A Agent Card. + message Card { + // Represents the type of the agent card. + enum Type { + // Unspecified type. + TYPE_UNSPECIFIED = 0; + + // Indicates that the card is an A2A Agent Card. + A2A_AGENT_CARD = 1; + } + + // Output only. The type of agent card. + Type type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The content of the agent card. + google.protobuf.Struct content = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Identifier. The resource name of an Agent. + // Format: `projects/{project}/locations/{location}/agents/{agent}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. A stable, globally unique identifier for agents. + string agent_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location where agent is hosted. The value is defined by + // the hosting environment (i.e. cloud provider). + string location = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name of the agent, often obtained from the A2A + // Agent Card. + string display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of the Agent, often obtained from the A2A + // Agent Card. Empty if Agent Card has no description. + string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The version of the Agent, often obtained from the A2A Agent + // Card. Empty if Agent Card has no version or agent is not an A2A Agent. + string version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The connection details for the Agent. + repeated Protocol protocols = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Skills the agent possesses, often obtained from the A2A Agent + // Card. + repeated Skill skills = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A universally unique identifier for the Agent. + string uid = 10 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. Create time. + google.protobuf.Timestamp create_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update time. + google.protobuf.Timestamp update_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Attributes of the Agent. + // Valid values: + // + // * `agentregistry.googleapis.com/system/Framework`: {"framework": + // "google-adk"} - the agent framework used to develop the Agent. Example + // values: "google-adk", "langchain", "custom". + // * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal": + // "principal://..."} - the runtime identity associated with the Agent. + // * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."} + // - the URI of the underlying resource hosting the Agent, for + // example, the Reasoning Engine URI. + map attributes = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Full Agent Card payload, when available. + Card card = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agentregistry_service.proto b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agentregistry_service.proto new file mode 100644 index 000000000000..682a95bf32a1 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/agentregistry_service.proto @@ -0,0 +1,934 @@ +// 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.agentregistry.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/agentregistry/v1/agent.proto"; +import "google/cloud/agentregistry/v1/binding.proto"; +import "google/cloud/agentregistry/v1/endpoint.proto"; +import "google/cloud/agentregistry/v1/mcp_server.proto"; +import "google/cloud/agentregistry/v1/service.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AgentRegistry.V1"; +option go_package = "cloud.google.com/go/agentregistry/apiv1/agentregistrypb;agentregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "AgentRegistryServiceProto"; +option java_package = "com.google.cloud.agentregistry.v1"; +option php_namespace = "Google\\Cloud\\AgentRegistry\\V1"; +option ruby_package = "Google::Cloud::AgentRegistry::V1"; + +// Service for managing Agents, Endpoints, McpServers, Services, and Bindings. +service AgentRegistry { + option (google.api.default_host) = "agentregistry.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"; + + // Lists Agents in a given project and location. + rpc ListAgents(ListAgentsRequest) returns (ListAgentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/agents" + }; + option (google.api.method_signature) = "parent"; + } + + // Searches Agents in a given project and location. + rpc SearchAgents(SearchAgentsRequest) returns (SearchAgentsResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/agents:search" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Agent. + rpc GetAgent(GetAgentRequest) returns (Agent) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/agents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Endpoints in a given project and location. + rpc ListEndpoints(ListEndpointsRequest) returns (ListEndpointsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/endpoints" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Endpoint. + rpc GetEndpoint(GetEndpointRequest) returns (Endpoint) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/endpoints/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists McpServers in a given project and location. + rpc ListMcpServers(ListMcpServersRequest) returns (ListMcpServersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/mcpServers" + }; + option (google.api.method_signature) = "parent"; + } + + // Searches McpServers in a given project and location. + rpc SearchMcpServers(SearchMcpServersRequest) + returns (SearchMcpServersResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/mcpServers:search" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single McpServer. + rpc GetMcpServer(GetMcpServerRequest) returns (McpServer) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/mcpServers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Services in a given project and location. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/services" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Service. + rpc GetService(GetServiceRequest) returns (Service) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/services/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Service in a given project and location. + rpc CreateService(CreateServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/services" + body: "service" + }; + option (google.api.method_signature) = "parent,service,service_id"; + option (google.longrunning.operation_info) = { + response_type: "Service" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Service. + rpc UpdateService(UpdateServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{service.name=projects/*/locations/*/services/*}" + body: "service" + }; + option (google.api.method_signature) = "service,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Service" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Service. + rpc DeleteService(DeleteServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/services/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Bindings in a given project and location. + rpc ListBindings(ListBindingsRequest) returns (ListBindingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/bindings" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Binding. + rpc GetBinding(GetBindingRequest) returns (Binding) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/bindings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Binding in a given project and location. + rpc CreateBinding(CreateBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/bindings" + body: "binding" + }; + option (google.api.method_signature) = "parent,binding,binding_id"; + option (google.longrunning.operation_info) = { + response_type: "Binding" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Binding. + rpc UpdateBinding(UpdateBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{binding.name=projects/*/locations/*/bindings/*}" + body: "binding" + }; + option (google.api.method_signature) = "binding,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Binding" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Binding. + rpc DeleteBinding(DeleteBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/bindings/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Fetches available Bindings. + rpc FetchAvailableBindings(FetchAvailableBindingsRequest) + returns (FetchAvailableBindingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/bindings:fetchAvailable" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Message for requesting list of Agents +message ListAgentsRequest { + // Required. Parent value for ListAgentsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/Agent" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Agents +message ListAgentsResponse { + // The list of Agents. + repeated Agent agents = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// Message for searching Agents +message SearchAgentsRequest { + // Required. Parent value for SearchAgentsRequest. Format: + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/Agent" + } + ]; + + // Optional. Search criteria used to select the Agents to return. If no search + // criteria is specified then all accessible Agents will be returned. + // + // Search expressions can be used to restrict results based upon searchable + // fields, where the operators can be used along with the suffix wildcard + // symbol `*`. See + // [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools) + // for more details. + // + // Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`. + // + // Searchable fields: + // + // | Field | `=` | `:` | `*` | Keyword Search | + // |--------------------|-----|-----|-----|----------------| + // | agentId | Yes | Yes | Yes | Included | + // | name | No | Yes | Yes | Included | + // | displayName | No | Yes | Yes | Included | + // | description | No | Yes | No | Included | + // | skills | No | Yes | No | Included | + // | skills.id | No | Yes | No | Included | + // | skills.name | No | Yes | No | Included | + // | skills.description | No | Yes | No | Included | + // | skills.tags | No | Yes | No | Included | + // | skills.examples | No | Yes | No | Included | + // + // Examples: + // + // * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"` + // to find the agent with the specified agent ID. + // * `name:important` to find agents whose name contains `important` as a + // word. + // * `displayName:works*` to find agents whose display name contains words + // that start with `works`. + // * `skills.tags:test` to find agents whose skills tags contain `test`. + // * `planner OR booking` to find agents whose metadata contains the words + // `planner` or `booking`. + string search_string = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of search results to return per page. The page + // size is capped at `100`, even if a larger value is specified. A negative + // value will result in an `INVALID_ARGUMENT` error. If unspecified or set to + // `0`, a default value of `20` will be used. The server may return fewer + // results than requested. + int32 page_size = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, retrieve the next batch of results from the preceding + // call to this method. `page_token` must be the value of `next_page_token` + // from the previous response. The values of all other method parameters, must + // be identical to those in the previous call. + string page_token = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to searching Agents +message SearchAgentsResponse { + // A list of Agents that match the `search_string`. + repeated Agent agents = 1; + + // If there are more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; +} + +// Message for getting a Agent +message GetAgentRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "agentregistry.googleapis.com/Agent" + } + ]; +} + +// Message for requesting list of Endpoints +message ListEndpointsRequest { + // Required. The project and location to list endpoints in. + // Expected format: `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/Endpoint" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A query string used to filter the list of endpoints returned. + // The filter expression must follow AIP-160 syntax. + // + // Filtering is supported on the `name`, `display_name`, `description`, + // `version`, and `interfaces` fields. + // + // Some examples: + // + // * `name = "projects/p1/locations/l1/endpoints/e1"` + // * `display_name = "my-endpoint"` + // * `description = "my-endpoint-description"` + // * `version = "v1"` + // * `interfaces.transport = "HTTP_JSON"` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Endpoints +message ListEndpointsResponse { + // The list of Endpoint resources matching the parent and filter criteria in + // the request. Each Endpoint resource follows the format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}`. + repeated Endpoint endpoints = 1; + + // A token identifying a page of results the server should return. + // Used in + // [page_token][google.cloud.agentregistry.v1main.ListEndpointsRequest.page_token]. + string next_page_token = 2; +} + +// Message for getting a Endpoint +message GetEndpointRequest { + // Required. The name of the endpoint to retrieve. + // Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "agentregistry.googleapis.com/Endpoint" + } + ]; +} + +// Message for requesting list of McpServers +message ListMcpServersRequest { + // Required. Parent value for ListMcpServersRequest. Format: + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/McpServer" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing McpServers +message ListMcpServersResponse { + // The list of McpServers. + repeated McpServer mcp_servers = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// Message for searching MCP Servers +message SearchMcpServersRequest { + // Required. Parent value for SearchMcpServersRequest. Format: + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/McpServer" + } + ]; + + // Optional. Search criteria used to select the MCP Servers to return. If no + // search criteria is specified then all accessible MCP Servers will be + // returned. + // + // Search expressions can be used to restrict results based upon searchable + // fields, where the operators can be used along with the suffix wildcard + // symbol `*`. See + // [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools) + // for more details. + // + // Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`. + // + // Searchable fields: + // + // | Field | `=` | `:` | `*` | Keyword Search | + // |--------------------|-----|-----|-----|----------------| + // | mcpServerId | Yes | Yes | Yes | Included | + // | name | No | Yes | Yes | Included | + // | displayName | No | Yes | Yes | Included | + // + // Examples: + // + // * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"` + // to find the MCP Server with the specified MCP Server ID. + // * `name:important` to find MCP Servers whose name contains `important` as a + // word. + // * `displayName:works*` to find MCP Servers whose display name contains + // words that start with `works`. + // * `planner OR booking` to find MCP Servers whose metadata contains the + // words `planner` or `booking`. + // * `mcpServerId:service-id AND (displayName:planner OR + // displayName:booking)` to find MCP Servers whose MCP Server ID contains + // `service-id` and whose display name contains `planner` or + // `booking`. + string search_string = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of search results to return per page. The page + // size is capped at `100`, even if a larger value is specified. A negative + // value will result in an `INVALID_ARGUMENT` error. If unspecified or set to + // `0`, a default value of `20` will be used. The server may return fewer + // results than requested. + int32 page_size = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, retrieve the next batch of results from the preceding + // call to this method. `page_token` must be the value of `next_page_token` + // from the previous response. The values of all other method parameters, must + // be identical to those in the previous call. + string page_token = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to searching MCP Servers +message SearchMcpServersResponse { + // A list of McpServers that match the `search_string`. + repeated McpServer mcp_servers = 1; + + // If there are more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; +} + +// Message for getting a McpServer +message GetMcpServerRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "agentregistry.googleapis.com/McpServer" + } + ]; +} + +// Message for requesting list of Services +message ListServicesRequest { + // Required. The project and location to list services in. + // Expected format: `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/Service" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A query string used to filter the list of services returned. + // The filter expression must follow AIP-160 syntax. + // + // Filtering is supported on the `name`, `display_name`, `description`, + // and `labels` fields. + // + // Some examples: + // + // * `name = "projects/p1/locations/l1/services/s1"` + // * `display_name = "my-service"` + // * `description : "myservice description"` + // * `labels.env = "prod"` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Services +message ListServicesResponse { + // The list of Service resources matching the parent and filter criteria in + // the request. Each Service resource follows the format: + // `projects/{project}/locations/{location}/services/{service}`. + repeated Service services = 1; + + // A token identifying a page of results the server should return. + // Used in + // [page_token][google.cloud.agentregistry.v1main.ListServicesRequest.page_token]. + string next_page_token = 2; +} + +// Message for getting a Service +message GetServiceRequest { + // Required. The name of the Service. + // Format: `projects/{project}/locations/{location}/services/{service}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "agentregistry.googleapis.com/Service" + } + ]; +} + +// Message for creating a Service +message CreateServiceRequest { + // Required. The project and location to create the Service in. + // Expected format: `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/Service" + } + ]; + + // Required. The ID to use for the service, which will become the final + // component of the service's resource name. + // + // This value should be 4-63 characters, and valid characters + // are `/[a-z][0-9]-/`. + string service_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Service resource that is being created. + // Format: `projects/{project}/locations/{location}/services/{service}`. + Service service = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for fetching available Bindings. +message FetchAvailableBindingsRequest { + // The reference of the source Agent. + oneof source { + // The identifier of the source Agent. + // Format: + // + // * `urn:agent:{publisher}:{namespace}:{name}` + string source_identifier = 2; + } + + // The reference of the target Agent Registry resource. + oneof target { + // Optional. The identifier of the target Agent, MCP Server, or Endpoint. + // Format: + // + // * `urn:agent:{publisher}:{namespace}:{name}` + // * `urn:mcp:{publisher}:{namespace}:{name}` + // * `urn:endpoint:{publisher}:{namespace}:{name}` + string target_identifier = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The parent, in the format + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/Binding" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. Page size is 500 if unspecified and is capped at `500` even if a + // larger value is given. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to fetching available Bindings. +message FetchAvailableBindingsResponse { + // The list of Bindings. + repeated Binding bindings = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// Message for updating a Service +message UpdateServiceRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Service resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields present in the request will be + // overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The Service resource that is being updated. + // Format: `projects/{project}/locations/{location}/services/{service}`. + Service service = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Service +message DeleteServiceRequest { + // Required. The name of the Service. + // Format: `projects/{project}/locations/{location}/services/{service}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "agentregistry.googleapis.com/Service" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for requesting a list of Bindings. +message ListBindingsRequest { + // Required. The project and location to list bindings in. + // Expected format: `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/Binding" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. Page size is 500 if unspecified and is capped at `500` even if a + // larger value is given. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A query string used to filter the list of bindings returned. + // The filter expression must follow AIP-160 syntax. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Bindings +message ListBindingsResponse { + // The list of Binding resources matching the parent and filter criteria in + // the request. Each Binding resource follows the format: + // `projects/{project}/locations/{location}/bindings/{binding}`. + repeated Binding bindings = 1; + + // A token identifying a page of results the server should return. + // Used in + // [page_token][google.cloud.agentregistry.v1main.ListBindingsRequest.page_token]. + string next_page_token = 2; +} + +// Message for getting a Binding +message GetBindingRequest { + // Required. The name of the Binding. + // Format: `projects/{project}/locations/{location}/bindings/{binding}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "agentregistry.googleapis.com/Binding" + } + ]; +} + +// Message for creating a Binding +message CreateBindingRequest { + // Required. The project and location to create the Binding in. + // Expected format: `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "agentregistry.googleapis.com/Binding" + } + ]; + + // Required. The ID to use for the binding, which will become the final + // component of the binding's resource name. + // + // This value should be 4-63 characters, and must conform to RFC-1034. + // Specifically, it must match the regular expression + // `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + string binding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Binding resource that is being created. + Binding binding = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a Binding +message UpdateBindingRequest { + // Required. The Binding resource that is being updated. + Binding binding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field mask is used to specify the fields to be overwritten in the + // Binding resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields present in the request will be + // overwritten. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Binding +message DeleteBindingRequest { + // Required. The name of the Binding. + // Format: `projects/{project}/locations/{location}/bindings/{binding}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "agentregistry.googleapis.com/Binding" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/binding.proto b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/binding.proto new file mode 100644 index 000000000000..6a9ce81c3313 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/binding.proto @@ -0,0 +1,120 @@ +// 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.agentregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AgentRegistry.V1"; +option go_package = "cloud.google.com/go/agentregistry/apiv1/agentregistrypb;agentregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "BindingProto"; +option java_package = "com.google.cloud.agentregistry.v1"; +option php_namespace = "Google\\Cloud\\AgentRegistry\\V1"; +option ruby_package = "Google::Cloud::AgentRegistry::V1"; + +// Represents a user-defined Binding. +message Binding { + option (google.api.resource) = { + type: "agentregistry.googleapis.com/Binding" + pattern: "projects/{project}/locations/{location}/bindings/{binding}" + plural: "bindings" + singular: "binding" + }; + + // The source of the Binding. + message Source { + // The type of the source, currently only supports Agents. + // Potential future fields include 'tag', etc. + oneof source_type { + // The identifier of the source Agent. + // Format: + // + // * `urn:agent:{publisher}:{namespace}:{name}` + string identifier = 1; + } + } + + // The target of the Binding. + message Target { + // The type of the target, currently only supports an AgentRegistry + // Resource. + // Potential future fields include 'tag', etc. + oneof target_type { + // The identifier of the target Agent, MCP Server, or Endpoint. + // Format: + // + // * `urn:agent:{publisher}:{namespace}:{name}` + // * `urn:mcp:{publisher}:{namespace}:{name}` + // * `urn:endpoint:{publisher}:{namespace}:{name}` + string identifier = 1; + } + } + + // The AuthProvider of the Binding. + message AuthProviderBinding { + // Required. The resource name of the target AuthProvider. + // Format: + // + // * `projects/{project}/locations/{location}/authProviders/{auth_provider}` + string auth_provider = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of OAuth2 scopes of the AuthProvider. + repeated string scopes = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The continue URI of the AuthProvider. + // The URI is used to reauthenticate the user and finalize the managed OAuth + // flow. + string continue_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // The configuration for the Binding. + oneof binding { + // The binding for AuthProvider. + AuthProviderBinding auth_provider_binding = 6; + } + + // Required. Identifier. The resource name of the Binding. + // Format: `projects/{project}/locations/{location}/bindings/{binding}`. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = REQUIRED + ]; + + // Optional. User-defined display name for the Binding. + // Can have a maximum length of `63` characters. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined description of a Binding. + // Can have a maximum length of `2048` characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The target Agent of the Binding. + Source source = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The target Agent Registry Resource of the Binding. + Target target = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Timestamp when this binding was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this binding was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/endpoint.proto b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/endpoint.proto new file mode 100644 index 000000000000..29978c2197e4 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/endpoint.proto @@ -0,0 +1,75 @@ +// 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.agentregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/agentregistry/v1/properties.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AgentRegistry.V1"; +option go_package = "cloud.google.com/go/agentregistry/apiv1/agentregistrypb;agentregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "EndpointProto"; +option java_package = "com.google.cloud.agentregistry.v1"; +option php_namespace = "Google\\Cloud\\AgentRegistry\\V1"; +option ruby_package = "Google::Cloud::AgentRegistry::V1"; + +// Represents an Endpoint. +message Endpoint { + option (google.api.resource) = { + type: "agentregistry.googleapis.com/Endpoint" + pattern: "projects/{project}/locations/{location}/endpoints/{endpoint}" + plural: "endpoints" + singular: "endpoint" + }; + + // Identifier. The resource name of the Endpoint. + // Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. A stable, globally unique identifier for Endpoint. + string endpoint_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Display name for the Endpoint. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of an Endpoint. + string description = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The connection details for the Endpoint. + repeated Interface interfaces = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Create time. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update time. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Attributes of the Endpoint. + // + // Valid values: + // + // * `agentregistry.googleapis.com/system/RuntimeReference`: + // {"uri": "//..."} - the URI of the underlying resource hosting the + // Endpoint, for example, the GKE Deployment. + map attributes = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/mcp_server.proto b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/mcp_server.proto new file mode 100644 index 000000000000..dfea8e01504d --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/mcp_server.proto @@ -0,0 +1,120 @@ +// 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.agentregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/agentregistry/v1/properties.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AgentRegistry.V1"; +option go_package = "cloud.google.com/go/agentregistry/apiv1/agentregistrypb;agentregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "McpServerProto"; +option java_package = "com.google.cloud.agentregistry.v1"; +option php_namespace = "Google\\Cloud\\AgentRegistry\\V1"; +option ruby_package = "Google::Cloud::AgentRegistry::V1"; + +// Represents an MCP (Model Context Protocol) Server. +message McpServer { + option (google.api.resource) = { + type: "agentregistry.googleapis.com/McpServer" + pattern: "projects/{project}/locations/{location}/mcpServers/{mcp_server}" + plural: "mcpServers" + singular: "mcpServer" + }; + + // Represents a single tool provided by an MCP Server. + message Tool { + // Annotations describing the characteristics and behavior of a tool or + // operation. + message Annotations { + // Output only. A human-readable title for the tool. + string title = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If true, the tool may perform destructive updates to its + // environment. If false, the tool performs only additive updates. NOTE: + // This property is meaningful only when `read_only_hint == false` + // Default: true + bool destructive_hint = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If true, calling the tool repeatedly with the same + // arguments will have no additional effect on its environment. NOTE: This + // property is meaningful only when `read_only_hint == false` Default: + // false + bool idempotent_hint = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If true, this tool may interact with an "open world" of + // external entities. If false, the tool's domain of interaction is + // closed. For example, the world of a web search tool is open, whereas + // that of a memory tool is not. Default: true + bool open_world_hint = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If true, the tool does not modify its environment. + // Default: false + bool read_only_hint = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Human-readable name of the tool. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of what the tool does. + string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Annotations associated with the tool. + Annotations annotations = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Identifier. The resource name of the MCP Server. + // Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. A stable, globally unique identifier for MCP Servers. + string mcp_server_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name of the MCP Server. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description of the MCP Server. + string description = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The connection details for the MCP Server. + repeated Interface interfaces = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Tools provided by the MCP Server. + repeated Tool tools = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update time. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Attributes of the MCP Server. + // Valid values: + // + // * `agentregistry.googleapis.com/system/RuntimeIdentity`: {"principal": + // "principal://..."} - the runtime identity associated with the MCP Server. + // * `agentregistry.googleapis.com/system/RuntimeReference`: {"uri": "//..."} + // - the URI of the underlying resource hosting the MCP Server, for + // example, the GKE Deployment. + map attributes = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/properties.proto b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/properties.proto new file mode 100644 index 000000000000..86a0f1c10467 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/properties.proto @@ -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 +// +// 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.agentregistry.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.AgentRegistry.V1"; +option go_package = "cloud.google.com/go/agentregistry/apiv1/agentregistrypb;agentregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "PropertiesProto"; +option java_package = "com.google.cloud.agentregistry.v1"; +option php_namespace = "Google\\Cloud\\AgentRegistry\\V1"; +option ruby_package = "Google::Cloud::AgentRegistry::V1"; + +// Represents the connection details for an Agent or MCP Server. +message Interface { + // The protocol binding of the interface. + enum ProtocolBinding { + // Unspecified transport protocol. + PROTOCOL_BINDING_UNSPECIFIED = 0; + + // JSON-RPC specification. + JSONRPC = 1; + + // gRPC specification. + GRPC = 2; + + // HTTP+JSON specification. + HTTP_JSON = 3; + } + + // Required. The destination URL. + string url = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The protocol binding of the interface. + ProtocolBinding protocol_binding = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/service.proto b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/service.proto new file mode 100644 index 000000000000..174bd716cda9 --- /dev/null +++ b/java-agentregistry/proto-google-cloud-agentregistry-v1/src/main/proto/google/cloud/agentregistry/v1/service.proto @@ -0,0 +1,154 @@ +// 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.agentregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/agentregistry/v1/properties.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AgentRegistry.V1"; +option go_package = "cloud.google.com/go/agentregistry/apiv1/agentregistrypb;agentregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.agentregistry.v1"; +option php_namespace = "Google\\Cloud\\AgentRegistry\\V1"; +option ruby_package = "Google::Cloud::AgentRegistry::V1"; + +// Represents a user-defined Service. +message Service { + option (google.api.resource) = { + type: "agentregistry.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/services/{service}" + plural: "services" + singular: "service" + }; + + // The spec of the agent. + message AgentSpec { + // The type of the agent spec. + enum Type { + // Unspecified type. + TYPE_UNSPECIFIED = 0; + + // There is no spec for the Agent. The `content` field must be empty. + NO_SPEC = 1; + + // The content is an A2A Agent Card following the A2A specification. + // The `interfaces` field must be empty. + A2A_AGENT_CARD = 2; + } + + // Required. The type of the agent spec content. + Type type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The content of the Agent spec in the JSON format. + // This payload is validated against the schema for the specified type. + // The content size is limited to `10KB`. + google.protobuf.Struct content = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The spec of the MCP Server. + message McpServerSpec { + // The type of the MCP Server spec. + enum Type { + // Unspecified type. + TYPE_UNSPECIFIED = 0; + + // There is no spec for the MCP Server. The `content` field must be empty. + NO_SPEC = 1; + + // The content is a MCP Tool Spec following the One MCP specification. + // The payload is the same as the `tools/list` response. + TOOL_SPEC = 2; + } + + // Required. The type of the MCP Server spec content. + Type type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The content of the MCP Server spec. + // This payload is validated against the schema for the specified type. + // The content size is limited to `10KB`. + google.protobuf.Struct content = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The spec of the endpoint. + message EndpointSpec { + // The type of the endpoint spec. + enum Type { + // Unspecified type. + TYPE_UNSPECIFIED = 0; + + // There is no spec for the Endpoint. The `content` field must be empty. + NO_SPEC = 1; + } + + // Required. The type of the endpoint spec content. + Type type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The content of the endpoint spec. + // Reserved for future use. + google.protobuf.Struct content = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The spec of the service. At least one of the specs must be set. + oneof spec { + // Optional. The spec of the Agent. When `agent_spec` is set, the type of + // the service is Agent. + AgentSpec agent_spec = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The spec of the MCP Server. When `mcp_server_spec` is set, the + // type of the service is MCP Server. + McpServerSpec mcp_server_spec = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The spec of the Endpoint. When `endpoint_spec` is set, the type + // of the service is Endpoint. + EndpointSpec endpoint_spec = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // Identifier. The resource name of the Service. + // Format: `projects/{project}/locations/{location}/services/{service}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. User-defined display name for the Service. + // Can have a maximum length of `63` characters. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined description of an Service. + // Can have a maximum length of `2048` characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The connection details for the Service. + repeated Interface interfaces = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The resource name of the resulting Agent, MCP Server, or + // Endpoint. Format: + // + // * `projects/{project}/locations/{location}/mcpServers/{mcp_server}` + // * `projects/{project}/locations/{location}/agents/{agent}` + // * `projects/{project}/locations/{location}/endpoints/{endpoint}` + string registry_resource = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update time. + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateSetCredentialsProvider.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d1863fe5b94a --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateSetCredentialsProvider.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.AgentRegistrySettings; +import com.google.cloud.agentregistry.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 + AgentRegistrySettings agentRegistrySettings = + AgentRegistrySettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AgentRegistryClient agentRegistryClient = AgentRegistryClient.create(agentRegistrySettings); + } +} +// [END agentregistry_v1_generated_AgentRegistry_Create_SetCredentialsProvider_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateSetEndpoint.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..959bd5e924a7 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateSetEndpoint.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_Create_SetEndpoint_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.AgentRegistrySettings; +import com.google.cloud.agentregistry.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 + AgentRegistrySettings agentRegistrySettings = + AgentRegistrySettings.newBuilder().setEndpoint(myEndpoint).build(); + AgentRegistryClient agentRegistryClient = AgentRegistryClient.create(agentRegistrySettings); + } +} +// [END agentregistry_v1_generated_AgentRegistry_Create_SetEndpoint_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateUseHttpJsonTransport.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..f18c7fed4568 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,40 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_Create_UseHttpJsonTransport_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.AgentRegistrySettings; + +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 + AgentRegistrySettings agentRegistrySettings = + AgentRegistrySettings.newHttpJsonBuilder().build(); + AgentRegistryClient agentRegistryClient = AgentRegistryClient.create(agentRegistrySettings); + } +} +// [END agentregistry_v1_generated_AgentRegistry_Create_UseHttpJsonTransport_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/AsyncCreateBinding.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/AsyncCreateBinding.java new file mode 100644 index 000000000000..8819a0d8d2b8 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/AsyncCreateBinding.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.CreateBindingRequest; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateBinding { + + public static void main(String[] args) throws Exception { + asyncCreateBinding(); + } + + public static void asyncCreateBinding() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + CreateBindingRequest request = + CreateBindingRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBindingId("bindingId-920966528") + .setBinding(Binding.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = agentRegistryClient.createBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateBinding_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/AsyncCreateBindingLRO.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/AsyncCreateBindingLRO.java new file mode 100644 index 000000000000..8b98a5d2eb05 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/AsyncCreateBindingLRO.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.CreateBindingRequest; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.OperationMetadata; + +public class AsyncCreateBindingLRO { + + public static void main(String[] args) throws Exception { + asyncCreateBindingLRO(); + } + + public static void asyncCreateBindingLRO() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + CreateBindingRequest request = + CreateBindingRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBindingId("bindingId-920966528") + .setBinding(Binding.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + agentRegistryClient.createBindingOperationCallable().futureCall(request); + // Do something. + Binding response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateBinding_LRO_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBinding.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBinding.java new file mode 100644 index 000000000000..5367c4a723bc --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateBinding_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.CreateBindingRequest; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncCreateBinding { + + public static void main(String[] args) throws Exception { + syncCreateBinding(); + } + + public static void syncCreateBinding() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + CreateBindingRequest request = + CreateBindingRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBindingId("bindingId-920966528") + .setBinding(Binding.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Binding response = agentRegistryClient.createBindingAsync(request).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateBinding_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBindingLocationnameBindingString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBindingLocationnameBindingString.java new file mode 100644 index 000000000000..5499b68695e6 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBindingLocationnameBindingString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateBinding_LocationnameBindingString_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncCreateBindingLocationnameBindingString { + + public static void main(String[] args) throws Exception { + syncCreateBindingLocationnameBindingString(); + } + + public static void syncCreateBindingLocationnameBindingString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + Binding response = agentRegistryClient.createBindingAsync(parent, binding, bindingId).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateBinding_LocationnameBindingString_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBindingStringBindingString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBindingStringBindingString.java new file mode 100644 index 000000000000..21af0c629672 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createbinding/SyncCreateBindingStringBindingString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateBinding_StringBindingString_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncCreateBindingStringBindingString { + + public static void main(String[] args) throws Exception { + syncCreateBindingStringBindingString(); + } + + public static void syncCreateBindingStringBindingString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Binding binding = Binding.newBuilder().build(); + String bindingId = "bindingId-920966528"; + Binding response = agentRegistryClient.createBindingAsync(parent, binding, bindingId).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateBinding_StringBindingString_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/AsyncCreateService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/AsyncCreateService.java new file mode 100644 index 000000000000..aa9d49504674 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/AsyncCreateService.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateService_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.CreateServiceRequest; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.Service; +import com.google.longrunning.Operation; + +public class AsyncCreateService { + + public static void main(String[] args) throws Exception { + asyncCreateService(); + } + + public static void asyncCreateService() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setServiceId("serviceId-194185552") + .setService(Service.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = agentRegistryClient.createServiceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateService_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/AsyncCreateServiceLRO.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/AsyncCreateServiceLRO.java new file mode 100644 index 000000000000..e7f82f9ac1c8 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/AsyncCreateServiceLRO.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateService_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.CreateServiceRequest; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.OperationMetadata; +import com.google.cloud.agentregistry.v1.Service; + +public class AsyncCreateServiceLRO { + + public static void main(String[] args) throws Exception { + asyncCreateServiceLRO(); + } + + public static void asyncCreateServiceLRO() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setServiceId("serviceId-194185552") + .setService(Service.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + agentRegistryClient.createServiceOperationCallable().futureCall(request); + // Do something. + Service response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateService_LRO_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateService.java new file mode 100644 index 000000000000..c57b0c70626d --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateService.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateService_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.CreateServiceRequest; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.Service; + +public class SyncCreateService { + + public static void main(String[] args) throws Exception { + syncCreateService(); + } + + public static void syncCreateService() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setServiceId("serviceId-194185552") + .setService(Service.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Service response = agentRegistryClient.createServiceAsync(request).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateService_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateServiceLocationnameServiceString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateServiceLocationnameServiceString.java new file mode 100644 index 000000000000..914dc403a1c7 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateServiceLocationnameServiceString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateService_LocationnameServiceString_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.Service; + +public class SyncCreateServiceLocationnameServiceString { + + public static void main(String[] args) throws Exception { + syncCreateServiceLocationnameServiceString(); + } + + public static void syncCreateServiceLocationnameServiceString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + Service response = agentRegistryClient.createServiceAsync(parent, service, serviceId).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateService_LocationnameServiceString_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateServiceStringServiceString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateServiceStringServiceString.java new file mode 100644 index 000000000000..99a0a5a06a4e --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/createservice/SyncCreateServiceStringServiceString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_CreateService_StringServiceString_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.Service; + +public class SyncCreateServiceStringServiceString { + + public static void main(String[] args) throws Exception { + syncCreateServiceStringServiceString(); + } + + public static void syncCreateServiceStringServiceString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + Service response = agentRegistryClient.createServiceAsync(parent, service, serviceId).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_CreateService_StringServiceString_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/AsyncDeleteBinding.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/AsyncDeleteBinding.java new file mode 100644 index 000000000000..9724f4d01a1f --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/AsyncDeleteBinding.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.BindingName; +import com.google.cloud.agentregistry.v1.DeleteBindingRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteBinding { + + public static void main(String[] args) throws Exception { + asyncDeleteBinding(); + } + + public static void asyncDeleteBinding() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + DeleteBindingRequest request = + DeleteBindingRequest.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = agentRegistryClient.deleteBindingCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteBinding_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/AsyncDeleteBindingLRO.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/AsyncDeleteBindingLRO.java new file mode 100644 index 000000000000..60ca12e8ff8d --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/AsyncDeleteBindingLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.BindingName; +import com.google.cloud.agentregistry.v1.DeleteBindingRequest; +import com.google.cloud.agentregistry.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteBindingLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteBindingLRO(); + } + + public static void asyncDeleteBindingLRO() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + DeleteBindingRequest request = + DeleteBindingRequest.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + agentRegistryClient.deleteBindingOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteBinding_LRO_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBinding.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBinding.java new file mode 100644 index 000000000000..a5f87bd7166d --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBinding.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteBinding_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.BindingName; +import com.google.cloud.agentregistry.v1.DeleteBindingRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteBinding { + + public static void main(String[] args) throws Exception { + syncDeleteBinding(); + } + + public static void syncDeleteBinding() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + DeleteBindingRequest request = + DeleteBindingRequest.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .setRequestId("requestId693933066") + .build(); + agentRegistryClient.deleteBindingAsync(request).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteBinding_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBindingBindingname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBindingBindingname.java new file mode 100644 index 000000000000..b1ba73f80dd0 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBindingBindingname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteBinding_Bindingname_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.BindingName; +import com.google.protobuf.Empty; + +public class SyncDeleteBindingBindingname { + + public static void main(String[] args) throws Exception { + syncDeleteBindingBindingname(); + } + + public static void syncDeleteBindingBindingname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + agentRegistryClient.deleteBindingAsync(name).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteBinding_Bindingname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBindingString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBindingString.java new file mode 100644 index 000000000000..2ecfa70993e5 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deletebinding/SyncDeleteBindingString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteBinding_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.BindingName; +import com.google.protobuf.Empty; + +public class SyncDeleteBindingString { + + public static void main(String[] args) throws Exception { + syncDeleteBindingString(); + } + + public static void syncDeleteBindingString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString(); + agentRegistryClient.deleteBindingAsync(name).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteBinding_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/AsyncDeleteService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/AsyncDeleteService.java new file mode 100644 index 000000000000..9dd67321473e --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/AsyncDeleteService.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteService_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.DeleteServiceRequest; +import com.google.cloud.agentregistry.v1.ServiceName; +import com.google.longrunning.Operation; + +public class AsyncDeleteService { + + public static void main(String[] args) throws Exception { + asyncDeleteService(); + } + + public static void asyncDeleteService() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + DeleteServiceRequest request = + DeleteServiceRequest.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = agentRegistryClient.deleteServiceCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteService_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/AsyncDeleteServiceLRO.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/AsyncDeleteServiceLRO.java new file mode 100644 index 000000000000..2a8f222ef03e --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/AsyncDeleteServiceLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteService_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.DeleteServiceRequest; +import com.google.cloud.agentregistry.v1.OperationMetadata; +import com.google.cloud.agentregistry.v1.ServiceName; +import com.google.protobuf.Empty; + +public class AsyncDeleteServiceLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteServiceLRO(); + } + + public static void asyncDeleteServiceLRO() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + DeleteServiceRequest request = + DeleteServiceRequest.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + agentRegistryClient.deleteServiceOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteService_LRO_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteService.java new file mode 100644 index 000000000000..fe0c996909eb --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteService.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteService_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.DeleteServiceRequest; +import com.google.cloud.agentregistry.v1.ServiceName; +import com.google.protobuf.Empty; + +public class SyncDeleteService { + + public static void main(String[] args) throws Exception { + syncDeleteService(); + } + + public static void syncDeleteService() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + DeleteServiceRequest request = + DeleteServiceRequest.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + agentRegistryClient.deleteServiceAsync(request).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteService_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteServiceServicename.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteServiceServicename.java new file mode 100644 index 000000000000..3b5cfd2d296a --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteServiceServicename.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteService_Servicename_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ServiceName; +import com.google.protobuf.Empty; + +public class SyncDeleteServiceServicename { + + public static void main(String[] args) throws Exception { + syncDeleteServiceServicename(); + } + + public static void syncDeleteServiceServicename() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + agentRegistryClient.deleteServiceAsync(name).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteService_Servicename_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteServiceString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteServiceString.java new file mode 100644 index 000000000000..7850728cfeb0 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/deleteservice/SyncDeleteServiceString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_DeleteService_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ServiceName; +import com.google.protobuf.Empty; + +public class SyncDeleteServiceString { + + public static void main(String[] args) throws Exception { + syncDeleteServiceString(); + } + + public static void syncDeleteServiceString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString(); + agentRegistryClient.deleteServiceAsync(name).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_DeleteService_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/AsyncFetchAvailableBindings.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/AsyncFetchAvailableBindings.java new file mode 100644 index 000000000000..2acaad54e34b --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/AsyncFetchAvailableBindings.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest; +import com.google.cloud.agentregistry.v1.LocationName; + +public class AsyncFetchAvailableBindings { + + public static void main(String[] args) throws Exception { + asyncFetchAvailableBindings(); + } + + public static void asyncFetchAvailableBindings() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + FetchAvailableBindingsRequest request = + FetchAvailableBindingsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + agentRegistryClient.fetchAvailableBindingsPagedCallable().futureCall(request); + // Do something. + for (Binding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/AsyncFetchAvailableBindingsPaged.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/AsyncFetchAvailableBindingsPaged.java new file mode 100644 index 000000000000..52b7eec59fd4 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/AsyncFetchAvailableBindingsPaged.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_Paged_async] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsResponse; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncFetchAvailableBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncFetchAvailableBindingsPaged(); + } + + public static void asyncFetchAvailableBindingsPaged() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + FetchAvailableBindingsRequest request = + FetchAvailableBindingsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + FetchAvailableBindingsResponse response = + agentRegistryClient.fetchAvailableBindingsCallable().call(request); + for (Binding element : response.getBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_Paged_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindings.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindings.java new file mode 100644 index 000000000000..9136a9683d2a --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindings.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.FetchAvailableBindingsRequest; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncFetchAvailableBindings { + + public static void main(String[] args) throws Exception { + syncFetchAvailableBindings(); + } + + public static void syncFetchAvailableBindings() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + FetchAvailableBindingsRequest request = + FetchAvailableBindingsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Binding element : agentRegistryClient.fetchAvailableBindings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindingsLocationname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindingsLocationname.java new file mode 100644 index 000000000000..b967eb170deb --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindingsLocationname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_Locationname_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncFetchAvailableBindingsLocationname { + + public static void main(String[] args) throws Exception { + syncFetchAvailableBindingsLocationname(); + } + + public static void syncFetchAvailableBindingsLocationname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Binding element : agentRegistryClient.fetchAvailableBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_Locationname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindingsString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindingsString.java new file mode 100644 index 000000000000..f4e94b88a709 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/fetchavailablebindings/SyncFetchAvailableBindingsString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncFetchAvailableBindingsString { + + public static void main(String[] args) throws Exception { + syncFetchAvailableBindingsString(); + } + + public static void syncFetchAvailableBindingsString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Binding element : agentRegistryClient.fetchAvailableBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_FetchAvailableBindings_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/AsyncGetAgent.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/AsyncGetAgent.java new file mode 100644 index 000000000000..88caa0037e99 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/AsyncGetAgent.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetAgent_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentName; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.GetAgentRequest; + +public class AsyncGetAgent { + + public static void main(String[] args) throws Exception { + asyncGetAgent(); + } + + public static void asyncGetAgent() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetAgentRequest request = + GetAgentRequest.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + ApiFuture future = agentRegistryClient.getAgentCallable().futureCall(request); + // Do something. + Agent response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetAgent_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgent.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgent.java new file mode 100644 index 000000000000..267631db37e2 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgent.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetAgent_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentName; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.GetAgentRequest; + +public class SyncGetAgent { + + public static void main(String[] args) throws Exception { + syncGetAgent(); + } + + public static void syncGetAgent() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetAgentRequest request = + GetAgentRequest.newBuilder() + .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .build(); + Agent response = agentRegistryClient.getAgent(request); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetAgent_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgentAgentname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgentAgentname.java new file mode 100644 index 000000000000..dba3768b48b3 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgentAgentname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetAgent_Agentname_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentName; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; + +public class SyncGetAgentAgentname { + + public static void main(String[] args) throws Exception { + syncGetAgentAgentname(); + } + + public static void syncGetAgentAgentname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Agent response = agentRegistryClient.getAgent(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetAgent_Agentname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgentString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgentString.java new file mode 100644 index 000000000000..902097b3f001 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getagent/SyncGetAgentString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetAgent_String_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentName; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; + +public class SyncGetAgentString { + + public static void main(String[] args) throws Exception { + syncGetAgentString(); + } + + public static void syncGetAgentString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + Agent response = agentRegistryClient.getAgent(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetAgent_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/AsyncGetBinding.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/AsyncGetBinding.java new file mode 100644 index 000000000000..df300a7c54c5 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/AsyncGetBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.BindingName; +import com.google.cloud.agentregistry.v1.GetBindingRequest; + +public class AsyncGetBinding { + + public static void main(String[] args) throws Exception { + asyncGetBinding(); + } + + public static void asyncGetBinding() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetBindingRequest request = + GetBindingRequest.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .build(); + ApiFuture future = agentRegistryClient.getBindingCallable().futureCall(request); + // Do something. + Binding response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetBinding_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBinding.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBinding.java new file mode 100644 index 000000000000..d350443d00e3 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBinding.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetBinding_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.BindingName; +import com.google.cloud.agentregistry.v1.GetBindingRequest; + +public class SyncGetBinding { + + public static void main(String[] args) throws Exception { + syncGetBinding(); + } + + public static void syncGetBinding() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetBindingRequest request = + GetBindingRequest.newBuilder() + .setName(BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString()) + .build(); + Binding response = agentRegistryClient.getBinding(request); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetBinding_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBindingBindingname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBindingBindingname.java new file mode 100644 index 000000000000..9699478f7f22 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBindingBindingname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetBinding_Bindingname_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.BindingName; + +public class SyncGetBindingBindingname { + + public static void main(String[] args) throws Exception { + syncGetBindingBindingname(); + } + + public static void syncGetBindingBindingname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + BindingName name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]"); + Binding response = agentRegistryClient.getBinding(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetBinding_Bindingname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBindingString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBindingString.java new file mode 100644 index 000000000000..b28f73f4020d --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getbinding/SyncGetBindingString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetBinding_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.BindingName; + +public class SyncGetBindingString { + + public static void main(String[] args) throws Exception { + syncGetBindingString(); + } + + public static void syncGetBindingString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String name = BindingName.of("[PROJECT]", "[LOCATION]", "[BINDING]").toString(); + Binding response = agentRegistryClient.getBinding(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetBinding_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/AsyncGetEndpoint.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/AsyncGetEndpoint.java new file mode 100644 index 000000000000..b1cf8ea3e343 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/AsyncGetEndpoint.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetEndpoint_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.EndpointName; +import com.google.cloud.agentregistry.v1.GetEndpointRequest; + +public class AsyncGetEndpoint { + + public static void main(String[] args) throws Exception { + asyncGetEndpoint(); + } + + public static void asyncGetEndpoint() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetEndpointRequest request = + GetEndpointRequest.newBuilder() + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .build(); + ApiFuture future = agentRegistryClient.getEndpointCallable().futureCall(request); + // Do something. + Endpoint response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetEndpoint_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpoint.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpoint.java new file mode 100644 index 000000000000..79d634d3bb16 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpoint.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetEndpoint_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.EndpointName; +import com.google.cloud.agentregistry.v1.GetEndpointRequest; + +public class SyncGetEndpoint { + + public static void main(String[] args) throws Exception { + syncGetEndpoint(); + } + + public static void syncGetEndpoint() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetEndpointRequest request = + GetEndpointRequest.newBuilder() + .setName(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString()) + .build(); + Endpoint response = agentRegistryClient.getEndpoint(request); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetEndpoint_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpointEndpointname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpointEndpointname.java new file mode 100644 index 000000000000..f4f4cbc4f314 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpointEndpointname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetEndpoint_Endpointname_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.EndpointName; + +public class SyncGetEndpointEndpointname { + + public static void main(String[] args) throws Exception { + syncGetEndpointEndpointname(); + } + + public static void syncGetEndpointEndpointname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + EndpointName name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); + Endpoint response = agentRegistryClient.getEndpoint(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetEndpoint_Endpointname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpointString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpointString.java new file mode 100644 index 000000000000..a777c22d70a4 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getendpoint/SyncGetEndpointString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetEndpoint_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.EndpointName; + +public class SyncGetEndpointString { + + public static void main(String[] args) throws Exception { + syncGetEndpointString(); + } + + public static void syncGetEndpointString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String name = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString(); + Endpoint response = agentRegistryClient.getEndpoint(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetEndpoint_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getlocation/AsyncGetLocation.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..99c6b64a0393 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getlocation/AsyncGetLocation.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = agentRegistryClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetLocation_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getlocation/SyncGetLocation.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..f45cc61e062b --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getlocation/SyncGetLocation.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetLocation_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = agentRegistryClient.getLocation(request); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetLocation_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/AsyncGetMcpServer.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/AsyncGetMcpServer.java new file mode 100644 index 000000000000..b5ab91038c25 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/AsyncGetMcpServer.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetMcpServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.GetMcpServerRequest; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.McpServerName; + +public class AsyncGetMcpServer { + + public static void main(String[] args) throws Exception { + asyncGetMcpServer(); + } + + public static void asyncGetMcpServer() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetMcpServerRequest request = + GetMcpServerRequest.newBuilder() + .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString()) + .build(); + ApiFuture future = agentRegistryClient.getMcpServerCallable().futureCall(request); + // Do something. + McpServer response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetMcpServer_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServer.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServer.java new file mode 100644 index 000000000000..d897c88ec4a1 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServer.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetMcpServer_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.GetMcpServerRequest; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.McpServerName; + +public class SyncGetMcpServer { + + public static void main(String[] args) throws Exception { + syncGetMcpServer(); + } + + public static void syncGetMcpServer() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetMcpServerRequest request = + GetMcpServerRequest.newBuilder() + .setName(McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString()) + .build(); + McpServer response = agentRegistryClient.getMcpServer(request); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetMcpServer_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServerMcpservername.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServerMcpservername.java new file mode 100644 index 000000000000..e46db4b0edcf --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServerMcpservername.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetMcpServer_Mcpservername_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.McpServerName; + +public class SyncGetMcpServerMcpservername { + + public static void main(String[] args) throws Exception { + syncGetMcpServerMcpservername(); + } + + public static void syncGetMcpServerMcpservername() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + McpServerName name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]"); + McpServer response = agentRegistryClient.getMcpServer(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetMcpServer_Mcpservername_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServerString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServerString.java new file mode 100644 index 000000000000..6d127a111720 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getmcpserver/SyncGetMcpServerString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetMcpServer_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.McpServerName; + +public class SyncGetMcpServerString { + + public static void main(String[] args) throws Exception { + syncGetMcpServerString(); + } + + public static void syncGetMcpServerString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String name = McpServerName.of("[PROJECT]", "[LOCATION]", "[MCP_SERVER]").toString(); + McpServer response = agentRegistryClient.getMcpServer(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetMcpServer_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/AsyncGetService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/AsyncGetService.java new file mode 100644 index 000000000000..40d1e9d5606c --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/AsyncGetService.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetService_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.GetServiceRequest; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.ServiceName; + +public class AsyncGetService { + + public static void main(String[] args) throws Exception { + asyncGetService(); + } + + public static void asyncGetService() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetServiceRequest request = + GetServiceRequest.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .build(); + ApiFuture future = agentRegistryClient.getServiceCallable().futureCall(request); + // Do something. + Service response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetService_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetService.java new file mode 100644 index 000000000000..eb93796bd1e2 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetService.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetService_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.GetServiceRequest; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.ServiceName; + +public class SyncGetService { + + public static void main(String[] args) throws Exception { + syncGetService(); + } + + public static void syncGetService() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + GetServiceRequest request = + GetServiceRequest.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .build(); + Service response = agentRegistryClient.getService(request); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetService_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetServiceServicename.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetServiceServicename.java new file mode 100644 index 000000000000..52aea0779e71 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetServiceServicename.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetService_Servicename_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.ServiceName; + +public class SyncGetServiceServicename { + + public static void main(String[] args) throws Exception { + syncGetServiceServicename(); + } + + public static void syncGetServiceServicename() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Service response = agentRegistryClient.getService(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetService_Servicename_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetServiceString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetServiceString.java new file mode 100644 index 000000000000..f4beac332683 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/getservice/SyncGetServiceString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_GetService_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.ServiceName; + +public class SyncGetServiceString { + + public static void main(String[] args) throws Exception { + syncGetServiceString(); + } + + public static void syncGetServiceString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString(); + Service response = agentRegistryClient.getService(name); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_GetService_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/AsyncListAgents.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/AsyncListAgents.java new file mode 100644 index 000000000000..48eb5c84d014 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/AsyncListAgents.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListAgents_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ListAgentsRequest; +import com.google.cloud.agentregistry.v1.LocationName; + +public class AsyncListAgents { + + public static void main(String[] args) throws Exception { + asyncListAgents(); + } + + public static void asyncListAgents() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListAgentsRequest request = + ListAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = agentRegistryClient.listAgentsPagedCallable().futureCall(request); + // Do something. + for (Agent element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListAgents_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/AsyncListAgentsPaged.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/AsyncListAgentsPaged.java new file mode 100644 index 000000000000..565f1eae14af --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/AsyncListAgentsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListAgents_Paged_async] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ListAgentsRequest; +import com.google.cloud.agentregistry.v1.ListAgentsResponse; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListAgentsPaged { + + public static void main(String[] args) throws Exception { + asyncListAgentsPaged(); + } + + public static void asyncListAgentsPaged() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListAgentsRequest request = + ListAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListAgentsResponse response = agentRegistryClient.listAgentsCallable().call(request); + for (Agent element : response.getAgentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListAgents_Paged_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgents.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgents.java new file mode 100644 index 000000000000..e7dd2c361ca5 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgents.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListAgents_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ListAgentsRequest; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncListAgents { + + public static void main(String[] args) throws Exception { + syncListAgents(); + } + + public static void syncListAgents() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListAgentsRequest request = + ListAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Agent element : agentRegistryClient.listAgents(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListAgents_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgentsLocationname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgentsLocationname.java new file mode 100644 index 000000000000..2e1ef5f39832 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgentsLocationname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListAgents_Locationname_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncListAgentsLocationname { + + public static void main(String[] args) throws Exception { + syncListAgentsLocationname(); + } + + public static void syncListAgentsLocationname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Agent element : agentRegistryClient.listAgents(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListAgents_Locationname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgentsString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgentsString.java new file mode 100644 index 000000000000..bcfbacb5b25a --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listagents/SyncListAgentsString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListAgents_String_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncListAgentsString { + + public static void main(String[] args) throws Exception { + syncListAgentsString(); + } + + public static void syncListAgentsString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Agent element : agentRegistryClient.listAgents(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListAgents_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/AsyncListBindings.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/AsyncListBindings.java new file mode 100644 index 000000000000..2ba0d3222a06 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/AsyncListBindings.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListBindings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.ListBindingsRequest; +import com.google.cloud.agentregistry.v1.LocationName; + +public class AsyncListBindings { + + public static void main(String[] args) throws Exception { + asyncListBindings(); + } + + public static void asyncListBindings() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListBindingsRequest request = + ListBindingsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + agentRegistryClient.listBindingsPagedCallable().futureCall(request); + // Do something. + for (Binding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListBindings_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/AsyncListBindingsPaged.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/AsyncListBindingsPaged.java new file mode 100644 index 000000000000..d4162fc958a6 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/AsyncListBindingsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListBindings_Paged_async] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.ListBindingsRequest; +import com.google.cloud.agentregistry.v1.ListBindingsResponse; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncListBindingsPaged(); + } + + public static void asyncListBindingsPaged() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListBindingsRequest request = + ListBindingsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListBindingsResponse response = agentRegistryClient.listBindingsCallable().call(request); + for (Binding element : response.getBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListBindings_Paged_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindings.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindings.java new file mode 100644 index 000000000000..e4239b9ed6fa --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindings.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListBindings_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.ListBindingsRequest; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncListBindings { + + public static void main(String[] args) throws Exception { + syncListBindings(); + } + + public static void syncListBindings() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListBindingsRequest request = + ListBindingsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Binding element : agentRegistryClient.listBindings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListBindings_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindingsLocationname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindingsLocationname.java new file mode 100644 index 000000000000..bf226d31bbcb --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindingsLocationname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListBindings_Locationname_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncListBindingsLocationname { + + public static void main(String[] args) throws Exception { + syncListBindingsLocationname(); + } + + public static void syncListBindingsLocationname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Binding element : agentRegistryClient.listBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListBindings_Locationname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindingsString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindingsString.java new file mode 100644 index 000000000000..8f6da1301ec0 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listbindings/SyncListBindingsString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListBindings_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncListBindingsString { + + public static void main(String[] args) throws Exception { + syncListBindingsString(); + } + + public static void syncListBindingsString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Binding element : agentRegistryClient.listBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListBindings_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/AsyncListEndpoints.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/AsyncListEndpoints.java new file mode 100644 index 000000000000..2927b2404a0b --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/AsyncListEndpoints.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListEndpoints_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.ListEndpointsRequest; +import com.google.cloud.agentregistry.v1.LocationName; + +public class AsyncListEndpoints { + + public static void main(String[] args) throws Exception { + asyncListEndpoints(); + } + + public static void asyncListEndpoints() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListEndpointsRequest request = + ListEndpointsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + agentRegistryClient.listEndpointsPagedCallable().futureCall(request); + // Do something. + for (Endpoint element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListEndpoints_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/AsyncListEndpointsPaged.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/AsyncListEndpointsPaged.java new file mode 100644 index 000000000000..4bbaa3dab9f2 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/AsyncListEndpointsPaged.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListEndpoints_Paged_async] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.ListEndpointsRequest; +import com.google.cloud.agentregistry.v1.ListEndpointsResponse; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListEndpointsPaged { + + public static void main(String[] args) throws Exception { + asyncListEndpointsPaged(); + } + + public static void asyncListEndpointsPaged() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListEndpointsRequest request = + ListEndpointsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListEndpointsResponse response = agentRegistryClient.listEndpointsCallable().call(request); + for (Endpoint element : response.getEndpointsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListEndpoints_Paged_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpoints.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpoints.java new file mode 100644 index 000000000000..039488c63ce8 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpoints.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListEndpoints_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.ListEndpointsRequest; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncListEndpoints { + + public static void main(String[] args) throws Exception { + syncListEndpoints(); + } + + public static void syncListEndpoints() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListEndpointsRequest request = + ListEndpointsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (Endpoint element : agentRegistryClient.listEndpoints(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListEndpoints_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpointsLocationname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpointsLocationname.java new file mode 100644 index 000000000000..7c2345add784 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpointsLocationname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListEndpoints_Locationname_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncListEndpointsLocationname { + + public static void main(String[] args) throws Exception { + syncListEndpointsLocationname(); + } + + public static void syncListEndpointsLocationname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Endpoint element : agentRegistryClient.listEndpoints(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListEndpoints_Locationname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpointsString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpointsString.java new file mode 100644 index 000000000000..0b8cbbe25de7 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listendpoints/SyncListEndpointsString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListEndpoints_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Endpoint; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncListEndpointsString { + + public static void main(String[] args) throws Exception { + syncListEndpointsString(); + } + + public static void syncListEndpointsString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Endpoint element : agentRegistryClient.listEndpoints(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListEndpoints_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/AsyncListLocations.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..14e1c7e01c93 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/AsyncListLocations.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + agentRegistryClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListLocations_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/AsyncListLocationsPaged.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..2b2ea96e7dfa --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListLocations_Paged_async] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = agentRegistryClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListLocations_Paged_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/SyncListLocations.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..fc495f45e5a4 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListLocations_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : agentRegistryClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListLocations_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/AsyncListMcpServers.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/AsyncListMcpServers.java new file mode 100644 index 000000000000..89b455f62283 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/AsyncListMcpServers.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListMcpServers_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ListMcpServersRequest; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; + +public class AsyncListMcpServers { + + public static void main(String[] args) throws Exception { + asyncListMcpServers(); + } + + public static void asyncListMcpServers() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListMcpServersRequest request = + ListMcpServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + agentRegistryClient.listMcpServersPagedCallable().futureCall(request); + // Do something. + for (McpServer element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListMcpServers_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/AsyncListMcpServersPaged.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/AsyncListMcpServersPaged.java new file mode 100644 index 000000000000..b0de38724ba6 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/AsyncListMcpServersPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListMcpServers_Paged_async] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ListMcpServersRequest; +import com.google.cloud.agentregistry.v1.ListMcpServersResponse; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.common.base.Strings; + +public class AsyncListMcpServersPaged { + + public static void main(String[] args) throws Exception { + asyncListMcpServersPaged(); + } + + public static void asyncListMcpServersPaged() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListMcpServersRequest request = + ListMcpServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListMcpServersResponse response = + agentRegistryClient.listMcpServersCallable().call(request); + for (McpServer element : response.getMcpServersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListMcpServers_Paged_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServers.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServers.java new file mode 100644 index 000000000000..a179c31978ca --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServers.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListMcpServers_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ListMcpServersRequest; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; + +public class SyncListMcpServers { + + public static void main(String[] args) throws Exception { + syncListMcpServers(); + } + + public static void syncListMcpServers() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListMcpServersRequest request = + ListMcpServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (McpServer element : agentRegistryClient.listMcpServers(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListMcpServers_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServersLocationname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServersLocationname.java new file mode 100644 index 000000000000..4a169aa41dc4 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServersLocationname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListMcpServers_Locationname_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; + +public class SyncListMcpServersLocationname { + + public static void main(String[] args) throws Exception { + syncListMcpServersLocationname(); + } + + public static void syncListMcpServersLocationname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (McpServer element : agentRegistryClient.listMcpServers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListMcpServers_Locationname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServersString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServersString.java new file mode 100644 index 000000000000..accc7a228be1 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listmcpservers/SyncListMcpServersString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListMcpServers_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; + +public class SyncListMcpServersString { + + public static void main(String[] args) throws Exception { + syncListMcpServersString(); + } + + public static void syncListMcpServersString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (McpServer element : agentRegistryClient.listMcpServers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListMcpServers_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/AsyncListServices.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/AsyncListServices.java new file mode 100644 index 000000000000..ff65d921cd4e --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/AsyncListServices.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListServices_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ListServicesRequest; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.Service; + +public class AsyncListServices { + + public static void main(String[] args) throws Exception { + asyncListServices(); + } + + public static void asyncListServices() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListServicesRequest request = + ListServicesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + agentRegistryClient.listServicesPagedCallable().futureCall(request); + // Do something. + for (Service element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListServices_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/AsyncListServicesPaged.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/AsyncListServicesPaged.java new file mode 100644 index 000000000000..6f5493df9385 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/AsyncListServicesPaged.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListServices_Paged_async] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ListServicesRequest; +import com.google.cloud.agentregistry.v1.ListServicesResponse; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.Service; +import com.google.common.base.Strings; + +public class AsyncListServicesPaged { + + public static void main(String[] args) throws Exception { + asyncListServicesPaged(); + } + + public static void asyncListServicesPaged() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListServicesRequest request = + ListServicesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListServicesResponse response = agentRegistryClient.listServicesCallable().call(request); + for (Service element : response.getServicesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListServices_Paged_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServices.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServices.java new file mode 100644 index 000000000000..8d060c418b66 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServices.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListServices_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.ListServicesRequest; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.Service; + +public class SyncListServices { + + public static void main(String[] args) throws Exception { + syncListServices(); + } + + public static void syncListServices() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + ListServicesRequest request = + ListServicesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (Service element : agentRegistryClient.listServices(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListServices_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServicesLocationname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServicesLocationname.java new file mode 100644 index 000000000000..43a7ea25b1c1 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServicesLocationname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListServices_Locationname_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.Service; + +public class SyncListServicesLocationname { + + public static void main(String[] args) throws Exception { + syncListServicesLocationname(); + } + + public static void syncListServicesLocationname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Service element : agentRegistryClient.listServices(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListServices_Locationname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServicesString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServicesString.java new file mode 100644 index 000000000000..8c3003b0e604 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/listservices/SyncListServicesString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_ListServices_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.Service; + +public class SyncListServicesString { + + public static void main(String[] args) throws Exception { + syncListServicesString(); + } + + public static void syncListServicesString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Service element : agentRegistryClient.listServices(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_ListServices_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/AsyncSearchAgents.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/AsyncSearchAgents.java new file mode 100644 index 000000000000..e0d743daaac4 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/AsyncSearchAgents.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchAgents_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.SearchAgentsRequest; + +public class AsyncSearchAgents { + + public static void main(String[] args) throws Exception { + asyncSearchAgents(); + } + + public static void asyncSearchAgents() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + SearchAgentsRequest request = + SearchAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSearchString("searchString120312793") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = agentRegistryClient.searchAgentsPagedCallable().futureCall(request); + // Do something. + for (Agent element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchAgents_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/AsyncSearchAgentsPaged.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/AsyncSearchAgentsPaged.java new file mode 100644 index 000000000000..5e91fc35e486 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/AsyncSearchAgentsPaged.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchAgents_Paged_async] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.SearchAgentsRequest; +import com.google.cloud.agentregistry.v1.SearchAgentsResponse; +import com.google.common.base.Strings; + +public class AsyncSearchAgentsPaged { + + public static void main(String[] args) throws Exception { + asyncSearchAgentsPaged(); + } + + public static void asyncSearchAgentsPaged() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + SearchAgentsRequest request = + SearchAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSearchString("searchString120312793") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + SearchAgentsResponse response = agentRegistryClient.searchAgentsCallable().call(request); + for (Agent element : response.getAgentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchAgents_Paged_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgents.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgents.java new file mode 100644 index 000000000000..7a34af5f8808 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgents.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchAgents_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.SearchAgentsRequest; + +public class SyncSearchAgents { + + public static void main(String[] args) throws Exception { + syncSearchAgents(); + } + + public static void syncSearchAgents() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + SearchAgentsRequest request = + SearchAgentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSearchString("searchString120312793") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Agent element : agentRegistryClient.searchAgents(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchAgents_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgentsLocationname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgentsLocationname.java new file mode 100644 index 000000000000..444e8b60f60c --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgentsLocationname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchAgents_Locationname_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncSearchAgentsLocationname { + + public static void main(String[] args) throws Exception { + syncSearchAgentsLocationname(); + } + + public static void syncSearchAgentsLocationname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Agent element : agentRegistryClient.searchAgents(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchAgents_Locationname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgentsString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgentsString.java new file mode 100644 index 000000000000..391b1280b77d --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchagents/SyncSearchAgentsString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchAgents_String_sync] +import com.google.cloud.agentregistry.v1.Agent; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; + +public class SyncSearchAgentsString { + + public static void main(String[] args) throws Exception { + syncSearchAgentsString(); + } + + public static void syncSearchAgentsString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Agent element : agentRegistryClient.searchAgents(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchAgents_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/AsyncSearchMcpServers.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/AsyncSearchMcpServers.java new file mode 100644 index 000000000000..4d998f2a0e63 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/AsyncSearchMcpServers.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchMcpServers_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.SearchMcpServersRequest; + +public class AsyncSearchMcpServers { + + public static void main(String[] args) throws Exception { + asyncSearchMcpServers(); + } + + public static void asyncSearchMcpServers() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + SearchMcpServersRequest request = + SearchMcpServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSearchString("searchString120312793") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + agentRegistryClient.searchMcpServersPagedCallable().futureCall(request); + // Do something. + for (McpServer element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchMcpServers_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/AsyncSearchMcpServersPaged.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/AsyncSearchMcpServersPaged.java new file mode 100644 index 000000000000..1b7eeb983aaa --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/AsyncSearchMcpServersPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchMcpServers_Paged_async] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.SearchMcpServersRequest; +import com.google.cloud.agentregistry.v1.SearchMcpServersResponse; +import com.google.common.base.Strings; + +public class AsyncSearchMcpServersPaged { + + public static void main(String[] args) throws Exception { + asyncSearchMcpServersPaged(); + } + + public static void asyncSearchMcpServersPaged() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + SearchMcpServersRequest request = + SearchMcpServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSearchString("searchString120312793") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + SearchMcpServersResponse response = + agentRegistryClient.searchMcpServersCallable().call(request); + for (McpServer element : response.getMcpServersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchMcpServers_Paged_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServers.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServers.java new file mode 100644 index 000000000000..f4f536f672b3 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServers.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchMcpServers_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; +import com.google.cloud.agentregistry.v1.SearchMcpServersRequest; + +public class SyncSearchMcpServers { + + public static void main(String[] args) throws Exception { + syncSearchMcpServers(); + } + + public static void syncSearchMcpServers() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + SearchMcpServersRequest request = + SearchMcpServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSearchString("searchString120312793") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (McpServer element : agentRegistryClient.searchMcpServers(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchMcpServers_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServersLocationname.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServersLocationname.java new file mode 100644 index 000000000000..4d62e3083aa1 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServersLocationname.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchMcpServers_Locationname_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; + +public class SyncSearchMcpServersLocationname { + + public static void main(String[] args) throws Exception { + syncSearchMcpServersLocationname(); + } + + public static void syncSearchMcpServersLocationname() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (McpServer element : agentRegistryClient.searchMcpServers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchMcpServers_Locationname_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServersString.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServersString.java new file mode 100644 index 000000000000..527ce930e873 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/searchmcpservers/SyncSearchMcpServersString.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_SearchMcpServers_String_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.LocationName; +import com.google.cloud.agentregistry.v1.McpServer; + +public class SyncSearchMcpServersString { + + public static void main(String[] args) throws Exception { + syncSearchMcpServersString(); + } + + public static void syncSearchMcpServersString() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (McpServer element : agentRegistryClient.searchMcpServers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_SearchMcpServers_String_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/AsyncUpdateBinding.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/AsyncUpdateBinding.java new file mode 100644 index 000000000000..f0e23ef035de --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/AsyncUpdateBinding.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_UpdateBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.UpdateBindingRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBinding { + + public static void main(String[] args) throws Exception { + asyncUpdateBinding(); + } + + public static void asyncUpdateBinding() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + UpdateBindingRequest request = + UpdateBindingRequest.newBuilder() + .setBinding(Binding.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = agentRegistryClient.updateBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_UpdateBinding_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/AsyncUpdateBindingLRO.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/AsyncUpdateBindingLRO.java new file mode 100644 index 000000000000..92a55f9f8f5c --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/AsyncUpdateBindingLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_UpdateBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.OperationMetadata; +import com.google.cloud.agentregistry.v1.UpdateBindingRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBindingLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateBindingLRO(); + } + + public static void asyncUpdateBindingLRO() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + UpdateBindingRequest request = + UpdateBindingRequest.newBuilder() + .setBinding(Binding.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + agentRegistryClient.updateBindingOperationCallable().futureCall(request); + // Do something. + Binding response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_UpdateBinding_LRO_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/SyncUpdateBinding.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/SyncUpdateBinding.java new file mode 100644 index 000000000000..d32e071050d8 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/SyncUpdateBinding.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_UpdateBinding_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.cloud.agentregistry.v1.UpdateBindingRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBinding { + + public static void main(String[] args) throws Exception { + syncUpdateBinding(); + } + + public static void syncUpdateBinding() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + UpdateBindingRequest request = + UpdateBindingRequest.newBuilder() + .setBinding(Binding.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Binding response = agentRegistryClient.updateBindingAsync(request).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_UpdateBinding_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/SyncUpdateBindingBindingFieldmask.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/SyncUpdateBindingBindingFieldmask.java new file mode 100644 index 000000000000..339dff480b20 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updatebinding/SyncUpdateBindingBindingFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_UpdateBinding_BindingFieldmask_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Binding; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBindingBindingFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateBindingBindingFieldmask(); + } + + public static void syncUpdateBindingBindingFieldmask() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + Binding binding = Binding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Binding response = agentRegistryClient.updateBindingAsync(binding, updateMask).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_UpdateBinding_BindingFieldmask_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/AsyncUpdateService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/AsyncUpdateService.java new file mode 100644 index 000000000000..19aa3e9d4cea --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/AsyncUpdateService.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_UpdateService_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.UpdateServiceRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateService { + + public static void main(String[] args) throws Exception { + asyncUpdateService(); + } + + public static void asyncUpdateService() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + UpdateServiceRequest request = + UpdateServiceRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setService(Service.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = agentRegistryClient.updateServiceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_UpdateService_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/AsyncUpdateServiceLRO.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/AsyncUpdateServiceLRO.java new file mode 100644 index 000000000000..a6647ab1047f --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/AsyncUpdateServiceLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_UpdateService_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.OperationMetadata; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.UpdateServiceRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateServiceLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateServiceLRO(); + } + + public static void asyncUpdateServiceLRO() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + UpdateServiceRequest request = + UpdateServiceRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setService(Service.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + agentRegistryClient.updateServiceOperationCallable().futureCall(request); + // Do something. + Service response = future.get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_UpdateService_LRO_async] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/SyncUpdateService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/SyncUpdateService.java new file mode 100644 index 000000000000..97784ff1b351 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/SyncUpdateService.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.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_UpdateService_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Service; +import com.google.cloud.agentregistry.v1.UpdateServiceRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateService { + + public static void main(String[] args) throws Exception { + syncUpdateService(); + } + + public static void syncUpdateService() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + UpdateServiceRequest request = + UpdateServiceRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setService(Service.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Service response = agentRegistryClient.updateServiceAsync(request).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_UpdateService_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/SyncUpdateServiceServiceFieldmask.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/SyncUpdateServiceServiceFieldmask.java new file mode 100644 index 000000000000..865b491a6d61 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistry/updateservice/SyncUpdateServiceServiceFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistry_UpdateService_ServiceFieldmask_sync] +import com.google.cloud.agentregistry.v1.AgentRegistryClient; +import com.google.cloud.agentregistry.v1.Service; +import com.google.protobuf.FieldMask; + +public class SyncUpdateServiceServiceFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateServiceServiceFieldmask(); + } + + public static void syncUpdateServiceServiceFieldmask() 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 (AgentRegistryClient agentRegistryClient = AgentRegistryClient.create()) { + Service service = Service.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Service response = agentRegistryClient.updateServiceAsync(service, updateMask).get(); + } + } +} +// [END agentregistry_v1_generated_AgentRegistry_UpdateService_ServiceFieldmask_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistrysettings/createservice/SyncCreateService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistrysettings/createservice/SyncCreateService.java new file mode 100644 index 000000000000..c3bad267acd6 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistrysettings/createservice/SyncCreateService.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistrySettings_CreateService_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.agentregistry.v1.AgentRegistrySettings; +import java.time.Duration; + +public class SyncCreateService { + + public static void main(String[] args) throws Exception { + syncCreateService(); + } + + public static void syncCreateService() 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 + AgentRegistrySettings.Builder agentRegistrySettingsBuilder = AgentRegistrySettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + agentRegistrySettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END agentregistry_v1_generated_AgentRegistrySettings_CreateService_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistrysettings/getagent/SyncGetAgent.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistrysettings/getagent/SyncGetAgent.java new file mode 100644 index 000000000000..ecd4af77cd3e --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/agentregistrysettings/getagent/SyncGetAgent.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.agentregistry.v1.samples; + +// [START agentregistry_v1_generated_AgentRegistrySettings_GetAgent_sync] +import com.google.cloud.agentregistry.v1.AgentRegistrySettings; +import java.time.Duration; + +public class SyncGetAgent { + + public static void main(String[] args) throws Exception { + syncGetAgent(); + } + + public static void syncGetAgent() 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 + AgentRegistrySettings.Builder agentRegistrySettingsBuilder = AgentRegistrySettings.newBuilder(); + agentRegistrySettingsBuilder + .getAgentSettings() + .setRetrySettings( + agentRegistrySettingsBuilder + .getAgentSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + AgentRegistrySettings agentRegistrySettings = agentRegistrySettingsBuilder.build(); + } +} +// [END agentregistry_v1_generated_AgentRegistrySettings_GetAgent_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/stub/agentregistrystubsettings/createservice/SyncCreateService.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/stub/agentregistrystubsettings/createservice/SyncCreateService.java new file mode 100644 index 000000000000..cd0fd343fa4c --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/stub/agentregistrystubsettings/createservice/SyncCreateService.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.agentregistry.v1.stub.samples; + +// [START agentregistry_v1_generated_AgentRegistryStubSettings_CreateService_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.agentregistry.v1.stub.AgentRegistryStubSettings; +import java.time.Duration; + +public class SyncCreateService { + + public static void main(String[] args) throws Exception { + syncCreateService(); + } + + public static void syncCreateService() 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 + AgentRegistryStubSettings.Builder agentRegistrySettingsBuilder = + AgentRegistryStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + agentRegistrySettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END agentregistry_v1_generated_AgentRegistryStubSettings_CreateService_sync] diff --git a/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/stub/agentregistrystubsettings/getagent/SyncGetAgent.java b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/stub/agentregistrystubsettings/getagent/SyncGetAgent.java new file mode 100644 index 000000000000..add643c90c06 --- /dev/null +++ b/java-agentregistry/samples/snippets/generated/com/google/cloud/agentregistry/v1/stub/agentregistrystubsettings/getagent/SyncGetAgent.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.agentregistry.v1.stub.samples; + +// [START agentregistry_v1_generated_AgentRegistryStubSettings_GetAgent_sync] +import com.google.cloud.agentregistry.v1.stub.AgentRegistryStubSettings; +import java.time.Duration; + +public class SyncGetAgent { + + public static void main(String[] args) throws Exception { + syncGetAgent(); + } + + public static void syncGetAgent() 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 + AgentRegistryStubSettings.Builder agentRegistrySettingsBuilder = + AgentRegistryStubSettings.newBuilder(); + agentRegistrySettingsBuilder + .getAgentSettings() + .setRetrySettings( + agentRegistrySettingsBuilder + .getAgentSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + AgentRegistryStubSettings agentRegistrySettings = agentRegistrySettingsBuilder.build(); + } +} +// [END agentregistry_v1_generated_AgentRegistryStubSettings_GetAgent_sync] diff --git a/librarian.yaml b/librarian.yaml index 709d89c4e5a0..5f2148476ff9 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -98,6 +98,13 @@ libraries: api_description_override: An API for accessing Advisory Notifications in Google Cloud. name_pretty_override: Advisory Notifications API product_documentation_override: https://cloud.google.com/advisory-notifications/ + - name: agentregistry + version: 0.1.0-SNAPSHOT + apis: + - path: google/cloud/agentregistry/v1 + java: + additional_protos: + - path: google/cloud/location/locations.proto - name: aiplatform version: 3.95.0-SNAPSHOT apis: diff --git a/pom.xml b/pom.xml index 35237a8eb2a4..418733084c36 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,7 @@ java-accesscontextmanager java-admanager java-advisorynotifications + java-agentregistry java-aiplatform java-alloydb java-alloydb-connectors diff --git a/versions.txt b/versions.txt index 0134e3b1aeb0..65fea36e1238 100644 --- a/versions.txt +++ b/versions.txt @@ -1059,3 +1059,8 @@ google-cloud-developer-knowledge:0.1.0:0.2.0-SNAPSHOT proto-google-cloud-developer-knowledge-v1:0.1.0:0.2.0-SNAPSHOT grpc-google-cloud-developer-knowledge-v1:0.1.0:0.2.0-SNAPSHOT google-cloud-backstory:0.1.0:0.2.0-SNAPSHOT +proto-google-cloud-agentregistry-v1:0.0.0:0.1.0-SNAPSHOT +grpc-google-cloud-agentregistry-v1:0.0.0:0.1.0-SNAPSHOT +google-cloud-agentregistry:0.0.0:0.1.0-SNAPSHOT +google-cloud-agentregistry-bom:0.0.0:0.1.0-SNAPSHOT +google-cloud-agentregistry-parent:0.0.0:0.1.0-SNAPSHOT