google-cloud-agent_registry_endpoint-v1 0.a → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +151 -8
  5. data/lib/google/cloud/agent_registry_endpoint/v1/agent_registry_endpoint/client.rb +935 -0
  6. data/lib/google/cloud/agent_registry_endpoint/v1/agent_registry_endpoint/credentials.rb +50 -0
  7. data/lib/google/cloud/agent_registry_endpoint/v1/agent_registry_endpoint/rest/client.rb +857 -0
  8. data/lib/google/cloud/agent_registry_endpoint/v1/agent_registry_endpoint/rest/service_stub.rb +386 -0
  9. data/lib/google/cloud/agent_registry_endpoint/v1/agent_registry_endpoint/rest.rb +55 -0
  10. data/lib/google/cloud/agent_registry_endpoint/v1/agent_registry_endpoint.rb +58 -0
  11. data/lib/google/cloud/agent_registry_endpoint/v1/rest.rb +37 -0
  12. data/lib/google/cloud/agent_registry_endpoint/v1/version.rb +7 -2
  13. data/lib/google/cloud/agent_registry_endpoint/v1.rb +45 -0
  14. data/lib/google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service_pb.rb +35 -0
  15. data/lib/google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service_services_pb.rb +61 -0
  16. data/lib/google-cloud-agent_registry_endpoint-v1.rb +21 -0
  17. data/proto_docs/README.md +4 -0
  18. data/proto_docs/google/api/client.rb +593 -0
  19. data/proto_docs/google/api/field_behavior.rb +85 -0
  20. data/proto_docs/google/api/field_info.rb +88 -0
  21. data/proto_docs/google/api/launch_stage.rb +71 -0
  22. data/proto_docs/google/api/resource.rb +227 -0
  23. data/proto_docs/google/cloud/agentregistry/v1/agent.rb +168 -0
  24. data/proto_docs/google/cloud/agentregistry/v1/endpoint.rb +72 -0
  25. data/proto_docs/google/cloud/agentregistry/v1/mcp_server.rb +127 -0
  26. data/proto_docs/google/cloud/agentregistry/v1/properties.rb +53 -0
  27. data/proto_docs/google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service.rb +164 -0
  28. data/proto_docs/google/protobuf/duration.rb +98 -0
  29. data/proto_docs/google/protobuf/struct.rb +108 -0
  30. data/proto_docs/google/protobuf/timestamp.rb +128 -0
  31. metadata +83 -9
