google-cloud-agent_registry-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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/agent_registry/v1/agent_registry/client.rb +2651 -0
  6. data/lib/google/cloud/agent_registry/v1/agent_registry/credentials.rb +50 -0
  7. data/lib/google/cloud/agent_registry/v1/agent_registry/operations.rb +843 -0
  8. data/lib/google/cloud/agent_registry/v1/agent_registry/paths.rb +145 -0
  9. data/lib/google/cloud/agent_registry/v1/agent_registry/rest/client.rb +2483 -0
  10. data/lib/google/cloud/agent_registry/v1/agent_registry/rest/operations.rb +927 -0
  11. data/lib/google/cloud/agent_registry/v1/agent_registry/rest/service_stub.rb +1246 -0
  12. data/lib/google/cloud/agent_registry/v1/agent_registry/rest.rb +54 -0
  13. data/lib/google/cloud/agent_registry/v1/agent_registry.rb +56 -0
  14. data/lib/google/cloud/agent_registry/v1/bindings_override.rb +75 -0
  15. data/lib/google/cloud/agent_registry/v1/rest.rb +38 -0
  16. data/lib/google/cloud/agent_registry/v1/version.rb +7 -2
  17. data/lib/google/cloud/agent_registry/v1.rb +45 -0
  18. data/lib/google/cloud/agentregistry/v1/agent_pb.rb +33 -0
  19. data/lib/google/cloud/agentregistry/v1/agentregistry_service_pb.rb +63 -0
  20. data/lib/google/cloud/agentregistry/v1/agentregistry_service_services_pb.rb +81 -0
  21. data/lib/google/cloud/agentregistry/v1/binding_pb.rb +28 -0
  22. data/lib/google/cloud/agentregistry/v1/endpoint_pb.rb +27 -0
  23. data/lib/google/cloud/agentregistry/v1/mcp_server_pb.rb +29 -0
  24. data/lib/google/cloud/agentregistry/v1/properties_pb.rb +24 -0
  25. data/lib/google/cloud/agentregistry/v1/service_pb.rb +33 -0
  26. data/lib/google-cloud-agent_registry-v1.rb +21 -0
  27. data/proto_docs/README.md +4 -0
  28. data/proto_docs/google/api/client.rb +593 -0
  29. data/proto_docs/google/api/field_behavior.rb +85 -0
  30. data/proto_docs/google/api/field_info.rb +88 -0
  31. data/proto_docs/google/api/launch_stage.rb +71 -0
  32. data/proto_docs/google/api/resource.rb +227 -0
  33. data/proto_docs/google/cloud/agentregistry/v1/agent.rb +168 -0
  34. data/proto_docs/google/cloud/agentregistry/v1/agentregistry_service.rb +691 -0
  35. data/proto_docs/google/cloud/agentregistry/v1/binding.rb +105 -0
  36. data/proto_docs/google/cloud/agentregistry/v1/endpoint.rb +72 -0
  37. data/proto_docs/google/cloud/agentregistry/v1/mcp_server.rb +123 -0
  38. data/proto_docs/google/cloud/agentregistry/v1/properties.rb +53 -0
  39. data/proto_docs/google/cloud/agentregistry/v1/service.rb +155 -0
  40. data/proto_docs/google/longrunning/operations.rb +191 -0
  41. data/proto_docs/google/protobuf/any.rb +145 -0
  42. data/proto_docs/google/protobuf/duration.rb +98 -0
  43. data/proto_docs/google/protobuf/empty.rb +34 -0
  44. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  45. data/proto_docs/google/protobuf/struct.rb +108 -0
  46. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  47. data/proto_docs/google/rpc/status.rb +48 -0
  48. metadata +99 -9
