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