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