@@ -0,0 +1,857 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/agentregistryendpoint/v1/agentregistryendpoint_service_pb"
21
+ require "google/cloud/agent_registry_endpoint/v1/agent_registry_endpoint/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module AgentRegistryEndpoint
26
+ module V1
27
+ module AgentRegistryEndpoint
28
+ module Rest
29
+ ##
30
+ # REST client for the AgentRegistryEndpoint service.
31
+ #
32
+ # The localized dataplane API for Agent Registry.
33
+ #
34
+ # This service provides access to the local catalog of agents and tools,
35
+ # allowing agents at runtime to quickly and securely look up peer agents or
36
+ # tools without querying the global control plane.
37
+ #
38
+ class Client
39
+ # @private
40
+ API_VERSION = ""
41
+
42
+ # @private
43
+ DEFAULT_ENDPOINT_TEMPLATE = "agentregistryendpoint.$UNIVERSE_DOMAIN$"
44
+
45
+ # @private
46
+ attr_reader :agent_registry_endpoint_stub
47
+
48
+ ##
49
+ # Configure the AgentRegistryEndpoint Client class.
50
+ #
51
+ # See {::Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all AgentRegistryEndpoint clients
57
+ # ::Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.configure do |config|
58
+ # config.timeout = 10.0
59
+ # end
60
+ #
61
+ # @yield [config] Configure the Client client.
62
+ # @yieldparam config [Client::Configuration]
63
+ #
64
+ # @return [Client::Configuration]
65
+ #
66
+ def self.configure
67
+ @configure ||= begin
68
+ namespace = ["Google", "Cloud", "AgentRegistryEndpoint", "V1"]
69
+ parent_config = while namespace.any?
70
+ parent_name = namespace.join "::"
71
+ parent_const = const_get parent_name
72
+ break parent_const.configure if parent_const.respond_to? :configure
73
+ namespace.pop
74
+ end
75
+ default_config = Client::Configuration.new parent_config
76
+
77
+ default_config.rpcs.get_ai_application_mcp_server.timeout = 60.0
78
+ default_config.rpcs.get_ai_application_mcp_server.retry_policy = {
79
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
80
+ }
81
+
82
+ default_config.rpcs.get_ai_application_endpoint.timeout = 60.0
83
+ default_config.rpcs.get_ai_application_endpoint.retry_policy = {
84
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
85
+ }
86
+
87
+ default_config.rpcs.list_ai_application_agents.timeout = 60.0
88
+ default_config.rpcs.list_ai_application_agents.retry_policy = {
89
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
90
+ }
91
+
92
+ default_config.rpcs.list_ai_application_mcp_servers.timeout = 60.0
93
+ default_config.rpcs.list_ai_application_mcp_servers.retry_policy = {
94
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
95
+ }
96
+
97
+ default_config.rpcs.list_ai_application_endpoints.timeout = 60.0
98
+ default_config.rpcs.list_ai_application_endpoints.retry_policy = {
99
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
100
+ }
101
+
102
+ default_config
103
+ end
104
+ yield @configure if block_given?
105
+ @configure
106
+ end
107
+
108
+ ##
109
+ # Configure the AgentRegistryEndpoint Client instance.
110
+ #
111
+ # The configuration is set to the derived mode, meaning that values can be changed,
112
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
113
+ # should be made on {Client.configure}.
114
+ #
115
+ # See {::Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client::Configuration}
116
+ # for a description of the configuration fields.
117
+ #
118
+ # @yield [config] Configure the Client client.
119
+ # @yieldparam config [Client::Configuration]
120
+ #
121
+ # @return [Client::Configuration]
122
+ #
123
+ def configure
124
+ yield @config if block_given?
125
+ @config
126
+ end
127
+
128
+ ##
129
+ # The effective universe domain
130
+ #
131
+ # @return [String]
132
+ #
133
+ def universe_domain
134
+ @agent_registry_endpoint_stub.universe_domain
135
+ end
136
+
137
+ ##
138
+ # Create a new AgentRegistryEndpoint REST client object.
139
+ #
140
+ # @example
141
+ #
142
+ # # Create a client using the default configuration
143
+ # client = ::Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.new
144
+ #
145
+ # # Create a client using a custom configuration
146
+ # client = ::Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.new do |config|
147
+ # config.timeout = 10.0
148
+ # end
149
+ #
150
+ # @yield [config] Configure the AgentRegistryEndpoint client.
151
+ # @yieldparam config [Client::Configuration]
152
+ #
153
+ def initialize
154
+ # Create the configuration object
155
+ @config = Configuration.new Client.configure
156
+
157
+ # Yield the configuration if needed
158
+ yield @config if block_given?
159
+
160
+ # Create credentials
161
+ credentials = @config.credentials
162
+ # Use self-signed JWT if the endpoint is unchanged from default,
163
+ # but only if the default endpoint does not have a region prefix.
164
+ enable_self_signed_jwt = @config.endpoint.nil? ||
165
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
166
+ !@config.endpoint.split(".").first.include?("-"))
167
+ credentials ||= Credentials.default scope: @config.scope,
168
+ enable_self_signed_jwt: enable_self_signed_jwt
169
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
170
+ credentials = Credentials.new credentials, scope: @config.scope
171
+ end
172
+
173
+ @quota_project_id = @config.quota_project
174
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
175
+
176
+ @agent_registry_endpoint_stub = ::Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::ServiceStub.new(
177
+ endpoint: @config.endpoint,
178
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
179
+ universe_domain: @config.universe_domain,
180
+ credentials: credentials,
181
+ logger: @config.logger
182
+ )
183
+
184
+ @agent_registry_endpoint_stub.logger(stub: true)&.info do |entry|
185
+ entry.set_system_name
186
+ entry.set_service
187
+ entry.message = "Created client for #{entry.service}"
188
+ entry.set_credentials_fields credentials
189
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
190
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
191
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
192
+ end
193
+ end
194
+
195
+ ##
196
+ # The logger used for request/response debug logging.
197
+ #
198
+ # @return [Logger]
199
+ #
200
+ def logger
201
+ @agent_registry_endpoint_stub.logger
202
+ end
203
+
204
+ # Service calls
205
+
206
+ ##
207
+ # Gets an MCP server active within the localized dataplane of the AI
208
+ # Application.
209
+ #
210
+ # @overload get_ai_application_mcp_server(request, options = nil)
211
+ # Pass arguments to `get_ai_application_mcp_server` via a request object, either of type
212
+ # {::Google::Cloud::AgentRegistryEndpoint::V1::GetAiApplicationMcpServerRequest} or an equivalent Hash.
213
+ #
214
+ # @param request [::Google::Cloud::AgentRegistryEndpoint::V1::GetAiApplicationMcpServerRequest, ::Hash]
215
+ # A request object representing the call parameters. Required. To specify no
216
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
217
+ # @param options [::Gapic::CallOptions, ::Hash]
218
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
219
+ #
220
+ # @overload get_ai_application_mcp_server(name: nil)
221
+ # Pass arguments to `get_ai_application_mcp_server` via keyword arguments. Note that at
222
+ # least one keyword argument is required. To specify no parameters, or to keep all
223
+ # the default parameter values, pass an empty Hash as a request object (see above).
224
+ #
225
+ # @param name [::String]
226
+ # Required. The resource name of the MCP server, in the format
227
+ # `projects/{project}/locations/{location}/aiApplications/{ai_application}/mcpServers/{mcp_server}`.
228
+ # @yield [result, operation] Access the result along with the TransportOperation object
229
+ # @yieldparam result [::Google::Cloud::AgentRegistry::V1::McpServer]
230
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
231
+ #
232
+ # @return [::Google::Cloud::AgentRegistry::V1::McpServer]
233
+ #
234
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
235
+ #
236
+ # @example Basic example
237
+ # require "google/cloud/agent_registry_endpoint/v1"
238
+ #
239
+ # # Create a client object. The client can be reused for multiple calls.
240
+ # client = Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.new
241
+ #
242
+ # # Create a request. To set request fields, pass in keyword arguments.
243
+ # request = Google::Cloud::AgentRegistryEndpoint::V1::GetAiApplicationMcpServerRequest.new
244
+ #
245
+ # # Call the get_ai_application_mcp_server method.
246
+ # result = client.get_ai_application_mcp_server request
247
+ #
248
+ # # The returned object is of type Google::Cloud::AgentRegistry::V1::McpServer.
249
+ # p result
250
+ #
251
+ def get_ai_application_mcp_server request, options = nil
252
+ raise ::ArgumentError, "request must be provided" if request.nil?
253
+
254
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistryEndpoint::V1::GetAiApplicationMcpServerRequest
255
+
256
+ # Converts hash and nil to an options object
257
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
258
+
259
+ # Customize the options with defaults
260
+ call_metadata = @config.rpcs.get_ai_application_mcp_server.metadata.to_h
261
+
262
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
263
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
264
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
265
+ gapic_version: ::Google::Cloud::AgentRegistryEndpoint::V1::VERSION,
266
+ transports_version_send: [:rest]
267
+
268
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
269
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
270
+
271
+ options.apply_defaults timeout: @config.rpcs.get_ai_application_mcp_server.timeout,
272
+ metadata: call_metadata,
273
+ retry_policy: @config.rpcs.get_ai_application_mcp_server.retry_policy
274
+
275
+ options.apply_defaults timeout: @config.timeout,
276
+ metadata: @config.metadata,
277
+ retry_policy: @config.retry_policy
278
+
279
+ @agent_registry_endpoint_stub.get_ai_application_mcp_server request, options do |result, operation|
280
+ yield result, operation if block_given?
281
+ end
282
+ rescue ::Gapic::Rest::Error => e
283
+ raise ::Google::Cloud::Error.from_error(e)
284
+ end
285
+
286
+ ##
287
+ # Gets an endpoint active within the localized dataplane of the AI
288
+ # Application.
289
+ #
290
+ # @overload get_ai_application_endpoint(request, options = nil)
291
+ # Pass arguments to `get_ai_application_endpoint` via a request object, either of type
292
+ # {::Google::Cloud::AgentRegistryEndpoint::V1::GetAiApplicationEndpointRequest} or an equivalent Hash.
293
+ #
294
+ # @param request [::Google::Cloud::AgentRegistryEndpoint::V1::GetAiApplicationEndpointRequest, ::Hash]
295
+ # A request object representing the call parameters. Required. To specify no
296
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
297
+ # @param options [::Gapic::CallOptions, ::Hash]
298
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
299
+ #
300
+ # @overload get_ai_application_endpoint(name: nil)
301
+ # Pass arguments to `get_ai_application_endpoint` via keyword arguments. Note that at
302
+ # least one keyword argument is required. To specify no parameters, or to keep all
303
+ # the default parameter values, pass an empty Hash as a request object (see above).
304
+ #
305
+ # @param name [::String]
306
+ # Required. The resource name of the endpoint, in the format
307
+ # `projects/{project}/locations/{location}/aiApplications/{ai_application}/endpoints/{endpoint}`.
308
+ # @yield [result, operation] Access the result along with the TransportOperation object
309
+ # @yieldparam result [::Google::Cloud::AgentRegistry::V1::Endpoint]
310
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
311
+ #
312
+ # @return [::Google::Cloud::AgentRegistry::V1::Endpoint]
313
+ #
314
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
315
+ #
316
+ # @example Basic example
317
+ # require "google/cloud/agent_registry_endpoint/v1"
318
+ #
319
+ # # Create a client object. The client can be reused for multiple calls.
320
+ # client = Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.new
321
+ #
322
+ # # Create a request. To set request fields, pass in keyword arguments.
323
+ # request = Google::Cloud::AgentRegistryEndpoint::V1::GetAiApplicationEndpointRequest.new
324
+ #
325
+ # # Call the get_ai_application_endpoint method.
326
+ # result = client.get_ai_application_endpoint request
327
+ #
328
+ # # The returned object is of type Google::Cloud::AgentRegistry::V1::Endpoint.
329
+ # p result
330
+ #
331
+ def get_ai_application_endpoint request, options = nil
332
+ raise ::ArgumentError, "request must be provided" if request.nil?
333
+
334
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistryEndpoint::V1::GetAiApplicationEndpointRequest
335
+
336
+ # Converts hash and nil to an options object
337
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
338
+
339
+ # Customize the options with defaults
340
+ call_metadata = @config.rpcs.get_ai_application_endpoint.metadata.to_h
341
+
342
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
343
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
344
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
345
+ gapic_version: ::Google::Cloud::AgentRegistryEndpoint::V1::VERSION,
346
+ transports_version_send: [:rest]
347
+
348
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
349
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
350
+
351
+ options.apply_defaults timeout: @config.rpcs.get_ai_application_endpoint.timeout,
352
+ metadata: call_metadata,
353
+ retry_policy: @config.rpcs.get_ai_application_endpoint.retry_policy
354
+
355
+ options.apply_defaults timeout: @config.timeout,
356
+ metadata: @config.metadata,
357
+ retry_policy: @config.retry_policy
358
+
359
+ @agent_registry_endpoint_stub.get_ai_application_endpoint request, options do |result, operation|
360
+ yield result, operation if block_given?
361
+ end
362
+ rescue ::Gapic::Rest::Error => e
363
+ raise ::Google::Cloud::Error.from_error(e)
364
+ end
365
+
366
+ ##
367
+ # Lists agents active within the localized dataplane of the AI Application.
368
+ #
369
+ # @overload list_ai_application_agents(request, options = nil)
370
+ # Pass arguments to `list_ai_application_agents` via a request object, either of type
371
+ # {::Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationAgentsRequest} or an equivalent Hash.
372
+ #
373
+ # @param request [::Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationAgentsRequest, ::Hash]
374
+ # A request object representing the call parameters. Required. To specify no
375
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
376
+ # @param options [::Gapic::CallOptions, ::Hash]
377
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
378
+ #
379
+ # @overload list_ai_application_agents(parent: nil, page_size: nil, page_token: nil)
380
+ # Pass arguments to `list_ai_application_agents` via keyword arguments. Note that at
381
+ # least one keyword argument is required. To specify no parameters, or to keep all
382
+ # the default parameter values, pass an empty Hash as a request object (see above).
383
+ #
384
+ # @param parent [::String]
385
+ # Required. The parent resource name, in the format
386
+ # `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
387
+ # @param page_size [::Integer]
388
+ # Optional. The maximum number of agents to return. The service may return
389
+ # fewer than this value. If unspecified or set to `0`, at most 50 agents are
390
+ # returned. The maximum value is 100; values above 100 are coerced to 100.
391
+ # @param page_token [::String]
392
+ # Optional. A page token, received from a previous `ListAiApplicationAgents`
393
+ # call. Provide this to retrieve the subsequent page.
394
+ #
395
+ # When paginating, all other parameters provided to
396
+ # `ListAiApplicationAgents` must match the call that provided the page
397
+ # token.
398
+ # @yield [result, operation] Access the result along with the TransportOperation object
399
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>]
400
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
401
+ #
402
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>]
403
+ #
404
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
405
+ #
406
+ # @example Basic example
407
+ # require "google/cloud/agent_registry_endpoint/v1"
408
+ #
409
+ # # Create a client object. The client can be reused for multiple calls.
410
+ # client = Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.new
411
+ #
412
+ # # Create a request. To set request fields, pass in keyword arguments.
413
+ # request = Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationAgentsRequest.new
414
+ #
415
+ # # Call the list_ai_application_agents method.
416
+ # result = client.list_ai_application_agents request
417
+ #
418
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
419
+ # # over elements, and API calls will be issued to fetch pages as needed.
420
+ # result.each do |item|
421
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::Agent.
422
+ # p item
423
+ # end
424
+ #
425
+ def list_ai_application_agents request, options = nil
426
+ raise ::ArgumentError, "request must be provided" if request.nil?
427
+
428
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationAgentsRequest
429
+
430
+ # Converts hash and nil to an options object
431
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
432
+
433
+ # Customize the options with defaults
434
+ call_metadata = @config.rpcs.list_ai_application_agents.metadata.to_h
435
+
436
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
437
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
438
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
439
+ gapic_version: ::Google::Cloud::AgentRegistryEndpoint::V1::VERSION,
440
+ transports_version_send: [:rest]
441
+
442
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
443
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
444
+
445
+ options.apply_defaults timeout: @config.rpcs.list_ai_application_agents.timeout,
446
+ metadata: call_metadata,
447
+ retry_policy: @config.rpcs.list_ai_application_agents.retry_policy
448
+
449
+ options.apply_defaults timeout: @config.timeout,
450
+ metadata: @config.metadata,
451
+ retry_policy: @config.retry_policy
452
+
453
+ @agent_registry_endpoint_stub.list_ai_application_agents request, options do |result, operation|
454
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_endpoint_stub, :list_ai_application_agents, "agents", request, result, options
455
+ yield result, operation if block_given?
456
+ throw :response, result
457
+ end
458
+ rescue ::Gapic::Rest::Error => e
459
+ raise ::Google::Cloud::Error.from_error(e)
460
+ end
461
+
462
+ ##
463
+ # Lists MCP servers active within the localized dataplane of the AI
464
+ # Application.
465
+ #
466
+ # @overload list_ai_application_mcp_servers(request, options = nil)
467
+ # Pass arguments to `list_ai_application_mcp_servers` via a request object, either of type
468
+ # {::Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationMcpServersRequest} or an equivalent Hash.
469
+ #
470
+ # @param request [::Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationMcpServersRequest, ::Hash]
471
+ # A request object representing the call parameters. Required. To specify no
472
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
473
+ # @param options [::Gapic::CallOptions, ::Hash]
474
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
475
+ #
476
+ # @overload list_ai_application_mcp_servers(parent: nil, page_size: nil, page_token: nil)
477
+ # Pass arguments to `list_ai_application_mcp_servers` via keyword arguments. Note that at
478
+ # least one keyword argument is required. To specify no parameters, or to keep all
479
+ # the default parameter values, pass an empty Hash as a request object (see above).
480
+ #
481
+ # @param parent [::String]
482
+ # Required. The parent resource name, in the format
483
+ # `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
484
+ # @param page_size [::Integer]
485
+ # Optional. The maximum number of MCP servers to return. The service may
486
+ # return fewer than this value. If unspecified or set to `0`, at most 50 MCP
487
+ # servers are returned. The maximum value is 100; values above 100 are
488
+ # coerced to 100.
489
+ # @param page_token [::String]
490
+ # Optional. A page token, received from a previous
491
+ # `ListAiApplicationMcpServers` call. Provide this to retrieve the
492
+ # subsequent page.
493
+ #
494
+ # When paginating, all other parameters provided to
495
+ # `ListAiApplicationMcpServers` must match the call that provided the
496
+ # page token.
497
+ # @yield [result, operation] Access the result along with the TransportOperation object
498
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>]
499
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
500
+ #
501
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>]
502
+ #
503
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
504
+ #
505
+ # @example Basic example
506
+ # require "google/cloud/agent_registry_endpoint/v1"
507
+ #
508
+ # # Create a client object. The client can be reused for multiple calls.
509
+ # client = Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.new
510
+ #
511
+ # # Create a request. To set request fields, pass in keyword arguments.
512
+ # request = Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationMcpServersRequest.new
513
+ #
514
+ # # Call the list_ai_application_mcp_servers method.
515
+ # result = client.list_ai_application_mcp_servers request
516
+ #
517
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
518
+ # # over elements, and API calls will be issued to fetch pages as needed.
519
+ # result.each do |item|
520
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::McpServer.
521
+ # p item
522
+ # end
523
+ #
524
+ def list_ai_application_mcp_servers request, options = nil
525
+ raise ::ArgumentError, "request must be provided" if request.nil?
526
+
527
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationMcpServersRequest
528
+
529
+ # Converts hash and nil to an options object
530
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
531
+
532
+ # Customize the options with defaults
533
+ call_metadata = @config.rpcs.list_ai_application_mcp_servers.metadata.to_h
534
+
535
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
536
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
537
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
538
+ gapic_version: ::Google::Cloud::AgentRegistryEndpoint::V1::VERSION,
539
+ transports_version_send: [:rest]
540
+
541
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
542
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
543
+
544
+ options.apply_defaults timeout: @config.rpcs.list_ai_application_mcp_servers.timeout,
545
+ metadata: call_metadata,
546
+ retry_policy: @config.rpcs.list_ai_application_mcp_servers.retry_policy
547
+
548
+ options.apply_defaults timeout: @config.timeout,
549
+ metadata: @config.metadata,
550
+ retry_policy: @config.retry_policy
551
+
552
+ @agent_registry_endpoint_stub.list_ai_application_mcp_servers request, options do |result, operation|
553
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_endpoint_stub, :list_ai_application_mcp_servers, "mcp_servers", request, result, options
554
+ yield result, operation if block_given?
555
+ throw :response, result
556
+ end
557
+ rescue ::Gapic::Rest::Error => e
558
+ raise ::Google::Cloud::Error.from_error(e)
559
+ end
560
+
561
+ ##
562
+ # Lists endpoints active within the localized dataplane of the AI
563
+ # Application.
564
+ #
565
+ # @overload list_ai_application_endpoints(request, options = nil)
566
+ # Pass arguments to `list_ai_application_endpoints` via a request object, either of type
567
+ # {::Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationEndpointsRequest} or an equivalent Hash.
568
+ #
569
+ # @param request [::Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationEndpointsRequest, ::Hash]
570
+ # A request object representing the call parameters. Required. To specify no
571
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
572
+ # @param options [::Gapic::CallOptions, ::Hash]
573
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
574
+ #
575
+ # @overload list_ai_application_endpoints(parent: nil, page_size: nil, page_token: nil)
576
+ # Pass arguments to `list_ai_application_endpoints` via keyword arguments. Note that at
577
+ # least one keyword argument is required. To specify no parameters, or to keep all
578
+ # the default parameter values, pass an empty Hash as a request object (see above).
579
+ #
580
+ # @param parent [::String]
581
+ # Required. The parent resource name, in the format
582
+ # `projects/{project}/locations/{location}/aiApplications/{ai_application}`.
583
+ # @param page_size [::Integer]
584
+ # Optional. The maximum number of endpoints to return. The service may return
585
+ # fewer than this value. If unspecified or set to `0`, at most 50 endpoints
586
+ # are returned. The maximum value is 100; values above 100 are coerced to
587
+ # 100.
588
+ # @param page_token [::String]
589
+ # Optional. A page token, received from a previous
590
+ # `ListAiApplicationEndpoints` call. Provide this to retrieve the
591
+ # subsequent page.
592
+ #
593
+ # When paginating, all other parameters provided to
594
+ # `ListAiApplicationEndpoints` must match the call that provided the
595
+ # page token.
596
+ # @yield [result, operation] Access the result along with the TransportOperation object
597
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>]
598
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
599
+ #
600
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>]
601
+ #
602
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
603
+ #
604
+ # @example Basic example
605
+ # require "google/cloud/agent_registry_endpoint/v1"
606
+ #
607
+ # # Create a client object. The client can be reused for multiple calls.
608
+ # client = Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.new
609
+ #
610
+ # # Create a request. To set request fields, pass in keyword arguments.
611
+ # request = Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationEndpointsRequest.new
612
+ #
613
+ # # Call the list_ai_application_endpoints method.
614
+ # result = client.list_ai_application_endpoints request
615
+ #
616
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
617
+ # # over elements, and API calls will be issued to fetch pages as needed.
618
+ # result.each do |item|
619
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::Endpoint.
620
+ # p item
621
+ # end
622
+ #
623
+ def list_ai_application_endpoints request, options = nil
624
+ raise ::ArgumentError, "request must be provided" if request.nil?
625
+
626
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistryEndpoint::V1::ListAiApplicationEndpointsRequest
627
+
628
+ # Converts hash and nil to an options object
629
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
630
+
631
+ # Customize the options with defaults
632
+ call_metadata = @config.rpcs.list_ai_application_endpoints.metadata.to_h
633
+
634
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
635
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
636
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
637
+ gapic_version: ::Google::Cloud::AgentRegistryEndpoint::V1::VERSION,
638
+ transports_version_send: [:rest]
639
+
640
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
641
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
642
+
643
+ options.apply_defaults timeout: @config.rpcs.list_ai_application_endpoints.timeout,
644
+ metadata: call_metadata,
645
+ retry_policy: @config.rpcs.list_ai_application_endpoints.retry_policy
646
+
647
+ options.apply_defaults timeout: @config.timeout,
648
+ metadata: @config.metadata,
649
+ retry_policy: @config.retry_policy
650
+
651
+ @agent_registry_endpoint_stub.list_ai_application_endpoints request, options do |result, operation|
652
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_endpoint_stub, :list_ai_application_endpoints, "endpoints", request, result, options
653
+ yield result, operation if block_given?
654
+ throw :response, result
655
+ end
656
+ rescue ::Gapic::Rest::Error => e
657
+ raise ::Google::Cloud::Error.from_error(e)
658
+ end
659
+
660
+ ##
661
+ # Configuration class for the AgentRegistryEndpoint REST API.
662
+ #
663
+ # This class represents the configuration for AgentRegistryEndpoint REST,
664
+ # providing control over timeouts, retry behavior, logging, transport
665
+ # parameters, and other low-level controls. Certain parameters can also be
666
+ # applied individually to specific RPCs. See
667
+ # {::Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client::Configuration::Rpcs}
668
+ # for a list of RPCs that can be configured independently.
669
+ #
670
+ # Configuration can be applied globally to all clients, or to a single client
671
+ # on construction.
672
+ #
673
+ # @example
674
+ #
675
+ # # Modify the global config, setting the timeout for
676
+ # # get_ai_application_mcp_server to 20 seconds,
677
+ # # and all remaining timeouts to 10 seconds.
678
+ # ::Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.configure do |config|
679
+ # config.timeout = 10.0
680
+ # config.rpcs.get_ai_application_mcp_server.timeout = 20.0
681
+ # end
682
+ #
683
+ # # Apply the above configuration only to a new client.
684
+ # client = ::Google::Cloud::AgentRegistryEndpoint::V1::AgentRegistryEndpoint::Rest::Client.new do |config|
685
+ # config.timeout = 10.0
686
+ # config.rpcs.get_ai_application_mcp_server.timeout = 20.0
687
+ # end
688
+ #
689
+ # @!attribute [rw] endpoint
690
+ # A custom service endpoint, as a hostname or hostname:port. The default is
691
+ # nil, indicating to use the default endpoint in the current universe domain.
692
+ # @return [::String,nil]
693
+ # @!attribute [rw] credentials
694
+ # Credentials to send with calls. You may provide any of the following types:
695
+ # * (`String`) The path to a service account key file in JSON format
696
+ # * (`Hash`) A service account key as a Hash
697
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
698
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
699
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
700
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
701
+ # * (`nil`) indicating no credentials
702
+ #
703
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
704
+ # external source for authentication to Google Cloud, you must validate it before
705
+ # providing it to a Google API client library. Providing an unvalidated credential
706
+ # configuration to Google APIs can compromise the security of your systems and data.
707
+ # For more information, refer to [Validate credential configurations from external
708
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
709
+ # @return [::Object]
710
+ # @!attribute [rw] scope
711
+ # The OAuth scopes
712
+ # @return [::Array<::String>]
713
+ # @!attribute [rw] lib_name
714
+ # The library name as recorded in instrumentation and logging
715
+ # @return [::String]
716
+ # @!attribute [rw] lib_version
717
+ # The library version as recorded in instrumentation and logging
718
+ # @return [::String]
719
+ # @!attribute [rw] timeout
720
+ # The call timeout in seconds.
721
+ # @return [::Numeric]
722
+ # @!attribute [rw] metadata
723
+ # Additional headers to be sent with the call.
724
+ # @return [::Hash{::Symbol=>::String}]
725
+ # @!attribute [rw] retry_policy
726
+ # The retry policy. The value is a hash with the following keys:
727
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
728
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
729
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
730
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
731
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
732
+ # trigger a retry.
733
+ # @return [::Hash]
734
+ # @!attribute [rw] quota_project
735
+ # A separate project against which to charge quota.
736
+ # @return [::String]
737
+ # @!attribute [rw] universe_domain
738
+ # The universe domain within which to make requests. This determines the
739
+ # default endpoint URL. The default value of nil uses the environment
740
+ # universe (usually the default "googleapis.com" universe).
741
+ # @return [::String,nil]
742
+ # @!attribute [rw] logger
743
+ # A custom logger to use for request/response debug logging, or the value
744
+ # `:default` (the default) to construct a default logger, or `nil` to
745
+ # explicitly disable logging.
746
+ # @return [::Logger,:default,nil]
747
+ #
748
+ class Configuration
749
+ extend ::Gapic::Config
750
+
751
+ # @private
752
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
753
+ DEFAULT_ENDPOINT = "agentregistryendpoint.googleapis.com"
754
+
755
+ config_attr :endpoint, nil, ::String, nil
756
+ config_attr :credentials, nil do |value|
757
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
758
+ allowed.any? { |klass| klass === value }
759
+ end
760
+ config_attr :scope, nil, ::String, ::Array, nil
761
+ config_attr :lib_name, nil, ::String, nil
762
+ config_attr :lib_version, nil, ::String, nil
763
+ config_attr :timeout, nil, ::Numeric, nil
764
+ config_attr :metadata, nil, ::Hash, nil
765
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
766
+ config_attr :quota_project, nil, ::String, nil
767
+ config_attr :universe_domain, nil, ::String, nil
768
+ config_attr :logger, :default, ::Logger, nil, :default
769
+
770
+ # @private
771
+ def initialize parent_config = nil
772
+ @parent_config = parent_config unless parent_config.nil?
773
+
774
+ yield self if block_given?
775
+ end
776
+
777
+ ##
778
+ # Configurations for individual RPCs
779
+ # @return [Rpcs]
780
+ #
781
+ def rpcs
782
+ @rpcs ||= begin
783
+ parent_rpcs = nil
784
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
785
+ Rpcs.new parent_rpcs
786
+ end
787
+ end
788
+
789
+ ##
790
+ # Configuration RPC class for the AgentRegistryEndpoint API.
791
+ #
792
+ # Includes fields providing the configuration for each RPC in this service.
793
+ # Each configuration object is of type `Gapic::Config::Method` and includes
794
+ # the following configuration fields:
795
+ #
796
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
797
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
798
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
799
+ # include the following keys:
800
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
801
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
802
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
803
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
804
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
805
+ # trigger a retry.
806
+ #
807
+ class Rpcs
808
+ ##
809
+ # RPC-specific configuration for `get_ai_application_mcp_server`
810
+ # @return [::Gapic::Config::Method]
811
+ #
812
+ attr_reader :get_ai_application_mcp_server
813
+ ##
814
+ # RPC-specific configuration for `get_ai_application_endpoint`
815
+ # @return [::Gapic::Config::Method]
816
+ #
817
+ attr_reader :get_ai_application_endpoint
818
+ ##
819
+ # RPC-specific configuration for `list_ai_application_agents`
820
+ # @return [::Gapic::Config::Method]
821
+ #
822
+ attr_reader :list_ai_application_agents
823
+ ##
824
+ # RPC-specific configuration for `list_ai_application_mcp_servers`
825
+ # @return [::Gapic::Config::Method]
826
+ #
827
+ attr_reader :list_ai_application_mcp_servers
828
+ ##
829
+ # RPC-specific configuration for `list_ai_application_endpoints`
830
+ # @return [::Gapic::Config::Method]
831
+ #
832
+ attr_reader :list_ai_application_endpoints
833
+
834
+ # @private
835
+ def initialize parent_rpcs = nil
836
+ get_ai_application_mcp_server_config = parent_rpcs.get_ai_application_mcp_server if parent_rpcs.respond_to? :get_ai_application_mcp_server
837
+ @get_ai_application_mcp_server = ::Gapic::Config::Method.new get_ai_application_mcp_server_config
838
+ get_ai_application_endpoint_config = parent_rpcs.get_ai_application_endpoint if parent_rpcs.respond_to? :get_ai_application_endpoint
839
+ @get_ai_application_endpoint = ::Gapic::Config::Method.new get_ai_application_endpoint_config
840
+ list_ai_application_agents_config = parent_rpcs.list_ai_application_agents if parent_rpcs.respond_to? :list_ai_application_agents
841
+ @list_ai_application_agents = ::Gapic::Config::Method.new list_ai_application_agents_config
842
+ list_ai_application_mcp_servers_config = parent_rpcs.list_ai_application_mcp_servers if parent_rpcs.respond_to? :list_ai_application_mcp_servers
843
+ @list_ai_application_mcp_servers = ::Gapic::Config::Method.new list_ai_application_mcp_servers_config
844
+ list_ai_application_endpoints_config = parent_rpcs.list_ai_application_endpoints if parent_rpcs.respond_to? :list_ai_application_endpoints
845
+ @list_ai_application_endpoints = ::Gapic::Config::Method.new list_ai_application_endpoints_config
846
+
847
+ yield self if block_given?
848
+ end
849
+ end
850
+ end
851
+ end
852
+ end
853
+ end
854
+ end
855
+ end
856
+ end
857
+ end