@@ -0,0 +1,2483 @@
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/agentregistry/v1/agentregistry_service_pb"
21
+ require "google/cloud/agent_registry/v1/agent_registry/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module AgentRegistry
27
+ module V1
28
+ module AgentRegistry
29
+ module Rest
30
+ ##
31
+ # REST client for the AgentRegistry service.
32
+ #
33
+ # Service for managing Agents, Endpoints, McpServers, Services, and Bindings.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "agentregistry.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :agent_registry_stub
46
+
47
+ ##
48
+ # Configure the AgentRegistry Client class.
49
+ #
50
+ # See {::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all AgentRegistry clients
56
+ # ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "AgentRegistry", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.rpcs.list_agents.timeout = 60.0
77
+ default_config.rpcs.list_agents.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config.rpcs.search_agents.timeout = 60.0
82
+ default_config.rpcs.search_agents.retry_policy = {
83
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
84
+ }
85
+
86
+ default_config.rpcs.get_agent.timeout = 60.0
87
+ default_config.rpcs.get_agent.retry_policy = {
88
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
89
+ }
90
+
91
+ default_config.rpcs.list_endpoints.timeout = 60.0
92
+ default_config.rpcs.list_endpoints.retry_policy = {
93
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
+ }
95
+
96
+ default_config.rpcs.get_endpoint.timeout = 60.0
97
+ default_config.rpcs.get_endpoint.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config.rpcs.list_mcp_servers.timeout = 60.0
102
+ default_config.rpcs.list_mcp_servers.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.search_mcp_servers.timeout = 60.0
107
+ default_config.rpcs.search_mcp_servers.retry_policy = {
108
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
109
+ }
110
+
111
+ default_config.rpcs.get_mcp_server.timeout = 60.0
112
+ default_config.rpcs.get_mcp_server.retry_policy = {
113
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
114
+ }
115
+
116
+ default_config.rpcs.list_services.timeout = 60.0
117
+ default_config.rpcs.list_services.retry_policy = {
118
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
119
+ }
120
+
121
+ default_config.rpcs.get_service.timeout = 60.0
122
+ default_config.rpcs.get_service.retry_policy = {
123
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
124
+ }
125
+
126
+ default_config.rpcs.create_service.timeout = 60.0
127
+
128
+ default_config.rpcs.update_service.timeout = 60.0
129
+
130
+ default_config.rpcs.delete_service.timeout = 60.0
131
+
132
+ default_config.rpcs.list_bindings.timeout = 60.0
133
+ default_config.rpcs.list_bindings.retry_policy = {
134
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
135
+ }
136
+
137
+ default_config.rpcs.get_binding.timeout = 60.0
138
+ default_config.rpcs.get_binding.retry_policy = {
139
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
140
+ }
141
+
142
+ default_config.rpcs.create_binding.timeout = 60.0
143
+
144
+ default_config.rpcs.update_binding.timeout = 60.0
145
+
146
+ default_config.rpcs.delete_binding.timeout = 60.0
147
+
148
+ default_config.rpcs.fetch_available_bindings.timeout = 60.0
149
+ default_config.rpcs.fetch_available_bindings.retry_policy = {
150
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
151
+ }
152
+
153
+ default_config
154
+ end
155
+ yield @configure if block_given?
156
+ @configure
157
+ end
158
+
159
+ ##
160
+ # Configure the AgentRegistry Client instance.
161
+ #
162
+ # The configuration is set to the derived mode, meaning that values can be changed,
163
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
164
+ # should be made on {Client.configure}.
165
+ #
166
+ # See {::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client::Configuration}
167
+ # for a description of the configuration fields.
168
+ #
169
+ # @yield [config] Configure the Client client.
170
+ # @yieldparam config [Client::Configuration]
171
+ #
172
+ # @return [Client::Configuration]
173
+ #
174
+ def configure
175
+ yield @config if block_given?
176
+ @config
177
+ end
178
+
179
+ ##
180
+ # The effective universe domain
181
+ #
182
+ # @return [String]
183
+ #
184
+ def universe_domain
185
+ @agent_registry_stub.universe_domain
186
+ end
187
+
188
+ ##
189
+ # Create a new AgentRegistry REST client object.
190
+ #
191
+ # @example
192
+ #
193
+ # # Create a client using the default configuration
194
+ # client = ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
195
+ #
196
+ # # Create a client using a custom configuration
197
+ # client = ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new do |config|
198
+ # config.timeout = 10.0
199
+ # end
200
+ #
201
+ # @yield [config] Configure the AgentRegistry client.
202
+ # @yieldparam config [Client::Configuration]
203
+ #
204
+ def initialize
205
+ # Create the configuration object
206
+ @config = Configuration.new Client.configure
207
+
208
+ # Yield the configuration if needed
209
+ yield @config if block_given?
210
+
211
+ # Create credentials
212
+ credentials = @config.credentials
213
+ # Use self-signed JWT if the endpoint is unchanged from default,
214
+ # but only if the default endpoint does not have a region prefix.
215
+ enable_self_signed_jwt = @config.endpoint.nil? ||
216
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
217
+ !@config.endpoint.split(".").first.include?("-"))
218
+ credentials ||= Credentials.default scope: @config.scope,
219
+ enable_self_signed_jwt: enable_self_signed_jwt
220
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
221
+ credentials = Credentials.new credentials, scope: @config.scope
222
+ end
223
+
224
+ @quota_project_id = @config.quota_project
225
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
226
+
227
+ @operations_client = ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Operations.new do |config|
228
+ config.credentials = credentials
229
+ config.quota_project = @quota_project_id
230
+ config.endpoint = @config.endpoint
231
+ config.universe_domain = @config.universe_domain
232
+ end
233
+
234
+ @agent_registry_stub = ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::ServiceStub.new(
235
+ endpoint: @config.endpoint,
236
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
237
+ universe_domain: @config.universe_domain,
238
+ credentials: credentials,
239
+ logger: @config.logger
240
+ )
241
+
242
+ @agent_registry_stub.logger(stub: true)&.info do |entry|
243
+ entry.set_system_name
244
+ entry.set_service
245
+ entry.message = "Created client for #{entry.service}"
246
+ entry.set_credentials_fields credentials
247
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
248
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
249
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
250
+ end
251
+
252
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
253
+ config.credentials = credentials
254
+ config.quota_project = @quota_project_id
255
+ config.endpoint = @agent_registry_stub.endpoint
256
+ config.universe_domain = @agent_registry_stub.universe_domain
257
+ config.bindings_override = @config.bindings_override
258
+ config.logger = @agent_registry_stub.logger if config.respond_to? :logger=
259
+ end
260
+ end
261
+
262
+ ##
263
+ # Get the associated client for long-running operations.
264
+ #
265
+ # @return [::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Operations]
266
+ #
267
+ attr_reader :operations_client
268
+
269
+ ##
270
+ # Get the associated client for mix-in of the Locations.
271
+ #
272
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
273
+ #
274
+ attr_reader :location_client
275
+
276
+ ##
277
+ # The logger used for request/response debug logging.
278
+ #
279
+ # @return [Logger]
280
+ #
281
+ def logger
282
+ @agent_registry_stub.logger
283
+ end
284
+
285
+ # Service calls
286
+
287
+ ##
288
+ # Lists Agents in a given project and location.
289
+ #
290
+ # @overload list_agents(request, options = nil)
291
+ # Pass arguments to `list_agents` via a request object, either of type
292
+ # {::Google::Cloud::AgentRegistry::V1::ListAgentsRequest} or an equivalent Hash.
293
+ #
294
+ # @param request [::Google::Cloud::AgentRegistry::V1::ListAgentsRequest, ::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 list_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
301
+ # Pass arguments to `list_agents` 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 parent [::String]
306
+ # Required. Parent value for ListAgentsRequest
307
+ # @param page_size [::Integer]
308
+ # Optional. Requested page size. Server may return fewer items than
309
+ # requested. If unspecified, server will pick an appropriate default.
310
+ # @param page_token [::String]
311
+ # Optional. A token identifying a page of results the server should return.
312
+ # @param filter [::String]
313
+ # Optional. Filtering results
314
+ # @param order_by [::String]
315
+ # Optional. Hint for how to order the results
316
+ # @yield [result, operation] Access the result along with the TransportOperation object
317
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>]
318
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
319
+ #
320
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>]
321
+ #
322
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
323
+ #
324
+ # @example Basic example
325
+ # require "google/cloud/agent_registry/v1"
326
+ #
327
+ # # Create a client object. The client can be reused for multiple calls.
328
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
329
+ #
330
+ # # Create a request. To set request fields, pass in keyword arguments.
331
+ # request = Google::Cloud::AgentRegistry::V1::ListAgentsRequest.new
332
+ #
333
+ # # Call the list_agents method.
334
+ # result = client.list_agents request
335
+ #
336
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
337
+ # # over elements, and API calls will be issued to fetch pages as needed.
338
+ # result.each do |item|
339
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::Agent.
340
+ # p item
341
+ # end
342
+ #
343
+ def list_agents request, options = nil
344
+ raise ::ArgumentError, "request must be provided" if request.nil?
345
+
346
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::ListAgentsRequest
347
+
348
+ # Converts hash and nil to an options object
349
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
350
+
351
+ # Customize the options with defaults
352
+ call_metadata = @config.rpcs.list_agents.metadata.to_h
353
+
354
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
355
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
356
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
357
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
358
+ transports_version_send: [:rest]
359
+
360
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
361
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
362
+
363
+ options.apply_defaults timeout: @config.rpcs.list_agents.timeout,
364
+ metadata: call_metadata,
365
+ retry_policy: @config.rpcs.list_agents.retry_policy
366
+
367
+ options.apply_defaults timeout: @config.timeout,
368
+ metadata: @config.metadata,
369
+ retry_policy: @config.retry_policy
370
+
371
+ @agent_registry_stub.list_agents request, options do |result, operation|
372
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_stub, :list_agents, "agents", request, result, options
373
+ yield result, operation if block_given?
374
+ throw :response, result
375
+ end
376
+ rescue ::Gapic::Rest::Error => e
377
+ raise ::Google::Cloud::Error.from_error(e)
378
+ end
379
+
380
+ ##
381
+ # Searches Agents in a given project and location.
382
+ #
383
+ # @overload search_agents(request, options = nil)
384
+ # Pass arguments to `search_agents` via a request object, either of type
385
+ # {::Google::Cloud::AgentRegistry::V1::SearchAgentsRequest} or an equivalent Hash.
386
+ #
387
+ # @param request [::Google::Cloud::AgentRegistry::V1::SearchAgentsRequest, ::Hash]
388
+ # A request object representing the call parameters. Required. To specify no
389
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
390
+ # @param options [::Gapic::CallOptions, ::Hash]
391
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
392
+ #
393
+ # @overload search_agents(parent: nil, search_string: nil, page_size: nil, page_token: nil)
394
+ # Pass arguments to `search_agents` via keyword arguments. Note that at
395
+ # least one keyword argument is required. To specify no parameters, or to keep all
396
+ # the default parameter values, pass an empty Hash as a request object (see above).
397
+ #
398
+ # @param parent [::String]
399
+ # Required. Parent value for SearchAgentsRequest. Format:
400
+ # `projects/{project}/locations/{location}`.
401
+ # @param search_string [::String]
402
+ # Optional. Search criteria used to select the Agents to return. If no search
403
+ # criteria is specified then all accessible Agents will be returned.
404
+ #
405
+ # Search expressions can be used to restrict results based upon searchable
406
+ # fields, where the operators can be used along with the suffix wildcard
407
+ # symbol `*`. See
408
+ # [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
409
+ # for more details.
410
+ #
411
+ # Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
412
+ #
413
+ # Searchable fields:
414
+ #
415
+ # | Field | `=` | `:` | `*` | Keyword Search |
416
+ # |--------------------|-----|-----|-----|----------------|
417
+ # | agentId | Yes | Yes | Yes | Included |
418
+ # | name | No | Yes | Yes | Included |
419
+ # | displayName | No | Yes | Yes | Included |
420
+ # | description | No | Yes | No | Included |
421
+ # | skills | No | Yes | No | Included |
422
+ # | skills.id | No | Yes | No | Included |
423
+ # | skills.name | No | Yes | No | Included |
424
+ # | skills.description | No | Yes | No | Included |
425
+ # | skills.tags | No | Yes | No | Included |
426
+ # | skills.examples | No | Yes | No | Included |
427
+ #
428
+ # Examples:
429
+ #
430
+ # * `agentId="urn:agent:projects-123:projects:123:locations:us-central1:reasoningEngines:1234"`
431
+ # to find the agent with the specified agent ID.
432
+ # * `name:important` to find agents whose name contains `important` as a
433
+ # word.
434
+ # * `displayName:works*` to find agents whose display name contains words
435
+ # that start with `works`.
436
+ # * `skills.tags:test` to find agents whose skills tags contain `test`.
437
+ # * `planner OR booking` to find agents whose metadata contains the words
438
+ # `planner` or `booking`.
439
+ # @param page_size [::Integer]
440
+ # Optional. The maximum number of search results to return per page. The page
441
+ # size is capped at `100`, even if a larger value is specified. A negative
442
+ # value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
443
+ # `0`, a default value of `20` will be used. The server may return fewer
444
+ # results than requested.
445
+ # @param page_token [::String]
446
+ # Optional. If present, retrieve the next batch of results from the preceding
447
+ # call to this method. `page_token` must be the value of `next_page_token`
448
+ # from the previous response. The values of all other method parameters, must
449
+ # be identical to those in the previous call.
450
+ # @yield [result, operation] Access the result along with the TransportOperation object
451
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>]
452
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
453
+ #
454
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Agent>]
455
+ #
456
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
457
+ #
458
+ # @example Basic example
459
+ # require "google/cloud/agent_registry/v1"
460
+ #
461
+ # # Create a client object. The client can be reused for multiple calls.
462
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
463
+ #
464
+ # # Create a request. To set request fields, pass in keyword arguments.
465
+ # request = Google::Cloud::AgentRegistry::V1::SearchAgentsRequest.new
466
+ #
467
+ # # Call the search_agents method.
468
+ # result = client.search_agents request
469
+ #
470
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
471
+ # # over elements, and API calls will be issued to fetch pages as needed.
472
+ # result.each do |item|
473
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::Agent.
474
+ # p item
475
+ # end
476
+ #
477
+ def search_agents request, options = nil
478
+ raise ::ArgumentError, "request must be provided" if request.nil?
479
+
480
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::SearchAgentsRequest
481
+
482
+ # Converts hash and nil to an options object
483
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
484
+
485
+ # Customize the options with defaults
486
+ call_metadata = @config.rpcs.search_agents.metadata.to_h
487
+
488
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
489
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
490
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
491
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
492
+ transports_version_send: [:rest]
493
+
494
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
495
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
496
+
497
+ options.apply_defaults timeout: @config.rpcs.search_agents.timeout,
498
+ metadata: call_metadata,
499
+ retry_policy: @config.rpcs.search_agents.retry_policy
500
+
501
+ options.apply_defaults timeout: @config.timeout,
502
+ metadata: @config.metadata,
503
+ retry_policy: @config.retry_policy
504
+
505
+ @agent_registry_stub.search_agents request, options do |result, operation|
506
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_stub, :search_agents, "agents", request, result, options
507
+ yield result, operation if block_given?
508
+ throw :response, result
509
+ end
510
+ rescue ::Gapic::Rest::Error => e
511
+ raise ::Google::Cloud::Error.from_error(e)
512
+ end
513
+
514
+ ##
515
+ # Gets details of a single Agent.
516
+ #
517
+ # @overload get_agent(request, options = nil)
518
+ # Pass arguments to `get_agent` via a request object, either of type
519
+ # {::Google::Cloud::AgentRegistry::V1::GetAgentRequest} or an equivalent Hash.
520
+ #
521
+ # @param request [::Google::Cloud::AgentRegistry::V1::GetAgentRequest, ::Hash]
522
+ # A request object representing the call parameters. Required. To specify no
523
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
524
+ # @param options [::Gapic::CallOptions, ::Hash]
525
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
526
+ #
527
+ # @overload get_agent(name: nil)
528
+ # Pass arguments to `get_agent` via keyword arguments. Note that at
529
+ # least one keyword argument is required. To specify no parameters, or to keep all
530
+ # the default parameter values, pass an empty Hash as a request object (see above).
531
+ #
532
+ # @param name [::String]
533
+ # Required. Name of the resource
534
+ # @yield [result, operation] Access the result along with the TransportOperation object
535
+ # @yieldparam result [::Google::Cloud::AgentRegistry::V1::Agent]
536
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
537
+ #
538
+ # @return [::Google::Cloud::AgentRegistry::V1::Agent]
539
+ #
540
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
541
+ #
542
+ # @example Basic example
543
+ # require "google/cloud/agent_registry/v1"
544
+ #
545
+ # # Create a client object. The client can be reused for multiple calls.
546
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
547
+ #
548
+ # # Create a request. To set request fields, pass in keyword arguments.
549
+ # request = Google::Cloud::AgentRegistry::V1::GetAgentRequest.new
550
+ #
551
+ # # Call the get_agent method.
552
+ # result = client.get_agent request
553
+ #
554
+ # # The returned object is of type Google::Cloud::AgentRegistry::V1::Agent.
555
+ # p result
556
+ #
557
+ def get_agent request, options = nil
558
+ raise ::ArgumentError, "request must be provided" if request.nil?
559
+
560
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::GetAgentRequest
561
+
562
+ # Converts hash and nil to an options object
563
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
564
+
565
+ # Customize the options with defaults
566
+ call_metadata = @config.rpcs.get_agent.metadata.to_h
567
+
568
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
569
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
570
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
571
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
572
+ transports_version_send: [:rest]
573
+
574
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
575
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
576
+
577
+ options.apply_defaults timeout: @config.rpcs.get_agent.timeout,
578
+ metadata: call_metadata,
579
+ retry_policy: @config.rpcs.get_agent.retry_policy
580
+
581
+ options.apply_defaults timeout: @config.timeout,
582
+ metadata: @config.metadata,
583
+ retry_policy: @config.retry_policy
584
+
585
+ @agent_registry_stub.get_agent request, options do |result, operation|
586
+ yield result, operation if block_given?
587
+ end
588
+ rescue ::Gapic::Rest::Error => e
589
+ raise ::Google::Cloud::Error.from_error(e)
590
+ end
591
+
592
+ ##
593
+ # Lists Endpoints in a given project and location.
594
+ #
595
+ # @overload list_endpoints(request, options = nil)
596
+ # Pass arguments to `list_endpoints` via a request object, either of type
597
+ # {::Google::Cloud::AgentRegistry::V1::ListEndpointsRequest} or an equivalent Hash.
598
+ #
599
+ # @param request [::Google::Cloud::AgentRegistry::V1::ListEndpointsRequest, ::Hash]
600
+ # A request object representing the call parameters. Required. To specify no
601
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
602
+ # @param options [::Gapic::CallOptions, ::Hash]
603
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
604
+ #
605
+ # @overload list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil)
606
+ # Pass arguments to `list_endpoints` via keyword arguments. Note that at
607
+ # least one keyword argument is required. To specify no parameters, or to keep all
608
+ # the default parameter values, pass an empty Hash as a request object (see above).
609
+ #
610
+ # @param parent [::String]
611
+ # Required. The project and location to list endpoints in.
612
+ # Expected format: `projects/{project}/locations/{location}`.
613
+ # @param page_size [::Integer]
614
+ # Optional. Requested page size. Server may return fewer items than
615
+ # requested. If unspecified, server will pick an appropriate default.
616
+ # @param page_token [::String]
617
+ # Optional. A token identifying a page of results the server should return.
618
+ # @param filter [::String]
619
+ # Optional. A query string used to filter the list of endpoints returned.
620
+ # The filter expression must follow AIP-160 syntax.
621
+ #
622
+ # Filtering is supported on the `name`, `display_name`, `description`,
623
+ # `version`, and `interfaces` fields.
624
+ #
625
+ # Some examples:
626
+ #
627
+ # * `name = "projects/p1/locations/l1/endpoints/e1"`
628
+ # * `display_name = "my-endpoint"`
629
+ # * `description = "my-endpoint-description"`
630
+ # * `version = "v1"`
631
+ # * `interfaces.transport = "HTTP_JSON"`
632
+ # @yield [result, operation] Access the result along with the TransportOperation object
633
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>]
634
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
635
+ #
636
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Endpoint>]
637
+ #
638
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
639
+ #
640
+ # @example Basic example
641
+ # require "google/cloud/agent_registry/v1"
642
+ #
643
+ # # Create a client object. The client can be reused for multiple calls.
644
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
645
+ #
646
+ # # Create a request. To set request fields, pass in keyword arguments.
647
+ # request = Google::Cloud::AgentRegistry::V1::ListEndpointsRequest.new
648
+ #
649
+ # # Call the list_endpoints method.
650
+ # result = client.list_endpoints request
651
+ #
652
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
653
+ # # over elements, and API calls will be issued to fetch pages as needed.
654
+ # result.each do |item|
655
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::Endpoint.
656
+ # p item
657
+ # end
658
+ #
659
+ def list_endpoints request, options = nil
660
+ raise ::ArgumentError, "request must be provided" if request.nil?
661
+
662
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::ListEndpointsRequest
663
+
664
+ # Converts hash and nil to an options object
665
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
666
+
667
+ # Customize the options with defaults
668
+ call_metadata = @config.rpcs.list_endpoints.metadata.to_h
669
+
670
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
671
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
672
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
673
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
674
+ transports_version_send: [:rest]
675
+
676
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
677
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
678
+
679
+ options.apply_defaults timeout: @config.rpcs.list_endpoints.timeout,
680
+ metadata: call_metadata,
681
+ retry_policy: @config.rpcs.list_endpoints.retry_policy
682
+
683
+ options.apply_defaults timeout: @config.timeout,
684
+ metadata: @config.metadata,
685
+ retry_policy: @config.retry_policy
686
+
687
+ @agent_registry_stub.list_endpoints request, options do |result, operation|
688
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_stub, :list_endpoints, "endpoints", request, result, options
689
+ yield result, operation if block_given?
690
+ throw :response, result
691
+ end
692
+ rescue ::Gapic::Rest::Error => e
693
+ raise ::Google::Cloud::Error.from_error(e)
694
+ end
695
+
696
+ ##
697
+ # Gets details of a single Endpoint.
698
+ #
699
+ # @overload get_endpoint(request, options = nil)
700
+ # Pass arguments to `get_endpoint` via a request object, either of type
701
+ # {::Google::Cloud::AgentRegistry::V1::GetEndpointRequest} or an equivalent Hash.
702
+ #
703
+ # @param request [::Google::Cloud::AgentRegistry::V1::GetEndpointRequest, ::Hash]
704
+ # A request object representing the call parameters. Required. To specify no
705
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
706
+ # @param options [::Gapic::CallOptions, ::Hash]
707
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
708
+ #
709
+ # @overload get_endpoint(name: nil)
710
+ # Pass arguments to `get_endpoint` via keyword arguments. Note that at
711
+ # least one keyword argument is required. To specify no parameters, or to keep all
712
+ # the default parameter values, pass an empty Hash as a request object (see above).
713
+ #
714
+ # @param name [::String]
715
+ # Required. The name of the endpoint to retrieve.
716
+ # Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
717
+ # @yield [result, operation] Access the result along with the TransportOperation object
718
+ # @yieldparam result [::Google::Cloud::AgentRegistry::V1::Endpoint]
719
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
720
+ #
721
+ # @return [::Google::Cloud::AgentRegistry::V1::Endpoint]
722
+ #
723
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
724
+ #
725
+ # @example Basic example
726
+ # require "google/cloud/agent_registry/v1"
727
+ #
728
+ # # Create a client object. The client can be reused for multiple calls.
729
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
730
+ #
731
+ # # Create a request. To set request fields, pass in keyword arguments.
732
+ # request = Google::Cloud::AgentRegistry::V1::GetEndpointRequest.new
733
+ #
734
+ # # Call the get_endpoint method.
735
+ # result = client.get_endpoint request
736
+ #
737
+ # # The returned object is of type Google::Cloud::AgentRegistry::V1::Endpoint.
738
+ # p result
739
+ #
740
+ def get_endpoint request, options = nil
741
+ raise ::ArgumentError, "request must be provided" if request.nil?
742
+
743
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::GetEndpointRequest
744
+
745
+ # Converts hash and nil to an options object
746
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
747
+
748
+ # Customize the options with defaults
749
+ call_metadata = @config.rpcs.get_endpoint.metadata.to_h
750
+
751
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
752
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
753
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
754
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
755
+ transports_version_send: [:rest]
756
+
757
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
758
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
759
+
760
+ options.apply_defaults timeout: @config.rpcs.get_endpoint.timeout,
761
+ metadata: call_metadata,
762
+ retry_policy: @config.rpcs.get_endpoint.retry_policy
763
+
764
+ options.apply_defaults timeout: @config.timeout,
765
+ metadata: @config.metadata,
766
+ retry_policy: @config.retry_policy
767
+
768
+ @agent_registry_stub.get_endpoint request, options do |result, operation|
769
+ yield result, operation if block_given?
770
+ end
771
+ rescue ::Gapic::Rest::Error => e
772
+ raise ::Google::Cloud::Error.from_error(e)
773
+ end
774
+
775
+ ##
776
+ # Lists McpServers in a given project and location.
777
+ #
778
+ # @overload list_mcp_servers(request, options = nil)
779
+ # Pass arguments to `list_mcp_servers` via a request object, either of type
780
+ # {::Google::Cloud::AgentRegistry::V1::ListMcpServersRequest} or an equivalent Hash.
781
+ #
782
+ # @param request [::Google::Cloud::AgentRegistry::V1::ListMcpServersRequest, ::Hash]
783
+ # A request object representing the call parameters. Required. To specify no
784
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
785
+ # @param options [::Gapic::CallOptions, ::Hash]
786
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
787
+ #
788
+ # @overload list_mcp_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
789
+ # Pass arguments to `list_mcp_servers` via keyword arguments. Note that at
790
+ # least one keyword argument is required. To specify no parameters, or to keep all
791
+ # the default parameter values, pass an empty Hash as a request object (see above).
792
+ #
793
+ # @param parent [::String]
794
+ # Required. Parent value for ListMcpServersRequest. Format:
795
+ # `projects/{project}/locations/{location}`.
796
+ # @param page_size [::Integer]
797
+ # Optional. Requested page size. Server may return fewer items than
798
+ # requested. If unspecified, server will pick an appropriate default.
799
+ # @param page_token [::String]
800
+ # Optional. A token identifying a page of results the server should return.
801
+ # @param filter [::String]
802
+ # Optional. Filtering results
803
+ # @param order_by [::String]
804
+ # Optional. Hint for how to order the results
805
+ # @yield [result, operation] Access the result along with the TransportOperation object
806
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>]
807
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
808
+ #
809
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>]
810
+ #
811
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
812
+ #
813
+ # @example Basic example
814
+ # require "google/cloud/agent_registry/v1"
815
+ #
816
+ # # Create a client object. The client can be reused for multiple calls.
817
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
818
+ #
819
+ # # Create a request. To set request fields, pass in keyword arguments.
820
+ # request = Google::Cloud::AgentRegistry::V1::ListMcpServersRequest.new
821
+ #
822
+ # # Call the list_mcp_servers method.
823
+ # result = client.list_mcp_servers request
824
+ #
825
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
826
+ # # over elements, and API calls will be issued to fetch pages as needed.
827
+ # result.each do |item|
828
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::McpServer.
829
+ # p item
830
+ # end
831
+ #
832
+ def list_mcp_servers request, options = nil
833
+ raise ::ArgumentError, "request must be provided" if request.nil?
834
+
835
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::ListMcpServersRequest
836
+
837
+ # Converts hash and nil to an options object
838
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
839
+
840
+ # Customize the options with defaults
841
+ call_metadata = @config.rpcs.list_mcp_servers.metadata.to_h
842
+
843
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
844
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
845
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
846
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
847
+ transports_version_send: [:rest]
848
+
849
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
850
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
851
+
852
+ options.apply_defaults timeout: @config.rpcs.list_mcp_servers.timeout,
853
+ metadata: call_metadata,
854
+ retry_policy: @config.rpcs.list_mcp_servers.retry_policy
855
+
856
+ options.apply_defaults timeout: @config.timeout,
857
+ metadata: @config.metadata,
858
+ retry_policy: @config.retry_policy
859
+
860
+ @agent_registry_stub.list_mcp_servers request, options do |result, operation|
861
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_stub, :list_mcp_servers, "mcp_servers", request, result, options
862
+ yield result, operation if block_given?
863
+ throw :response, result
864
+ end
865
+ rescue ::Gapic::Rest::Error => e
866
+ raise ::Google::Cloud::Error.from_error(e)
867
+ end
868
+
869
+ ##
870
+ # Searches McpServers in a given project and location.
871
+ #
872
+ # @overload search_mcp_servers(request, options = nil)
873
+ # Pass arguments to `search_mcp_servers` via a request object, either of type
874
+ # {::Google::Cloud::AgentRegistry::V1::SearchMcpServersRequest} or an equivalent Hash.
875
+ #
876
+ # @param request [::Google::Cloud::AgentRegistry::V1::SearchMcpServersRequest, ::Hash]
877
+ # A request object representing the call parameters. Required. To specify no
878
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
879
+ # @param options [::Gapic::CallOptions, ::Hash]
880
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
881
+ #
882
+ # @overload search_mcp_servers(parent: nil, search_string: nil, page_size: nil, page_token: nil)
883
+ # Pass arguments to `search_mcp_servers` via keyword arguments. Note that at
884
+ # least one keyword argument is required. To specify no parameters, or to keep all
885
+ # the default parameter values, pass an empty Hash as a request object (see above).
886
+ #
887
+ # @param parent [::String]
888
+ # Required. Parent value for SearchMcpServersRequest. Format:
889
+ # `projects/{project}/locations/{location}`.
890
+ # @param search_string [::String]
891
+ # Optional. Search criteria used to select the MCP Servers to return. If no
892
+ # search criteria is specified then all accessible MCP Servers will be
893
+ # returned.
894
+ #
895
+ # Search expressions can be used to restrict results based upon searchable
896
+ # fields, where the operators can be used along with the suffix wildcard
897
+ # symbol `*`. See
898
+ # [instructions](https://docs.cloud.google.com/agent-registry/search-agents-and-tools)
899
+ # for more details.
900
+ #
901
+ # Allowed operators: `=`, `:`, `NOT`, `AND`, `OR`, and `()`.
902
+ #
903
+ # Searchable fields:
904
+ #
905
+ # | Field | `=` | `:` | `*` | Keyword Search |
906
+ # |--------------------|-----|-----|-----|----------------|
907
+ # | mcpServerId | Yes | Yes | Yes | Included |
908
+ # | name | No | Yes | Yes | Included |
909
+ # | displayName | No | Yes | Yes | Included |
910
+ #
911
+ # Examples:
912
+ #
913
+ # * `mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id"`
914
+ # to find the MCP Server with the specified MCP Server ID.
915
+ # * `name:important` to find MCP Servers whose name contains `important` as a
916
+ # word.
917
+ # * `displayName:works*` to find MCP Servers whose display name contains
918
+ # words that start with `works`.
919
+ # * `planner OR booking` to find MCP Servers whose metadata contains the
920
+ # words `planner` or `booking`.
921
+ # * `mcpServerId:service-id AND (displayName:planner OR
922
+ # displayName:booking)` to find MCP Servers whose MCP Server ID contains
923
+ # `service-id` and whose display name contains `planner` or
924
+ # `booking`.
925
+ # @param page_size [::Integer]
926
+ # Optional. The maximum number of search results to return per page. The page
927
+ # size is capped at `100`, even if a larger value is specified. A negative
928
+ # value will result in an `INVALID_ARGUMENT` error. If unspecified or set to
929
+ # `0`, a default value of `20` will be used. The server may return fewer
930
+ # results than requested.
931
+ # @param page_token [::String]
932
+ # Optional. If present, retrieve the next batch of results from the preceding
933
+ # call to this method. `page_token` must be the value of `next_page_token`
934
+ # from the previous response. The values of all other method parameters, must
935
+ # be identical to those in the previous call.
936
+ # @yield [result, operation] Access the result along with the TransportOperation object
937
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>]
938
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
939
+ #
940
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::McpServer>]
941
+ #
942
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
943
+ #
944
+ # @example Basic example
945
+ # require "google/cloud/agent_registry/v1"
946
+ #
947
+ # # Create a client object. The client can be reused for multiple calls.
948
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
949
+ #
950
+ # # Create a request. To set request fields, pass in keyword arguments.
951
+ # request = Google::Cloud::AgentRegistry::V1::SearchMcpServersRequest.new
952
+ #
953
+ # # Call the search_mcp_servers method.
954
+ # result = client.search_mcp_servers request
955
+ #
956
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
957
+ # # over elements, and API calls will be issued to fetch pages as needed.
958
+ # result.each do |item|
959
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::McpServer.
960
+ # p item
961
+ # end
962
+ #
963
+ def search_mcp_servers request, options = nil
964
+ raise ::ArgumentError, "request must be provided" if request.nil?
965
+
966
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::SearchMcpServersRequest
967
+
968
+ # Converts hash and nil to an options object
969
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
970
+
971
+ # Customize the options with defaults
972
+ call_metadata = @config.rpcs.search_mcp_servers.metadata.to_h
973
+
974
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
975
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
976
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
977
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
978
+ transports_version_send: [:rest]
979
+
980
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
981
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
982
+
983
+ options.apply_defaults timeout: @config.rpcs.search_mcp_servers.timeout,
984
+ metadata: call_metadata,
985
+ retry_policy: @config.rpcs.search_mcp_servers.retry_policy
986
+
987
+ options.apply_defaults timeout: @config.timeout,
988
+ metadata: @config.metadata,
989
+ retry_policy: @config.retry_policy
990
+
991
+ @agent_registry_stub.search_mcp_servers request, options do |result, operation|
992
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_stub, :search_mcp_servers, "mcp_servers", request, result, options
993
+ yield result, operation if block_given?
994
+ throw :response, result
995
+ end
996
+ rescue ::Gapic::Rest::Error => e
997
+ raise ::Google::Cloud::Error.from_error(e)
998
+ end
999
+
1000
+ ##
1001
+ # Gets details of a single McpServer.
1002
+ #
1003
+ # @overload get_mcp_server(request, options = nil)
1004
+ # Pass arguments to `get_mcp_server` via a request object, either of type
1005
+ # {::Google::Cloud::AgentRegistry::V1::GetMcpServerRequest} or an equivalent Hash.
1006
+ #
1007
+ # @param request [::Google::Cloud::AgentRegistry::V1::GetMcpServerRequest, ::Hash]
1008
+ # A request object representing the call parameters. Required. To specify no
1009
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1010
+ # @param options [::Gapic::CallOptions, ::Hash]
1011
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1012
+ #
1013
+ # @overload get_mcp_server(name: nil)
1014
+ # Pass arguments to `get_mcp_server` via keyword arguments. Note that at
1015
+ # least one keyword argument is required. To specify no parameters, or to keep all
1016
+ # the default parameter values, pass an empty Hash as a request object (see above).
1017
+ #
1018
+ # @param name [::String]
1019
+ # Required. Name of the resource
1020
+ # @yield [result, operation] Access the result along with the TransportOperation object
1021
+ # @yieldparam result [::Google::Cloud::AgentRegistry::V1::McpServer]
1022
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1023
+ #
1024
+ # @return [::Google::Cloud::AgentRegistry::V1::McpServer]
1025
+ #
1026
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1027
+ #
1028
+ # @example Basic example
1029
+ # require "google/cloud/agent_registry/v1"
1030
+ #
1031
+ # # Create a client object. The client can be reused for multiple calls.
1032
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1033
+ #
1034
+ # # Create a request. To set request fields, pass in keyword arguments.
1035
+ # request = Google::Cloud::AgentRegistry::V1::GetMcpServerRequest.new
1036
+ #
1037
+ # # Call the get_mcp_server method.
1038
+ # result = client.get_mcp_server request
1039
+ #
1040
+ # # The returned object is of type Google::Cloud::AgentRegistry::V1::McpServer.
1041
+ # p result
1042
+ #
1043
+ def get_mcp_server request, options = nil
1044
+ raise ::ArgumentError, "request must be provided" if request.nil?
1045
+
1046
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::GetMcpServerRequest
1047
+
1048
+ # Converts hash and nil to an options object
1049
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1050
+
1051
+ # Customize the options with defaults
1052
+ call_metadata = @config.rpcs.get_mcp_server.metadata.to_h
1053
+
1054
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1055
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1056
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1057
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1058
+ transports_version_send: [:rest]
1059
+
1060
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1061
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1062
+
1063
+ options.apply_defaults timeout: @config.rpcs.get_mcp_server.timeout,
1064
+ metadata: call_metadata,
1065
+ retry_policy: @config.rpcs.get_mcp_server.retry_policy
1066
+
1067
+ options.apply_defaults timeout: @config.timeout,
1068
+ metadata: @config.metadata,
1069
+ retry_policy: @config.retry_policy
1070
+
1071
+ @agent_registry_stub.get_mcp_server request, options do |result, operation|
1072
+ yield result, operation if block_given?
1073
+ end
1074
+ rescue ::Gapic::Rest::Error => e
1075
+ raise ::Google::Cloud::Error.from_error(e)
1076
+ end
1077
+
1078
+ ##
1079
+ # Lists Services in a given project and location.
1080
+ #
1081
+ # @overload list_services(request, options = nil)
1082
+ # Pass arguments to `list_services` via a request object, either of type
1083
+ # {::Google::Cloud::AgentRegistry::V1::ListServicesRequest} or an equivalent Hash.
1084
+ #
1085
+ # @param request [::Google::Cloud::AgentRegistry::V1::ListServicesRequest, ::Hash]
1086
+ # A request object representing the call parameters. Required. To specify no
1087
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1088
+ # @param options [::Gapic::CallOptions, ::Hash]
1089
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1090
+ #
1091
+ # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil)
1092
+ # Pass arguments to `list_services` via keyword arguments. Note that at
1093
+ # least one keyword argument is required. To specify no parameters, or to keep all
1094
+ # the default parameter values, pass an empty Hash as a request object (see above).
1095
+ #
1096
+ # @param parent [::String]
1097
+ # Required. The project and location to list services in.
1098
+ # Expected format: `projects/{project}/locations/{location}`.
1099
+ # @param page_size [::Integer]
1100
+ # Optional. Requested page size. Server may return fewer items than
1101
+ # requested. If unspecified, server will pick an appropriate default.
1102
+ # @param page_token [::String]
1103
+ # Optional. A token identifying a page of results the server should return.
1104
+ # @param filter [::String]
1105
+ # Optional. A query string used to filter the list of services returned.
1106
+ # The filter expression must follow AIP-160 syntax.
1107
+ #
1108
+ # Filtering is supported on the `name`, `display_name`, `description`,
1109
+ # and `labels` fields.
1110
+ #
1111
+ # Some examples:
1112
+ #
1113
+ # * `name = "projects/p1/locations/l1/services/s1"`
1114
+ # * `display_name = "my-service"`
1115
+ # * `description : "myservice description"`
1116
+ # * `labels.env = "prod"`
1117
+ # @yield [result, operation] Access the result along with the TransportOperation object
1118
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>]
1119
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1120
+ #
1121
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Service>]
1122
+ #
1123
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1124
+ #
1125
+ # @example Basic example
1126
+ # require "google/cloud/agent_registry/v1"
1127
+ #
1128
+ # # Create a client object. The client can be reused for multiple calls.
1129
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1130
+ #
1131
+ # # Create a request. To set request fields, pass in keyword arguments.
1132
+ # request = Google::Cloud::AgentRegistry::V1::ListServicesRequest.new
1133
+ #
1134
+ # # Call the list_services method.
1135
+ # result = client.list_services request
1136
+ #
1137
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1138
+ # # over elements, and API calls will be issued to fetch pages as needed.
1139
+ # result.each do |item|
1140
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::Service.
1141
+ # p item
1142
+ # end
1143
+ #
1144
+ def list_services request, options = nil
1145
+ raise ::ArgumentError, "request must be provided" if request.nil?
1146
+
1147
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::ListServicesRequest
1148
+
1149
+ # Converts hash and nil to an options object
1150
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1151
+
1152
+ # Customize the options with defaults
1153
+ call_metadata = @config.rpcs.list_services.metadata.to_h
1154
+
1155
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1156
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1157
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1158
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1159
+ transports_version_send: [:rest]
1160
+
1161
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1162
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1163
+
1164
+ options.apply_defaults timeout: @config.rpcs.list_services.timeout,
1165
+ metadata: call_metadata,
1166
+ retry_policy: @config.rpcs.list_services.retry_policy
1167
+
1168
+ options.apply_defaults timeout: @config.timeout,
1169
+ metadata: @config.metadata,
1170
+ retry_policy: @config.retry_policy
1171
+
1172
+ @agent_registry_stub.list_services request, options do |result, operation|
1173
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_stub, :list_services, "services", request, result, options
1174
+ yield result, operation if block_given?
1175
+ throw :response, result
1176
+ end
1177
+ rescue ::Gapic::Rest::Error => e
1178
+ raise ::Google::Cloud::Error.from_error(e)
1179
+ end
1180
+
1181
+ ##
1182
+ # Gets details of a single Service.
1183
+ #
1184
+ # @overload get_service(request, options = nil)
1185
+ # Pass arguments to `get_service` via a request object, either of type
1186
+ # {::Google::Cloud::AgentRegistry::V1::GetServiceRequest} or an equivalent Hash.
1187
+ #
1188
+ # @param request [::Google::Cloud::AgentRegistry::V1::GetServiceRequest, ::Hash]
1189
+ # A request object representing the call parameters. Required. To specify no
1190
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1191
+ # @param options [::Gapic::CallOptions, ::Hash]
1192
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1193
+ #
1194
+ # @overload get_service(name: nil)
1195
+ # Pass arguments to `get_service` via keyword arguments. Note that at
1196
+ # least one keyword argument is required. To specify no parameters, or to keep all
1197
+ # the default parameter values, pass an empty Hash as a request object (see above).
1198
+ #
1199
+ # @param name [::String]
1200
+ # Required. The name of the Service.
1201
+ # Format: `projects/{project}/locations/{location}/services/{service}`.
1202
+ # @yield [result, operation] Access the result along with the TransportOperation object
1203
+ # @yieldparam result [::Google::Cloud::AgentRegistry::V1::Service]
1204
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1205
+ #
1206
+ # @return [::Google::Cloud::AgentRegistry::V1::Service]
1207
+ #
1208
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1209
+ #
1210
+ # @example Basic example
1211
+ # require "google/cloud/agent_registry/v1"
1212
+ #
1213
+ # # Create a client object. The client can be reused for multiple calls.
1214
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1215
+ #
1216
+ # # Create a request. To set request fields, pass in keyword arguments.
1217
+ # request = Google::Cloud::AgentRegistry::V1::GetServiceRequest.new
1218
+ #
1219
+ # # Call the get_service method.
1220
+ # result = client.get_service request
1221
+ #
1222
+ # # The returned object is of type Google::Cloud::AgentRegistry::V1::Service.
1223
+ # p result
1224
+ #
1225
+ def get_service request, options = nil
1226
+ raise ::ArgumentError, "request must be provided" if request.nil?
1227
+
1228
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::GetServiceRequest
1229
+
1230
+ # Converts hash and nil to an options object
1231
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1232
+
1233
+ # Customize the options with defaults
1234
+ call_metadata = @config.rpcs.get_service.metadata.to_h
1235
+
1236
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1237
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1238
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1239
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1240
+ transports_version_send: [:rest]
1241
+
1242
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1243
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1244
+
1245
+ options.apply_defaults timeout: @config.rpcs.get_service.timeout,
1246
+ metadata: call_metadata,
1247
+ retry_policy: @config.rpcs.get_service.retry_policy
1248
+
1249
+ options.apply_defaults timeout: @config.timeout,
1250
+ metadata: @config.metadata,
1251
+ retry_policy: @config.retry_policy
1252
+
1253
+ @agent_registry_stub.get_service request, options do |result, operation|
1254
+ yield result, operation if block_given?
1255
+ end
1256
+ rescue ::Gapic::Rest::Error => e
1257
+ raise ::Google::Cloud::Error.from_error(e)
1258
+ end
1259
+
1260
+ ##
1261
+ # Creates a new Service in a given project and location.
1262
+ #
1263
+ # @overload create_service(request, options = nil)
1264
+ # Pass arguments to `create_service` via a request object, either of type
1265
+ # {::Google::Cloud::AgentRegistry::V1::CreateServiceRequest} or an equivalent Hash.
1266
+ #
1267
+ # @param request [::Google::Cloud::AgentRegistry::V1::CreateServiceRequest, ::Hash]
1268
+ # A request object representing the call parameters. Required. To specify no
1269
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1270
+ # @param options [::Gapic::CallOptions, ::Hash]
1271
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1272
+ #
1273
+ # @overload create_service(parent: nil, service_id: nil, service: nil, request_id: nil)
1274
+ # Pass arguments to `create_service` via keyword arguments. Note that at
1275
+ # least one keyword argument is required. To specify no parameters, or to keep all
1276
+ # the default parameter values, pass an empty Hash as a request object (see above).
1277
+ #
1278
+ # @param parent [::String]
1279
+ # Required. The project and location to create the Service in.
1280
+ # Expected format: `projects/{project}/locations/{location}`.
1281
+ # @param service_id [::String]
1282
+ # Required. The ID to use for the service, which will become the final
1283
+ # component of the service's resource name.
1284
+ #
1285
+ # This value should be 4-63 characters, and valid characters
1286
+ # are `/[a-z][0-9]-/`.
1287
+ # @param service [::Google::Cloud::AgentRegistry::V1::Service, ::Hash]
1288
+ # Required. The Service resource that is being created.
1289
+ # Format: `projects/{project}/locations/{location}/services/{service}`.
1290
+ # @param request_id [::String]
1291
+ # Optional. An optional request ID to identify requests. Specify a unique
1292
+ # request ID so that if you must retry your request, the server will know to
1293
+ # ignore the request if it has already been completed. The server will
1294
+ # guarantee that for at least 60 minutes since the first request.
1295
+ #
1296
+ # For example, consider a situation where you make an initial request and the
1297
+ # request times out. If you make the request again with the same request
1298
+ # ID, the server can check if original operation with the same request ID
1299
+ # was received, and if so, will ignore the second request. This prevents
1300
+ # clients from accidentally creating duplicate commitments.
1301
+ #
1302
+ # The request ID must be a valid UUID with the exception that zero UUID is
1303
+ # not supported (00000000-0000-0000-0000-000000000000).
1304
+ # @yield [result, operation] Access the result along with the TransportOperation object
1305
+ # @yieldparam result [::Gapic::Operation]
1306
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1307
+ #
1308
+ # @return [::Gapic::Operation]
1309
+ #
1310
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1311
+ #
1312
+ # @example Basic example
1313
+ # require "google/cloud/agent_registry/v1"
1314
+ #
1315
+ # # Create a client object. The client can be reused for multiple calls.
1316
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1317
+ #
1318
+ # # Create a request. To set request fields, pass in keyword arguments.
1319
+ # request = Google::Cloud::AgentRegistry::V1::CreateServiceRequest.new
1320
+ #
1321
+ # # Call the create_service method.
1322
+ # result = client.create_service request
1323
+ #
1324
+ # # The returned object is of type Gapic::Operation. You can use it to
1325
+ # # check the status of an operation, cancel it, or wait for results.
1326
+ # # Here is how to wait for a response.
1327
+ # result.wait_until_done! timeout: 60
1328
+ # if result.response?
1329
+ # p result.response
1330
+ # else
1331
+ # puts "No response received."
1332
+ # end
1333
+ #
1334
+ def create_service request, options = nil
1335
+ raise ::ArgumentError, "request must be provided" if request.nil?
1336
+
1337
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::CreateServiceRequest
1338
+
1339
+ # Converts hash and nil to an options object
1340
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1341
+
1342
+ # Customize the options with defaults
1343
+ call_metadata = @config.rpcs.create_service.metadata.to_h
1344
+
1345
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1346
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1347
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1348
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1349
+ transports_version_send: [:rest]
1350
+
1351
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1352
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1353
+
1354
+ options.apply_defaults timeout: @config.rpcs.create_service.timeout,
1355
+ metadata: call_metadata,
1356
+ retry_policy: @config.rpcs.create_service.retry_policy
1357
+
1358
+ options.apply_defaults timeout: @config.timeout,
1359
+ metadata: @config.metadata,
1360
+ retry_policy: @config.retry_policy
1361
+
1362
+ @agent_registry_stub.create_service request, options do |result, operation|
1363
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1364
+ yield result, operation if block_given?
1365
+ throw :response, result
1366
+ end
1367
+ rescue ::Gapic::Rest::Error => e
1368
+ raise ::Google::Cloud::Error.from_error(e)
1369
+ end
1370
+
1371
+ ##
1372
+ # Updates the parameters of a single Service.
1373
+ #
1374
+ # @overload update_service(request, options = nil)
1375
+ # Pass arguments to `update_service` via a request object, either of type
1376
+ # {::Google::Cloud::AgentRegistry::V1::UpdateServiceRequest} or an equivalent Hash.
1377
+ #
1378
+ # @param request [::Google::Cloud::AgentRegistry::V1::UpdateServiceRequest, ::Hash]
1379
+ # A request object representing the call parameters. Required. To specify no
1380
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1381
+ # @param options [::Gapic::CallOptions, ::Hash]
1382
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1383
+ #
1384
+ # @overload update_service(update_mask: nil, service: nil, request_id: nil)
1385
+ # Pass arguments to `update_service` via keyword arguments. Note that at
1386
+ # least one keyword argument is required. To specify no parameters, or to keep all
1387
+ # the default parameter values, pass an empty Hash as a request object (see above).
1388
+ #
1389
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1390
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1391
+ # Service resource by the update.
1392
+ # The fields specified in the update_mask are relative to the resource, not
1393
+ # the full request. A field will be overwritten if it is in the mask. If the
1394
+ # user does not provide a mask then all fields present in the request will be
1395
+ # overwritten.
1396
+ # @param service [::Google::Cloud::AgentRegistry::V1::Service, ::Hash]
1397
+ # Required. The Service resource that is being updated.
1398
+ # Format: `projects/{project}/locations/{location}/services/{service}`.
1399
+ # @param request_id [::String]
1400
+ # Optional. An optional request ID to identify requests. Specify a unique
1401
+ # request ID so that if you must retry your request, the server will know to
1402
+ # ignore the request if it has already been completed. The server will
1403
+ # guarantee that for at least 60 minutes since the first request.
1404
+ #
1405
+ # For example, consider a situation where you make an initial request and the
1406
+ # request times out. If you make the request again with the same request
1407
+ # ID, the server can check if original operation with the same request ID
1408
+ # was received, and if so, will ignore the second request. This prevents
1409
+ # clients from accidentally creating duplicate commitments.
1410
+ #
1411
+ # The request ID must be a valid UUID with the exception that zero UUID is
1412
+ # not supported (00000000-0000-0000-0000-000000000000).
1413
+ # @yield [result, operation] Access the result along with the TransportOperation object
1414
+ # @yieldparam result [::Gapic::Operation]
1415
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1416
+ #
1417
+ # @return [::Gapic::Operation]
1418
+ #
1419
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1420
+ #
1421
+ # @example Basic example
1422
+ # require "google/cloud/agent_registry/v1"
1423
+ #
1424
+ # # Create a client object. The client can be reused for multiple calls.
1425
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1426
+ #
1427
+ # # Create a request. To set request fields, pass in keyword arguments.
1428
+ # request = Google::Cloud::AgentRegistry::V1::UpdateServiceRequest.new
1429
+ #
1430
+ # # Call the update_service method.
1431
+ # result = client.update_service request
1432
+ #
1433
+ # # The returned object is of type Gapic::Operation. You can use it to
1434
+ # # check the status of an operation, cancel it, or wait for results.
1435
+ # # Here is how to wait for a response.
1436
+ # result.wait_until_done! timeout: 60
1437
+ # if result.response?
1438
+ # p result.response
1439
+ # else
1440
+ # puts "No response received."
1441
+ # end
1442
+ #
1443
+ def update_service request, options = nil
1444
+ raise ::ArgumentError, "request must be provided" if request.nil?
1445
+
1446
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::UpdateServiceRequest
1447
+
1448
+ # Converts hash and nil to an options object
1449
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1450
+
1451
+ # Customize the options with defaults
1452
+ call_metadata = @config.rpcs.update_service.metadata.to_h
1453
+
1454
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1455
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1456
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1457
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1458
+ transports_version_send: [:rest]
1459
+
1460
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1461
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1462
+
1463
+ options.apply_defaults timeout: @config.rpcs.update_service.timeout,
1464
+ metadata: call_metadata,
1465
+ retry_policy: @config.rpcs.update_service.retry_policy
1466
+
1467
+ options.apply_defaults timeout: @config.timeout,
1468
+ metadata: @config.metadata,
1469
+ retry_policy: @config.retry_policy
1470
+
1471
+ @agent_registry_stub.update_service request, options do |result, operation|
1472
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1473
+ yield result, operation if block_given?
1474
+ throw :response, result
1475
+ end
1476
+ rescue ::Gapic::Rest::Error => e
1477
+ raise ::Google::Cloud::Error.from_error(e)
1478
+ end
1479
+
1480
+ ##
1481
+ # Deletes a single Service.
1482
+ #
1483
+ # @overload delete_service(request, options = nil)
1484
+ # Pass arguments to `delete_service` via a request object, either of type
1485
+ # {::Google::Cloud::AgentRegistry::V1::DeleteServiceRequest} or an equivalent Hash.
1486
+ #
1487
+ # @param request [::Google::Cloud::AgentRegistry::V1::DeleteServiceRequest, ::Hash]
1488
+ # A request object representing the call parameters. Required. To specify no
1489
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1490
+ # @param options [::Gapic::CallOptions, ::Hash]
1491
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1492
+ #
1493
+ # @overload delete_service(name: nil, request_id: nil)
1494
+ # Pass arguments to `delete_service` via keyword arguments. Note that at
1495
+ # least one keyword argument is required. To specify no parameters, or to keep all
1496
+ # the default parameter values, pass an empty Hash as a request object (see above).
1497
+ #
1498
+ # @param name [::String]
1499
+ # Required. The name of the Service.
1500
+ # Format: `projects/{project}/locations/{location}/services/{service}`.
1501
+ # @param request_id [::String]
1502
+ # Optional. An optional request ID to identify requests. Specify a unique
1503
+ # request ID so that if you must retry your request, the server will know to
1504
+ # ignore the request if it has already been completed. The server will
1505
+ # guarantee that for at least 60 minutes after the first request.
1506
+ #
1507
+ # For example, consider a situation where you make an initial request and the
1508
+ # request times out. If you make the request again with the same request
1509
+ # ID, the server can check if original operation with the same request ID
1510
+ # was received, and if so, will ignore the second request. This prevents
1511
+ # clients from accidentally creating duplicate commitments.
1512
+ #
1513
+ # The request ID must be a valid UUID with the exception that zero UUID is
1514
+ # not supported (00000000-0000-0000-0000-000000000000).
1515
+ # @yield [result, operation] Access the result along with the TransportOperation object
1516
+ # @yieldparam result [::Gapic::Operation]
1517
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1518
+ #
1519
+ # @return [::Gapic::Operation]
1520
+ #
1521
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1522
+ #
1523
+ # @example Basic example
1524
+ # require "google/cloud/agent_registry/v1"
1525
+ #
1526
+ # # Create a client object. The client can be reused for multiple calls.
1527
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1528
+ #
1529
+ # # Create a request. To set request fields, pass in keyword arguments.
1530
+ # request = Google::Cloud::AgentRegistry::V1::DeleteServiceRequest.new
1531
+ #
1532
+ # # Call the delete_service method.
1533
+ # result = client.delete_service request
1534
+ #
1535
+ # # The returned object is of type Gapic::Operation. You can use it to
1536
+ # # check the status of an operation, cancel it, or wait for results.
1537
+ # # Here is how to wait for a response.
1538
+ # result.wait_until_done! timeout: 60
1539
+ # if result.response?
1540
+ # p result.response
1541
+ # else
1542
+ # puts "No response received."
1543
+ # end
1544
+ #
1545
+ def delete_service request, options = nil
1546
+ raise ::ArgumentError, "request must be provided" if request.nil?
1547
+
1548
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::DeleteServiceRequest
1549
+
1550
+ # Converts hash and nil to an options object
1551
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1552
+
1553
+ # Customize the options with defaults
1554
+ call_metadata = @config.rpcs.delete_service.metadata.to_h
1555
+
1556
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1557
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1558
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1559
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1560
+ transports_version_send: [:rest]
1561
+
1562
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1563
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1564
+
1565
+ options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
1566
+ metadata: call_metadata,
1567
+ retry_policy: @config.rpcs.delete_service.retry_policy
1568
+
1569
+ options.apply_defaults timeout: @config.timeout,
1570
+ metadata: @config.metadata,
1571
+ retry_policy: @config.retry_policy
1572
+
1573
+ @agent_registry_stub.delete_service request, options do |result, operation|
1574
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1575
+ yield result, operation if block_given?
1576
+ throw :response, result
1577
+ end
1578
+ rescue ::Gapic::Rest::Error => e
1579
+ raise ::Google::Cloud::Error.from_error(e)
1580
+ end
1581
+
1582
+ ##
1583
+ # Lists Bindings in a given project and location.
1584
+ #
1585
+ # @overload list_bindings(request, options = nil)
1586
+ # Pass arguments to `list_bindings` via a request object, either of type
1587
+ # {::Google::Cloud::AgentRegistry::V1::ListBindingsRequest} or an equivalent Hash.
1588
+ #
1589
+ # @param request [::Google::Cloud::AgentRegistry::V1::ListBindingsRequest, ::Hash]
1590
+ # A request object representing the call parameters. Required. To specify no
1591
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1592
+ # @param options [::Gapic::CallOptions, ::Hash]
1593
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1594
+ #
1595
+ # @overload list_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1596
+ # Pass arguments to `list_bindings` via keyword arguments. Note that at
1597
+ # least one keyword argument is required. To specify no parameters, or to keep all
1598
+ # the default parameter values, pass an empty Hash as a request object (see above).
1599
+ #
1600
+ # @param parent [::String]
1601
+ # Required. The project and location to list bindings in.
1602
+ # Expected format: `projects/{project}/locations/{location}`.
1603
+ # @param page_size [::Integer]
1604
+ # Optional. Requested page size. Server may return fewer items than
1605
+ # requested. Page size is 500 if unspecified and is capped at `500` even if a
1606
+ # larger value is given.
1607
+ # @param page_token [::String]
1608
+ # Optional. A token identifying a page of results the server should return.
1609
+ # @param filter [::String]
1610
+ # Optional. A query string used to filter the list of bindings returned.
1611
+ # The filter expression must follow AIP-160 syntax.
1612
+ # @param order_by [::String]
1613
+ # Optional. Hint for how to order the results
1614
+ # @yield [result, operation] Access the result along with the TransportOperation object
1615
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>]
1616
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1617
+ #
1618
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>]
1619
+ #
1620
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1621
+ #
1622
+ # @example Basic example
1623
+ # require "google/cloud/agent_registry/v1"
1624
+ #
1625
+ # # Create a client object. The client can be reused for multiple calls.
1626
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1627
+ #
1628
+ # # Create a request. To set request fields, pass in keyword arguments.
1629
+ # request = Google::Cloud::AgentRegistry::V1::ListBindingsRequest.new
1630
+ #
1631
+ # # Call the list_bindings method.
1632
+ # result = client.list_bindings request
1633
+ #
1634
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1635
+ # # over elements, and API calls will be issued to fetch pages as needed.
1636
+ # result.each do |item|
1637
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::Binding.
1638
+ # p item
1639
+ # end
1640
+ #
1641
+ def list_bindings request, options = nil
1642
+ raise ::ArgumentError, "request must be provided" if request.nil?
1643
+
1644
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::ListBindingsRequest
1645
+
1646
+ # Converts hash and nil to an options object
1647
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1648
+
1649
+ # Customize the options with defaults
1650
+ call_metadata = @config.rpcs.list_bindings.metadata.to_h
1651
+
1652
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1653
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1654
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1655
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1656
+ transports_version_send: [:rest]
1657
+
1658
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1659
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1660
+
1661
+ options.apply_defaults timeout: @config.rpcs.list_bindings.timeout,
1662
+ metadata: call_metadata,
1663
+ retry_policy: @config.rpcs.list_bindings.retry_policy
1664
+
1665
+ options.apply_defaults timeout: @config.timeout,
1666
+ metadata: @config.metadata,
1667
+ retry_policy: @config.retry_policy
1668
+
1669
+ @agent_registry_stub.list_bindings request, options do |result, operation|
1670
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_stub, :list_bindings, "bindings", request, result, options
1671
+ yield result, operation if block_given?
1672
+ throw :response, result
1673
+ end
1674
+ rescue ::Gapic::Rest::Error => e
1675
+ raise ::Google::Cloud::Error.from_error(e)
1676
+ end
1677
+
1678
+ ##
1679
+ # Gets details of a single Binding.
1680
+ #
1681
+ # @overload get_binding(request, options = nil)
1682
+ # Pass arguments to `get_binding` via a request object, either of type
1683
+ # {::Google::Cloud::AgentRegistry::V1::GetBindingRequest} or an equivalent Hash.
1684
+ #
1685
+ # @param request [::Google::Cloud::AgentRegistry::V1::GetBindingRequest, ::Hash]
1686
+ # A request object representing the call parameters. Required. To specify no
1687
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1688
+ # @param options [::Gapic::CallOptions, ::Hash]
1689
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1690
+ #
1691
+ # @overload get_binding(name: nil)
1692
+ # Pass arguments to `get_binding` via keyword arguments. Note that at
1693
+ # least one keyword argument is required. To specify no parameters, or to keep all
1694
+ # the default parameter values, pass an empty Hash as a request object (see above).
1695
+ #
1696
+ # @param name [::String]
1697
+ # Required. The name of the Binding.
1698
+ # Format: `projects/{project}/locations/{location}/bindings/{binding}`.
1699
+ # @yield [result, operation] Access the result along with the TransportOperation object
1700
+ # @yieldparam result [::Google::Cloud::AgentRegistry::V1::Binding]
1701
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1702
+ #
1703
+ # @return [::Google::Cloud::AgentRegistry::V1::Binding]
1704
+ #
1705
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1706
+ #
1707
+ # @example Basic example
1708
+ # require "google/cloud/agent_registry/v1"
1709
+ #
1710
+ # # Create a client object. The client can be reused for multiple calls.
1711
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1712
+ #
1713
+ # # Create a request. To set request fields, pass in keyword arguments.
1714
+ # request = Google::Cloud::AgentRegistry::V1::GetBindingRequest.new
1715
+ #
1716
+ # # Call the get_binding method.
1717
+ # result = client.get_binding request
1718
+ #
1719
+ # # The returned object is of type Google::Cloud::AgentRegistry::V1::Binding.
1720
+ # p result
1721
+ #
1722
+ def get_binding request, options = nil
1723
+ raise ::ArgumentError, "request must be provided" if request.nil?
1724
+
1725
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::GetBindingRequest
1726
+
1727
+ # Converts hash and nil to an options object
1728
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1729
+
1730
+ # Customize the options with defaults
1731
+ call_metadata = @config.rpcs.get_binding.metadata.to_h
1732
+
1733
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1734
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1735
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1736
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1737
+ transports_version_send: [:rest]
1738
+
1739
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1740
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1741
+
1742
+ options.apply_defaults timeout: @config.rpcs.get_binding.timeout,
1743
+ metadata: call_metadata,
1744
+ retry_policy: @config.rpcs.get_binding.retry_policy
1745
+
1746
+ options.apply_defaults timeout: @config.timeout,
1747
+ metadata: @config.metadata,
1748
+ retry_policy: @config.retry_policy
1749
+
1750
+ @agent_registry_stub.get_binding request, options do |result, operation|
1751
+ yield result, operation if block_given?
1752
+ end
1753
+ rescue ::Gapic::Rest::Error => e
1754
+ raise ::Google::Cloud::Error.from_error(e)
1755
+ end
1756
+
1757
+ ##
1758
+ # Creates a new Binding in a given project and location.
1759
+ #
1760
+ # @overload create_binding(request, options = nil)
1761
+ # Pass arguments to `create_binding` via a request object, either of type
1762
+ # {::Google::Cloud::AgentRegistry::V1::CreateBindingRequest} or an equivalent Hash.
1763
+ #
1764
+ # @param request [::Google::Cloud::AgentRegistry::V1::CreateBindingRequest, ::Hash]
1765
+ # A request object representing the call parameters. Required. To specify no
1766
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1767
+ # @param options [::Gapic::CallOptions, ::Hash]
1768
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1769
+ #
1770
+ # @overload create_binding(parent: nil, binding_id: nil, binding: nil, request_id: nil)
1771
+ # Pass arguments to `create_binding` via keyword arguments. Note that at
1772
+ # least one keyword argument is required. To specify no parameters, or to keep all
1773
+ # the default parameter values, pass an empty Hash as a request object (see above).
1774
+ #
1775
+ # @param parent [::String]
1776
+ # Required. The project and location to create the Binding in.
1777
+ # Expected format: `projects/{project}/locations/{location}`.
1778
+ # @param binding_id [::String]
1779
+ # Required. The ID to use for the binding, which will become the final
1780
+ # component of the binding's resource name.
1781
+ #
1782
+ # This value should be 4-63 characters, and must conform to RFC-1034.
1783
+ # Specifically, it must match the regular expression
1784
+ # `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
1785
+ # @param binding [::Google::Cloud::AgentRegistry::V1::Binding, ::Hash]
1786
+ # Required. The Binding resource that is being created.
1787
+ # @param request_id [::String]
1788
+ # Optional. An optional request ID to identify requests. Specify a unique
1789
+ # request ID so that if you must retry your request, the server will know to
1790
+ # ignore the request if it has already been completed. The server will
1791
+ # guarantee that for at least 60 minutes since the first request.
1792
+ #
1793
+ # For example, consider a situation where you make an initial request and the
1794
+ # request times out. If you make the request again with the same request
1795
+ # ID, the server can check if original operation with the same request ID
1796
+ # was received, and if so, will ignore the second request. This prevents
1797
+ # clients from accidentally creating duplicate commitments.
1798
+ #
1799
+ # The request ID must be a valid UUID with the exception that zero UUID is
1800
+ # not supported (00000000-0000-0000-0000-000000000000).
1801
+ # @yield [result, operation] Access the result along with the TransportOperation object
1802
+ # @yieldparam result [::Gapic::Operation]
1803
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1804
+ #
1805
+ # @return [::Gapic::Operation]
1806
+ #
1807
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1808
+ #
1809
+ # @example Basic example
1810
+ # require "google/cloud/agent_registry/v1"
1811
+ #
1812
+ # # Create a client object. The client can be reused for multiple calls.
1813
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1814
+ #
1815
+ # # Create a request. To set request fields, pass in keyword arguments.
1816
+ # request = Google::Cloud::AgentRegistry::V1::CreateBindingRequest.new
1817
+ #
1818
+ # # Call the create_binding method.
1819
+ # result = client.create_binding request
1820
+ #
1821
+ # # The returned object is of type Gapic::Operation. You can use it to
1822
+ # # check the status of an operation, cancel it, or wait for results.
1823
+ # # Here is how to wait for a response.
1824
+ # result.wait_until_done! timeout: 60
1825
+ # if result.response?
1826
+ # p result.response
1827
+ # else
1828
+ # puts "No response received."
1829
+ # end
1830
+ #
1831
+ def create_binding request, options = nil
1832
+ raise ::ArgumentError, "request must be provided" if request.nil?
1833
+
1834
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::CreateBindingRequest
1835
+
1836
+ # Converts hash and nil to an options object
1837
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1838
+
1839
+ # Customize the options with defaults
1840
+ call_metadata = @config.rpcs.create_binding.metadata.to_h
1841
+
1842
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1843
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1844
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1845
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1846
+ transports_version_send: [:rest]
1847
+
1848
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1849
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1850
+
1851
+ options.apply_defaults timeout: @config.rpcs.create_binding.timeout,
1852
+ metadata: call_metadata,
1853
+ retry_policy: @config.rpcs.create_binding.retry_policy
1854
+
1855
+ options.apply_defaults timeout: @config.timeout,
1856
+ metadata: @config.metadata,
1857
+ retry_policy: @config.retry_policy
1858
+
1859
+ @agent_registry_stub.create_binding request, options do |result, operation|
1860
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1861
+ yield result, operation if block_given?
1862
+ throw :response, result
1863
+ end
1864
+ rescue ::Gapic::Rest::Error => e
1865
+ raise ::Google::Cloud::Error.from_error(e)
1866
+ end
1867
+
1868
+ ##
1869
+ # Updates the parameters of a single Binding.
1870
+ #
1871
+ # @overload update_binding(request, options = nil)
1872
+ # Pass arguments to `update_binding` via a request object, either of type
1873
+ # {::Google::Cloud::AgentRegistry::V1::UpdateBindingRequest} or an equivalent Hash.
1874
+ #
1875
+ # @param request [::Google::Cloud::AgentRegistry::V1::UpdateBindingRequest, ::Hash]
1876
+ # A request object representing the call parameters. Required. To specify no
1877
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1878
+ # @param options [::Gapic::CallOptions, ::Hash]
1879
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1880
+ #
1881
+ # @overload update_binding(binding: nil, update_mask: nil, request_id: nil)
1882
+ # Pass arguments to `update_binding` via keyword arguments. Note that at
1883
+ # least one keyword argument is required. To specify no parameters, or to keep all
1884
+ # the default parameter values, pass an empty Hash as a request object (see above).
1885
+ #
1886
+ # @param binding [::Google::Cloud::AgentRegistry::V1::Binding, ::Hash]
1887
+ # Required. The Binding resource that is being updated.
1888
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1889
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1890
+ # Binding resource by the update.
1891
+ # The fields specified in the update_mask are relative to the resource, not
1892
+ # the full request. A field will be overwritten if it is in the mask. If the
1893
+ # user does not provide a mask then all fields present in the request will be
1894
+ # overwritten.
1895
+ # @param request_id [::String]
1896
+ # Optional. An optional request ID to identify requests. Specify a unique
1897
+ # request ID so that if you must retry your request, the server will know to
1898
+ # ignore the request if it has already been completed. The server will
1899
+ # guarantee that for at least 60 minutes since the first request.
1900
+ #
1901
+ # For example, consider a situation where you make an initial request and the
1902
+ # request times out. If you make the request again with the same request
1903
+ # ID, the server can check if original operation with the same request ID
1904
+ # was received, and if so, will ignore the second request. This prevents
1905
+ # clients from accidentally creating duplicate commitments.
1906
+ #
1907
+ # The request ID must be a valid UUID with the exception that zero UUID is
1908
+ # not supported (00000000-0000-0000-0000-000000000000).
1909
+ # @yield [result, operation] Access the result along with the TransportOperation object
1910
+ # @yieldparam result [::Gapic::Operation]
1911
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1912
+ #
1913
+ # @return [::Gapic::Operation]
1914
+ #
1915
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1916
+ #
1917
+ # @example Basic example
1918
+ # require "google/cloud/agent_registry/v1"
1919
+ #
1920
+ # # Create a client object. The client can be reused for multiple calls.
1921
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
1922
+ #
1923
+ # # Create a request. To set request fields, pass in keyword arguments.
1924
+ # request = Google::Cloud::AgentRegistry::V1::UpdateBindingRequest.new
1925
+ #
1926
+ # # Call the update_binding method.
1927
+ # result = client.update_binding request
1928
+ #
1929
+ # # The returned object is of type Gapic::Operation. You can use it to
1930
+ # # check the status of an operation, cancel it, or wait for results.
1931
+ # # Here is how to wait for a response.
1932
+ # result.wait_until_done! timeout: 60
1933
+ # if result.response?
1934
+ # p result.response
1935
+ # else
1936
+ # puts "No response received."
1937
+ # end
1938
+ #
1939
+ def update_binding request, options = nil
1940
+ raise ::ArgumentError, "request must be provided" if request.nil?
1941
+
1942
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::UpdateBindingRequest
1943
+
1944
+ # Converts hash and nil to an options object
1945
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1946
+
1947
+ # Customize the options with defaults
1948
+ call_metadata = @config.rpcs.update_binding.metadata.to_h
1949
+
1950
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1951
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1952
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1953
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
1954
+ transports_version_send: [:rest]
1955
+
1956
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1957
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1958
+
1959
+ options.apply_defaults timeout: @config.rpcs.update_binding.timeout,
1960
+ metadata: call_metadata,
1961
+ retry_policy: @config.rpcs.update_binding.retry_policy
1962
+
1963
+ options.apply_defaults timeout: @config.timeout,
1964
+ metadata: @config.metadata,
1965
+ retry_policy: @config.retry_policy
1966
+
1967
+ @agent_registry_stub.update_binding request, options do |result, operation|
1968
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1969
+ yield result, operation if block_given?
1970
+ throw :response, result
1971
+ end
1972
+ rescue ::Gapic::Rest::Error => e
1973
+ raise ::Google::Cloud::Error.from_error(e)
1974
+ end
1975
+
1976
+ ##
1977
+ # Deletes a single Binding.
1978
+ #
1979
+ # @overload delete_binding(request, options = nil)
1980
+ # Pass arguments to `delete_binding` via a request object, either of type
1981
+ # {::Google::Cloud::AgentRegistry::V1::DeleteBindingRequest} or an equivalent Hash.
1982
+ #
1983
+ # @param request [::Google::Cloud::AgentRegistry::V1::DeleteBindingRequest, ::Hash]
1984
+ # A request object representing the call parameters. Required. To specify no
1985
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1986
+ # @param options [::Gapic::CallOptions, ::Hash]
1987
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1988
+ #
1989
+ # @overload delete_binding(name: nil, request_id: nil)
1990
+ # Pass arguments to `delete_binding` via keyword arguments. Note that at
1991
+ # least one keyword argument is required. To specify no parameters, or to keep all
1992
+ # the default parameter values, pass an empty Hash as a request object (see above).
1993
+ #
1994
+ # @param name [::String]
1995
+ # Required. The name of the Binding.
1996
+ # Format: `projects/{project}/locations/{location}/bindings/{binding}`.
1997
+ # @param request_id [::String]
1998
+ # Optional. An optional request ID to identify requests. Specify a unique
1999
+ # request ID so that if you must retry your request, the server will know to
2000
+ # ignore the request if it has already been completed. The server will
2001
+ # guarantee that for at least 60 minutes after the first request.
2002
+ #
2003
+ # For example, consider a situation where you make an initial request and the
2004
+ # request times out. If you make the request again with the same request
2005
+ # ID, the server can check if original operation with the same request ID
2006
+ # was received, and if so, will ignore the second request. This prevents
2007
+ # clients from accidentally creating duplicate commitments.
2008
+ #
2009
+ # The request ID must be a valid UUID with the exception that zero UUID is
2010
+ # not supported (00000000-0000-0000-0000-000000000000).
2011
+ # @yield [result, operation] Access the result along with the TransportOperation object
2012
+ # @yieldparam result [::Gapic::Operation]
2013
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2014
+ #
2015
+ # @return [::Gapic::Operation]
2016
+ #
2017
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2018
+ #
2019
+ # @example Basic example
2020
+ # require "google/cloud/agent_registry/v1"
2021
+ #
2022
+ # # Create a client object. The client can be reused for multiple calls.
2023
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
2024
+ #
2025
+ # # Create a request. To set request fields, pass in keyword arguments.
2026
+ # request = Google::Cloud::AgentRegistry::V1::DeleteBindingRequest.new
2027
+ #
2028
+ # # Call the delete_binding method.
2029
+ # result = client.delete_binding request
2030
+ #
2031
+ # # The returned object is of type Gapic::Operation. You can use it to
2032
+ # # check the status of an operation, cancel it, or wait for results.
2033
+ # # Here is how to wait for a response.
2034
+ # result.wait_until_done! timeout: 60
2035
+ # if result.response?
2036
+ # p result.response
2037
+ # else
2038
+ # puts "No response received."
2039
+ # end
2040
+ #
2041
+ def delete_binding request, options = nil
2042
+ raise ::ArgumentError, "request must be provided" if request.nil?
2043
+
2044
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::DeleteBindingRequest
2045
+
2046
+ # Converts hash and nil to an options object
2047
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2048
+
2049
+ # Customize the options with defaults
2050
+ call_metadata = @config.rpcs.delete_binding.metadata.to_h
2051
+
2052
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2053
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2054
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2055
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
2056
+ transports_version_send: [:rest]
2057
+
2058
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2059
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2060
+
2061
+ options.apply_defaults timeout: @config.rpcs.delete_binding.timeout,
2062
+ metadata: call_metadata,
2063
+ retry_policy: @config.rpcs.delete_binding.retry_policy
2064
+
2065
+ options.apply_defaults timeout: @config.timeout,
2066
+ metadata: @config.metadata,
2067
+ retry_policy: @config.retry_policy
2068
+
2069
+ @agent_registry_stub.delete_binding request, options do |result, operation|
2070
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2071
+ yield result, operation if block_given?
2072
+ throw :response, result
2073
+ end
2074
+ rescue ::Gapic::Rest::Error => e
2075
+ raise ::Google::Cloud::Error.from_error(e)
2076
+ end
2077
+
2078
+ ##
2079
+ # Fetches available Bindings.
2080
+ #
2081
+ # @overload fetch_available_bindings(request, options = nil)
2082
+ # Pass arguments to `fetch_available_bindings` via a request object, either of type
2083
+ # {::Google::Cloud::AgentRegistry::V1::FetchAvailableBindingsRequest} or an equivalent Hash.
2084
+ #
2085
+ # @param request [::Google::Cloud::AgentRegistry::V1::FetchAvailableBindingsRequest, ::Hash]
2086
+ # A request object representing the call parameters. Required. To specify no
2087
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2088
+ # @param options [::Gapic::CallOptions, ::Hash]
2089
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2090
+ #
2091
+ # @overload fetch_available_bindings(source_identifier: nil, target_identifier: nil, parent: nil, page_size: nil, page_token: nil)
2092
+ # Pass arguments to `fetch_available_bindings` via keyword arguments. Note that at
2093
+ # least one keyword argument is required. To specify no parameters, or to keep all
2094
+ # the default parameter values, pass an empty Hash as a request object (see above).
2095
+ #
2096
+ # @param source_identifier [::String]
2097
+ # The identifier of the source Agent.
2098
+ # Format:
2099
+ #
2100
+ # * `urn:agent:{publisher}:{namespace}:{name}`
2101
+ # @param target_identifier [::String]
2102
+ # Optional. The identifier of the target Agent, MCP Server, or Endpoint.
2103
+ # Format:
2104
+ #
2105
+ # * `urn:agent:{publisher}:{namespace}:{name}`
2106
+ # * `urn:mcp:{publisher}:{namespace}:{name}`
2107
+ # * `urn:endpoint:{publisher}:{namespace}:{name}`
2108
+ # @param parent [::String]
2109
+ # Required. The parent, in the format
2110
+ # `projects/{project}/locations/{location}`.
2111
+ # @param page_size [::Integer]
2112
+ # Optional. Requested page size. Server may return fewer items than
2113
+ # requested. Page size is 500 if unspecified and is capped at `500` even if a
2114
+ # larger value is given.
2115
+ # @param page_token [::String]
2116
+ # Optional. A token identifying a page of results the server should return.
2117
+ # @yield [result, operation] Access the result along with the TransportOperation object
2118
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>]
2119
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2120
+ #
2121
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AgentRegistry::V1::Binding>]
2122
+ #
2123
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2124
+ #
2125
+ # @example Basic example
2126
+ # require "google/cloud/agent_registry/v1"
2127
+ #
2128
+ # # Create a client object. The client can be reused for multiple calls.
2129
+ # client = Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new
2130
+ #
2131
+ # # Create a request. To set request fields, pass in keyword arguments.
2132
+ # request = Google::Cloud::AgentRegistry::V1::FetchAvailableBindingsRequest.new
2133
+ #
2134
+ # # Call the fetch_available_bindings method.
2135
+ # result = client.fetch_available_bindings request
2136
+ #
2137
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2138
+ # # over elements, and API calls will be issued to fetch pages as needed.
2139
+ # result.each do |item|
2140
+ # # Each element is of type ::Google::Cloud::AgentRegistry::V1::Binding.
2141
+ # p item
2142
+ # end
2143
+ #
2144
+ def fetch_available_bindings request, options = nil
2145
+ raise ::ArgumentError, "request must be provided" if request.nil?
2146
+
2147
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AgentRegistry::V1::FetchAvailableBindingsRequest
2148
+
2149
+ # Converts hash and nil to an options object
2150
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2151
+
2152
+ # Customize the options with defaults
2153
+ call_metadata = @config.rpcs.fetch_available_bindings.metadata.to_h
2154
+
2155
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2156
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2157
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2158
+ gapic_version: ::Google::Cloud::AgentRegistry::V1::VERSION,
2159
+ transports_version_send: [:rest]
2160
+
2161
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2162
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2163
+
2164
+ options.apply_defaults timeout: @config.rpcs.fetch_available_bindings.timeout,
2165
+ metadata: call_metadata,
2166
+ retry_policy: @config.rpcs.fetch_available_bindings.retry_policy
2167
+
2168
+ options.apply_defaults timeout: @config.timeout,
2169
+ metadata: @config.metadata,
2170
+ retry_policy: @config.retry_policy
2171
+
2172
+ @agent_registry_stub.fetch_available_bindings request, options do |result, operation|
2173
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_registry_stub, :fetch_available_bindings, "bindings", request, result, options
2174
+ yield result, operation if block_given?
2175
+ throw :response, result
2176
+ end
2177
+ rescue ::Gapic::Rest::Error => e
2178
+ raise ::Google::Cloud::Error.from_error(e)
2179
+ end
2180
+
2181
+ ##
2182
+ # Configuration class for the AgentRegistry REST API.
2183
+ #
2184
+ # This class represents the configuration for AgentRegistry REST,
2185
+ # providing control over timeouts, retry behavior, logging, transport
2186
+ # parameters, and other low-level controls. Certain parameters can also be
2187
+ # applied individually to specific RPCs. See
2188
+ # {::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client::Configuration::Rpcs}
2189
+ # for a list of RPCs that can be configured independently.
2190
+ #
2191
+ # Configuration can be applied globally to all clients, or to a single client
2192
+ # on construction.
2193
+ #
2194
+ # @example
2195
+ #
2196
+ # # Modify the global config, setting the timeout for
2197
+ # # list_agents to 20 seconds,
2198
+ # # and all remaining timeouts to 10 seconds.
2199
+ # ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.configure do |config|
2200
+ # config.timeout = 10.0
2201
+ # config.rpcs.list_agents.timeout = 20.0
2202
+ # end
2203
+ #
2204
+ # # Apply the above configuration only to a new client.
2205
+ # client = ::Google::Cloud::AgentRegistry::V1::AgentRegistry::Rest::Client.new do |config|
2206
+ # config.timeout = 10.0
2207
+ # config.rpcs.list_agents.timeout = 20.0
2208
+ # end
2209
+ #
2210
+ # @!attribute [rw] endpoint
2211
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2212
+ # nil, indicating to use the default endpoint in the current universe domain.
2213
+ # @return [::String,nil]
2214
+ # @!attribute [rw] credentials
2215
+ # Credentials to send with calls. You may provide any of the following types:
2216
+ # * (`String`) The path to a service account key file in JSON format
2217
+ # * (`Hash`) A service account key as a Hash
2218
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2219
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2220
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2221
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2222
+ # * (`nil`) indicating no credentials
2223
+ #
2224
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
2225
+ # external source for authentication to Google Cloud, you must validate it before
2226
+ # providing it to a Google API client library. Providing an unvalidated credential
2227
+ # configuration to Google APIs can compromise the security of your systems and data.
2228
+ # For more information, refer to [Validate credential configurations from external
2229
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2230
+ # @return [::Object]
2231
+ # @!attribute [rw] scope
2232
+ # The OAuth scopes
2233
+ # @return [::Array<::String>]
2234
+ # @!attribute [rw] lib_name
2235
+ # The library name as recorded in instrumentation and logging
2236
+ # @return [::String]
2237
+ # @!attribute [rw] lib_version
2238
+ # The library version as recorded in instrumentation and logging
2239
+ # @return [::String]
2240
+ # @!attribute [rw] timeout
2241
+ # The call timeout in seconds.
2242
+ # @return [::Numeric]
2243
+ # @!attribute [rw] metadata
2244
+ # Additional headers to be sent with the call.
2245
+ # @return [::Hash{::Symbol=>::String}]
2246
+ # @!attribute [rw] retry_policy
2247
+ # The retry policy. The value is a hash with the following keys:
2248
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2249
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2250
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2251
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
2252
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2253
+ # trigger a retry.
2254
+ # @return [::Hash]
2255
+ # @!attribute [rw] quota_project
2256
+ # A separate project against which to charge quota.
2257
+ # @return [::String]
2258
+ # @!attribute [rw] universe_domain
2259
+ # The universe domain within which to make requests. This determines the
2260
+ # default endpoint URL. The default value of nil uses the environment
2261
+ # universe (usually the default "googleapis.com" universe).
2262
+ # @return [::String,nil]
2263
+ # @!attribute [rw] logger
2264
+ # A custom logger to use for request/response debug logging, or the value
2265
+ # `:default` (the default) to construct a default logger, or `nil` to
2266
+ # explicitly disable logging.
2267
+ # @return [::Logger,:default,nil]
2268
+ #
2269
+ class Configuration
2270
+ extend ::Gapic::Config
2271
+
2272
+ # @private
2273
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2274
+ DEFAULT_ENDPOINT = "agentregistry.googleapis.com"
2275
+
2276
+ config_attr :endpoint, nil, ::String, nil
2277
+ config_attr :credentials, nil do |value|
2278
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
2279
+ allowed.any? { |klass| klass === value }
2280
+ end
2281
+ config_attr :scope, nil, ::String, ::Array, nil
2282
+ config_attr :lib_name, nil, ::String, nil
2283
+ config_attr :lib_version, nil, ::String, nil
2284
+ config_attr :timeout, nil, ::Numeric, nil
2285
+ config_attr :metadata, nil, ::Hash, nil
2286
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2287
+ config_attr :quota_project, nil, ::String, nil
2288
+ config_attr :universe_domain, nil, ::String, nil
2289
+
2290
+ # @private
2291
+ # Overrides for http bindings for the RPCs of this service
2292
+ # are only used when this service is used as mixin, and only
2293
+ # by the host service.
2294
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2295
+ config_attr :bindings_override, {}, ::Hash, nil
2296
+ config_attr :logger, :default, ::Logger, nil, :default
2297
+
2298
+ # @private
2299
+ def initialize parent_config = nil
2300
+ @parent_config = parent_config unless parent_config.nil?
2301
+
2302
+ yield self if block_given?
2303
+ end
2304
+
2305
+ ##
2306
+ # Configurations for individual RPCs
2307
+ # @return [Rpcs]
2308
+ #
2309
+ def rpcs
2310
+ @rpcs ||= begin
2311
+ parent_rpcs = nil
2312
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2313
+ Rpcs.new parent_rpcs
2314
+ end
2315
+ end
2316
+
2317
+ ##
2318
+ # Configuration RPC class for the AgentRegistry API.
2319
+ #
2320
+ # Includes fields providing the configuration for each RPC in this service.
2321
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2322
+ # the following configuration fields:
2323
+ #
2324
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2325
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2326
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2327
+ # include the following keys:
2328
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2329
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2330
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2331
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
2332
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2333
+ # trigger a retry.
2334
+ #
2335
+ class Rpcs
2336
+ ##
2337
+ # RPC-specific configuration for `list_agents`
2338
+ # @return [::Gapic::Config::Method]
2339
+ #
2340
+ attr_reader :list_agents
2341
+ ##
2342
+ # RPC-specific configuration for `search_agents`
2343
+ # @return [::Gapic::Config::Method]
2344
+ #
2345
+ attr_reader :search_agents
2346
+ ##
2347
+ # RPC-specific configuration for `get_agent`
2348
+ # @return [::Gapic::Config::Method]
2349
+ #
2350
+ attr_reader :get_agent
2351
+ ##
2352
+ # RPC-specific configuration for `list_endpoints`
2353
+ # @return [::Gapic::Config::Method]
2354
+ #
2355
+ attr_reader :list_endpoints
2356
+ ##
2357
+ # RPC-specific configuration for `get_endpoint`
2358
+ # @return [::Gapic::Config::Method]
2359
+ #
2360
+ attr_reader :get_endpoint
2361
+ ##
2362
+ # RPC-specific configuration for `list_mcp_servers`
2363
+ # @return [::Gapic::Config::Method]
2364
+ #
2365
+ attr_reader :list_mcp_servers
2366
+ ##
2367
+ # RPC-specific configuration for `search_mcp_servers`
2368
+ # @return [::Gapic::Config::Method]
2369
+ #
2370
+ attr_reader :search_mcp_servers
2371
+ ##
2372
+ # RPC-specific configuration for `get_mcp_server`
2373
+ # @return [::Gapic::Config::Method]
2374
+ #
2375
+ attr_reader :get_mcp_server
2376
+ ##
2377
+ # RPC-specific configuration for `list_services`
2378
+ # @return [::Gapic::Config::Method]
2379
+ #
2380
+ attr_reader :list_services
2381
+ ##
2382
+ # RPC-specific configuration for `get_service`
2383
+ # @return [::Gapic::Config::Method]
2384
+ #
2385
+ attr_reader :get_service
2386
+ ##
2387
+ # RPC-specific configuration for `create_service`
2388
+ # @return [::Gapic::Config::Method]
2389
+ #
2390
+ attr_reader :create_service
2391
+ ##
2392
+ # RPC-specific configuration for `update_service`
2393
+ # @return [::Gapic::Config::Method]
2394
+ #
2395
+ attr_reader :update_service
2396
+ ##
2397
+ # RPC-specific configuration for `delete_service`
2398
+ # @return [::Gapic::Config::Method]
2399
+ #
2400
+ attr_reader :delete_service
2401
+ ##
2402
+ # RPC-specific configuration for `list_bindings`
2403
+ # @return [::Gapic::Config::Method]
2404
+ #
2405
+ attr_reader :list_bindings
2406
+ ##
2407
+ # RPC-specific configuration for `get_binding`
2408
+ # @return [::Gapic::Config::Method]
2409
+ #
2410
+ attr_reader :get_binding
2411
+ ##
2412
+ # RPC-specific configuration for `create_binding`
2413
+ # @return [::Gapic::Config::Method]
2414
+ #
2415
+ attr_reader :create_binding
2416
+ ##
2417
+ # RPC-specific configuration for `update_binding`
2418
+ # @return [::Gapic::Config::Method]
2419
+ #
2420
+ attr_reader :update_binding
2421
+ ##
2422
+ # RPC-specific configuration for `delete_binding`
2423
+ # @return [::Gapic::Config::Method]
2424
+ #
2425
+ attr_reader :delete_binding
2426
+ ##
2427
+ # RPC-specific configuration for `fetch_available_bindings`
2428
+ # @return [::Gapic::Config::Method]
2429
+ #
2430
+ attr_reader :fetch_available_bindings
2431
+
2432
+ # @private
2433
+ def initialize parent_rpcs = nil
2434
+ list_agents_config = parent_rpcs.list_agents if parent_rpcs.respond_to? :list_agents
2435
+ @list_agents = ::Gapic::Config::Method.new list_agents_config
2436
+ search_agents_config = parent_rpcs.search_agents if parent_rpcs.respond_to? :search_agents
2437
+ @search_agents = ::Gapic::Config::Method.new search_agents_config
2438
+ get_agent_config = parent_rpcs.get_agent if parent_rpcs.respond_to? :get_agent
2439
+ @get_agent = ::Gapic::Config::Method.new get_agent_config
2440
+ list_endpoints_config = parent_rpcs.list_endpoints if parent_rpcs.respond_to? :list_endpoints
2441
+ @list_endpoints = ::Gapic::Config::Method.new list_endpoints_config
2442
+ get_endpoint_config = parent_rpcs.get_endpoint if parent_rpcs.respond_to? :get_endpoint
2443
+ @get_endpoint = ::Gapic::Config::Method.new get_endpoint_config
2444
+ list_mcp_servers_config = parent_rpcs.list_mcp_servers if parent_rpcs.respond_to? :list_mcp_servers
2445
+ @list_mcp_servers = ::Gapic::Config::Method.new list_mcp_servers_config
2446
+ search_mcp_servers_config = parent_rpcs.search_mcp_servers if parent_rpcs.respond_to? :search_mcp_servers
2447
+ @search_mcp_servers = ::Gapic::Config::Method.new search_mcp_servers_config
2448
+ get_mcp_server_config = parent_rpcs.get_mcp_server if parent_rpcs.respond_to? :get_mcp_server
2449
+ @get_mcp_server = ::Gapic::Config::Method.new get_mcp_server_config
2450
+ list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services
2451
+ @list_services = ::Gapic::Config::Method.new list_services_config
2452
+ get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service
2453
+ @get_service = ::Gapic::Config::Method.new get_service_config
2454
+ create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service
2455
+ @create_service = ::Gapic::Config::Method.new create_service_config
2456
+ update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service
2457
+ @update_service = ::Gapic::Config::Method.new update_service_config
2458
+ delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service
2459
+ @delete_service = ::Gapic::Config::Method.new delete_service_config
2460
+ list_bindings_config = parent_rpcs.list_bindings if parent_rpcs.respond_to? :list_bindings
2461
+ @list_bindings = ::Gapic::Config::Method.new list_bindings_config
2462
+ get_binding_config = parent_rpcs.get_binding if parent_rpcs.respond_to? :get_binding
2463
+ @get_binding = ::Gapic::Config::Method.new get_binding_config
2464
+ create_binding_config = parent_rpcs.create_binding if parent_rpcs.respond_to? :create_binding
2465
+ @create_binding = ::Gapic::Config::Method.new create_binding_config
2466
+ update_binding_config = parent_rpcs.update_binding if parent_rpcs.respond_to? :update_binding
2467
+ @update_binding = ::Gapic::Config::Method.new update_binding_config
2468
+ delete_binding_config = parent_rpcs.delete_binding if parent_rpcs.respond_to? :delete_binding
2469
+ @delete_binding = ::Gapic::Config::Method.new delete_binding_config
2470
+ fetch_available_bindings_config = parent_rpcs.fetch_available_bindings if parent_rpcs.respond_to? :fetch_available_bindings
2471
+ @fetch_available_bindings = ::Gapic::Config::Method.new fetch_available_bindings_config
2472
+
2473
+ yield self if block_given?
2474
+ end
2475
+ end
2476
+ end
2477
+ end
2478
+ end
2479
+ end
2480
+ end
2481
+ end
2482
+ end
2483
+ end