google-cloud-network_connectivity-v1beta 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +153 -8
- data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service/client.rb +1782 -0
- data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service/credentials.rb +47 -0
- data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service/operations.rb +841 -0
- data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service/paths.rb +109 -0
- data/lib/google/cloud/network_connectivity/v1beta/data_transfer_service.rb +50 -0
- data/lib/google/cloud/network_connectivity/v1beta/hub_service/client.rb +3581 -0
- data/lib/google/cloud/network_connectivity/v1beta/hub_service/credentials.rb +47 -0
- data/lib/google/cloud/network_connectivity/v1beta/hub_service/operations.rb +841 -0
- data/lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb +259 -0
- data/lib/google/cloud/network_connectivity/v1beta/hub_service.rb +52 -0
- data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service/client.rb +877 -0
- data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service/credentials.rb +47 -0
- data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service/operations.rb +841 -0
- data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service/paths.rb +84 -0
- data/lib/google/cloud/network_connectivity/v1beta/policy_based_routing_service.rb +51 -0
- data/lib/google/cloud/network_connectivity/v1beta/transport_manager/client.rb +1285 -0
- data/lib/google/cloud/network_connectivity/v1beta/transport_manager/credentials.rb +47 -0
- data/lib/google/cloud/network_connectivity/v1beta/transport_manager/operations.rb +841 -0
- data/lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb +105 -0
- data/lib/google/cloud/network_connectivity/v1beta/transport_manager.rb +50 -0
- data/lib/google/cloud/network_connectivity/v1beta/version.rb +7 -2
- data/lib/google/cloud/network_connectivity/v1beta.rb +43 -0
- data/lib/google/cloud/networkconnectivity/v1beta/common_pb.rb +25 -0
- data/lib/google/cloud/networkconnectivity/v1beta/data_transfer_pb.rb +56 -0
- data/lib/google/cloud/networkconnectivity/v1beta/data_transfer_services_pb.rb +72 -0
- data/lib/google/cloud/networkconnectivity/v1beta/hub_pb.rb +111 -0
- data/lib/google/cloud/networkconnectivity/v1beta/hub_services_pb.rb +110 -0
- data/lib/google/cloud/networkconnectivity/v1beta/policy_based_routing_pb.rb +42 -0
- data/lib/google/cloud/networkconnectivity/v1beta/policy_based_routing_services_pb.rb +52 -0
- data/lib/google/cloud/networkconnectivity/v1beta/transport_manager_pb.rb +55 -0
- data/lib/google/cloud/networkconnectivity/v1beta/transport_manager_services_pb.rb +59 -0
- data/lib/google-cloud-network_connectivity-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +593 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/networkconnectivity/v1beta/common.rb +58 -0
- data/proto_docs/google/cloud/networkconnectivity/v1beta/data_transfer.rb +635 -0
- data/proto_docs/google/cloud/networkconnectivity/v1beta/hub.rb +2024 -0
- data/proto_docs/google/cloud/networkconnectivity/v1beta/policy_based_routing.rb +340 -0
- data/proto_docs/google/cloud/networkconnectivity/v1beta/transport_manager.rb +621 -0
- data/proto_docs/google/longrunning/operations.rb +191 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +116 -9
|
@@ -0,0 +1,1285 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "google/cloud/errors"
|
|
20
|
+
require "google/cloud/networkconnectivity/v1beta/transport_manager_pb"
|
|
21
|
+
require "google/cloud/location"
|
|
22
|
+
require "google/iam/v1"
|
|
23
|
+
|
|
24
|
+
module Google
|
|
25
|
+
module Cloud
|
|
26
|
+
module NetworkConnectivity
|
|
27
|
+
module V1beta
|
|
28
|
+
module TransportManager
|
|
29
|
+
##
|
|
30
|
+
# Client for the TransportManager service.
|
|
31
|
+
#
|
|
32
|
+
# The CLH based service for managing RemoteTransportProfiles and Transports.
|
|
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 :transport_manager_stub
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Configure the TransportManager Client class.
|
|
48
|
+
#
|
|
49
|
+
# See {::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client::Configuration}
|
|
50
|
+
# for a description of the configuration fields.
|
|
51
|
+
#
|
|
52
|
+
# @example
|
|
53
|
+
#
|
|
54
|
+
# # Modify the configuration for all TransportManager clients
|
|
55
|
+
# ::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::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", "V1beta"]
|
|
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.timeout = 60.0
|
|
76
|
+
default_config.retry_policy = {
|
|
77
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
default_config.rpcs.create_transport.timeout = 60.0
|
|
81
|
+
|
|
82
|
+
default_config.rpcs.update_transport.timeout = 60.0
|
|
83
|
+
|
|
84
|
+
default_config.rpcs.delete_transport.timeout = 60.0
|
|
85
|
+
|
|
86
|
+
default_config
|
|
87
|
+
end
|
|
88
|
+
yield @configure if block_given?
|
|
89
|
+
@configure
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
##
|
|
93
|
+
# Configure the TransportManager Client instance.
|
|
94
|
+
#
|
|
95
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
96
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
97
|
+
# should be made on {Client.configure}.
|
|
98
|
+
#
|
|
99
|
+
# See {::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client::Configuration}
|
|
100
|
+
# for a description of the configuration fields.
|
|
101
|
+
#
|
|
102
|
+
# @yield [config] Configure the Client client.
|
|
103
|
+
# @yieldparam config [Client::Configuration]
|
|
104
|
+
#
|
|
105
|
+
# @return [Client::Configuration]
|
|
106
|
+
#
|
|
107
|
+
def configure
|
|
108
|
+
yield @config if block_given?
|
|
109
|
+
@config
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
##
|
|
113
|
+
# The effective universe domain
|
|
114
|
+
#
|
|
115
|
+
# @return [String]
|
|
116
|
+
#
|
|
117
|
+
def universe_domain
|
|
118
|
+
@transport_manager_stub.universe_domain
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
##
|
|
122
|
+
# Create a new TransportManager client object.
|
|
123
|
+
#
|
|
124
|
+
# @example
|
|
125
|
+
#
|
|
126
|
+
# # Create a client using the default configuration
|
|
127
|
+
# client = ::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new
|
|
128
|
+
#
|
|
129
|
+
# # Create a client using a custom configuration
|
|
130
|
+
# client = ::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new do |config|
|
|
131
|
+
# config.timeout = 10.0
|
|
132
|
+
# end
|
|
133
|
+
#
|
|
134
|
+
# @yield [config] Configure the TransportManager client.
|
|
135
|
+
# @yieldparam config [Client::Configuration]
|
|
136
|
+
#
|
|
137
|
+
def initialize
|
|
138
|
+
# These require statements are intentionally placed here to initialize
|
|
139
|
+
# the gRPC module only when it's required.
|
|
140
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
|
141
|
+
require "gapic/grpc"
|
|
142
|
+
require "google/cloud/networkconnectivity/v1beta/transport_manager_services_pb"
|
|
143
|
+
|
|
144
|
+
# Create the configuration object
|
|
145
|
+
@config = Configuration.new Client.configure
|
|
146
|
+
|
|
147
|
+
# Yield the configuration if needed
|
|
148
|
+
yield @config if block_given?
|
|
149
|
+
|
|
150
|
+
# Create credentials
|
|
151
|
+
credentials = @config.credentials
|
|
152
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
153
|
+
# but only if the default endpoint does not have a region prefix.
|
|
154
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
155
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
156
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
157
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
158
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
159
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
160
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
161
|
+
end
|
|
162
|
+
@quota_project_id = @config.quota_project
|
|
163
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
164
|
+
|
|
165
|
+
@operations_client = Operations.new do |config|
|
|
166
|
+
config.credentials = credentials
|
|
167
|
+
config.quota_project = @quota_project_id
|
|
168
|
+
config.endpoint = @config.endpoint
|
|
169
|
+
config.universe_domain = @config.universe_domain
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@transport_manager_stub = ::Gapic::ServiceStub.new(
|
|
173
|
+
::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Stub,
|
|
174
|
+
credentials: credentials,
|
|
175
|
+
endpoint: @config.endpoint,
|
|
176
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
177
|
+
universe_domain: @config.universe_domain,
|
|
178
|
+
channel_args: @config.channel_args,
|
|
179
|
+
interceptors: @config.interceptors,
|
|
180
|
+
channel_pool_config: @config.channel_pool,
|
|
181
|
+
logger: @config.logger
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
@transport_manager_stub.stub_logger&.info do |entry|
|
|
185
|
+
entry.set_system_name
|
|
186
|
+
entry.set_service
|
|
187
|
+
entry.message = "Created client for #{entry.service}"
|
|
188
|
+
entry.set_credentials_fields credentials
|
|
189
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
190
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
191
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
|
195
|
+
config.credentials = credentials
|
|
196
|
+
config.quota_project = @quota_project_id
|
|
197
|
+
config.endpoint = @transport_manager_stub.endpoint
|
|
198
|
+
config.universe_domain = @transport_manager_stub.universe_domain
|
|
199
|
+
config.logger = @transport_manager_stub.logger if config.respond_to? :logger=
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
|
203
|
+
config.credentials = credentials
|
|
204
|
+
config.quota_project = @quota_project_id
|
|
205
|
+
config.endpoint = @transport_manager_stub.endpoint
|
|
206
|
+
config.universe_domain = @transport_manager_stub.universe_domain
|
|
207
|
+
config.logger = @transport_manager_stub.logger if config.respond_to? :logger=
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
##
|
|
212
|
+
# Get the associated client for long-running operations.
|
|
213
|
+
#
|
|
214
|
+
# @return [::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Operations]
|
|
215
|
+
#
|
|
216
|
+
attr_reader :operations_client
|
|
217
|
+
|
|
218
|
+
##
|
|
219
|
+
# Get the associated client for mix-in of the Locations.
|
|
220
|
+
#
|
|
221
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
|
222
|
+
#
|
|
223
|
+
attr_reader :location_client
|
|
224
|
+
|
|
225
|
+
##
|
|
226
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
|
227
|
+
#
|
|
228
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
|
229
|
+
#
|
|
230
|
+
attr_reader :iam_policy_client
|
|
231
|
+
|
|
232
|
+
##
|
|
233
|
+
# The logger used for request/response debug logging.
|
|
234
|
+
#
|
|
235
|
+
# @return [Logger]
|
|
236
|
+
#
|
|
237
|
+
def logger
|
|
238
|
+
@transport_manager_stub.logger
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Service calls
|
|
242
|
+
|
|
243
|
+
##
|
|
244
|
+
# Lists RemoteTransportProfiles in a given project and location.
|
|
245
|
+
#
|
|
246
|
+
# @overload list_remote_transport_profiles(request, options = nil)
|
|
247
|
+
# Pass arguments to `list_remote_transport_profiles` via a request object, either of type
|
|
248
|
+
# {::Google::Cloud::NetworkConnectivity::V1beta::ListRemoteTransportProfilesRequest} or an equivalent Hash.
|
|
249
|
+
#
|
|
250
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListRemoteTransportProfilesRequest, ::Hash]
|
|
251
|
+
# A request object representing the call parameters. Required. To specify no
|
|
252
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
253
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
254
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
255
|
+
#
|
|
256
|
+
# @overload list_remote_transport_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
|
257
|
+
# Pass arguments to `list_remote_transport_profiles` via keyword arguments. Note that at
|
|
258
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
259
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
260
|
+
#
|
|
261
|
+
# @param parent [::String]
|
|
262
|
+
# Required. Parent value for ListRemoteTransportProfilesRequest.
|
|
263
|
+
# @param page_size [::Integer]
|
|
264
|
+
# Optional. Requested page size. Server may return fewer items than
|
|
265
|
+
# requested. If unspecified, server will pick an appropriate default.
|
|
266
|
+
# @param page_token [::String]
|
|
267
|
+
# Optional. A token identifying a page of results the server should return.
|
|
268
|
+
# @param filter [::String]
|
|
269
|
+
# Optional. Filtering results.
|
|
270
|
+
# @param order_by [::String]
|
|
271
|
+
# Optional. Hint for how to order the results.
|
|
272
|
+
#
|
|
273
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
274
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>]
|
|
275
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
276
|
+
#
|
|
277
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile>]
|
|
278
|
+
#
|
|
279
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
280
|
+
#
|
|
281
|
+
# @example Basic example
|
|
282
|
+
# require "google/cloud/network_connectivity/v1beta"
|
|
283
|
+
#
|
|
284
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
285
|
+
# client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new
|
|
286
|
+
#
|
|
287
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
288
|
+
# request = Google::Cloud::NetworkConnectivity::V1beta::ListRemoteTransportProfilesRequest.new
|
|
289
|
+
#
|
|
290
|
+
# # Call the list_remote_transport_profiles method.
|
|
291
|
+
# result = client.list_remote_transport_profiles request
|
|
292
|
+
#
|
|
293
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
294
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
295
|
+
# result.each do |item|
|
|
296
|
+
# # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile.
|
|
297
|
+
# p item
|
|
298
|
+
# end
|
|
299
|
+
#
|
|
300
|
+
def list_remote_transport_profiles request, options = nil
|
|
301
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
302
|
+
|
|
303
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListRemoteTransportProfilesRequest
|
|
304
|
+
|
|
305
|
+
# Converts hash and nil to an options object
|
|
306
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
307
|
+
|
|
308
|
+
# Customize the options with defaults
|
|
309
|
+
metadata = @config.rpcs.list_remote_transport_profiles.metadata.to_h
|
|
310
|
+
|
|
311
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
312
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
313
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
314
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION
|
|
315
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
316
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
317
|
+
|
|
318
|
+
header_params = {}
|
|
319
|
+
if request.parent
|
|
320
|
+
header_params["parent"] = request.parent
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
324
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
325
|
+
|
|
326
|
+
options.apply_defaults timeout: @config.rpcs.list_remote_transport_profiles.timeout,
|
|
327
|
+
metadata: metadata,
|
|
328
|
+
retry_policy: @config.rpcs.list_remote_transport_profiles.retry_policy
|
|
329
|
+
|
|
330
|
+
options.apply_defaults timeout: @config.timeout,
|
|
331
|
+
metadata: @config.metadata,
|
|
332
|
+
retry_policy: @config.retry_policy
|
|
333
|
+
|
|
334
|
+
@transport_manager_stub.call_rpc :list_remote_transport_profiles, request, options: options do |response, operation|
|
|
335
|
+
response = ::Gapic::PagedEnumerable.new @transport_manager_stub, :list_remote_transport_profiles, request, response, operation, options
|
|
336
|
+
yield response, operation if block_given?
|
|
337
|
+
throw :response, response
|
|
338
|
+
end
|
|
339
|
+
rescue ::GRPC::BadStatus => e
|
|
340
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
##
|
|
344
|
+
# Gets details of a single RemoteTransportProfile.
|
|
345
|
+
#
|
|
346
|
+
# @overload get_remote_transport_profile(request, options = nil)
|
|
347
|
+
# Pass arguments to `get_remote_transport_profile` via a request object, either of type
|
|
348
|
+
# {::Google::Cloud::NetworkConnectivity::V1beta::GetRemoteTransportProfileRequest} or an equivalent Hash.
|
|
349
|
+
#
|
|
350
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetRemoteTransportProfileRequest, ::Hash]
|
|
351
|
+
# A request object representing the call parameters. Required. To specify no
|
|
352
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
353
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
354
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
355
|
+
#
|
|
356
|
+
# @overload get_remote_transport_profile(name: nil)
|
|
357
|
+
# Pass arguments to `get_remote_transport_profile` via keyword arguments. Note that at
|
|
358
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
359
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
360
|
+
#
|
|
361
|
+
# @param name [::String]
|
|
362
|
+
# Required. Name of the resource.
|
|
363
|
+
#
|
|
364
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
365
|
+
# @yieldparam response [::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile]
|
|
366
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
367
|
+
#
|
|
368
|
+
# @return [::Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile]
|
|
369
|
+
#
|
|
370
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
371
|
+
#
|
|
372
|
+
# @example Basic example
|
|
373
|
+
# require "google/cloud/network_connectivity/v1beta"
|
|
374
|
+
#
|
|
375
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
376
|
+
# client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new
|
|
377
|
+
#
|
|
378
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
379
|
+
# request = Google::Cloud::NetworkConnectivity::V1beta::GetRemoteTransportProfileRequest.new
|
|
380
|
+
#
|
|
381
|
+
# # Call the get_remote_transport_profile method.
|
|
382
|
+
# result = client.get_remote_transport_profile request
|
|
383
|
+
#
|
|
384
|
+
# # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::RemoteTransportProfile.
|
|
385
|
+
# p result
|
|
386
|
+
#
|
|
387
|
+
def get_remote_transport_profile request, options = nil
|
|
388
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
389
|
+
|
|
390
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetRemoteTransportProfileRequest
|
|
391
|
+
|
|
392
|
+
# Converts hash and nil to an options object
|
|
393
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
394
|
+
|
|
395
|
+
# Customize the options with defaults
|
|
396
|
+
metadata = @config.rpcs.get_remote_transport_profile.metadata.to_h
|
|
397
|
+
|
|
398
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
399
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
400
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
401
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION
|
|
402
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
403
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
404
|
+
|
|
405
|
+
header_params = {}
|
|
406
|
+
if request.name
|
|
407
|
+
header_params["name"] = request.name
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
411
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
412
|
+
|
|
413
|
+
options.apply_defaults timeout: @config.rpcs.get_remote_transport_profile.timeout,
|
|
414
|
+
metadata: metadata,
|
|
415
|
+
retry_policy: @config.rpcs.get_remote_transport_profile.retry_policy
|
|
416
|
+
|
|
417
|
+
options.apply_defaults timeout: @config.timeout,
|
|
418
|
+
metadata: @config.metadata,
|
|
419
|
+
retry_policy: @config.retry_policy
|
|
420
|
+
|
|
421
|
+
@transport_manager_stub.call_rpc :get_remote_transport_profile, request, options: options do |response, operation|
|
|
422
|
+
yield response, operation if block_given?
|
|
423
|
+
end
|
|
424
|
+
rescue ::GRPC::BadStatus => e
|
|
425
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
##
|
|
429
|
+
# Lists Transports in a given project and location.
|
|
430
|
+
#
|
|
431
|
+
# @overload list_transports(request, options = nil)
|
|
432
|
+
# Pass arguments to `list_transports` via a request object, either of type
|
|
433
|
+
# {::Google::Cloud::NetworkConnectivity::V1beta::ListTransportsRequest} or an equivalent Hash.
|
|
434
|
+
#
|
|
435
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1beta::ListTransportsRequest, ::Hash]
|
|
436
|
+
# A request object representing the call parameters. Required. To specify no
|
|
437
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
438
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
439
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
440
|
+
#
|
|
441
|
+
# @overload list_transports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
|
442
|
+
# Pass arguments to `list_transports` via keyword arguments. Note that at
|
|
443
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
444
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
445
|
+
#
|
|
446
|
+
# @param parent [::String]
|
|
447
|
+
# Required. Parent value for ListTransportsRequest.
|
|
448
|
+
# @param page_size [::Integer]
|
|
449
|
+
# Optional. Requested page size. Server may return fewer items than
|
|
450
|
+
# requested. If unspecified, server will pick an appropriate default.
|
|
451
|
+
# @param page_token [::String]
|
|
452
|
+
# Optional. A token identifying a page of results the server should return.
|
|
453
|
+
# @param filter [::String]
|
|
454
|
+
# Optional. Filtering results.
|
|
455
|
+
# @param order_by [::String]
|
|
456
|
+
# Optional. Hint for how to order the results.
|
|
457
|
+
#
|
|
458
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
459
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Transport>]
|
|
460
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
461
|
+
#
|
|
462
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1beta::Transport>]
|
|
463
|
+
#
|
|
464
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
465
|
+
#
|
|
466
|
+
# @example Basic example
|
|
467
|
+
# require "google/cloud/network_connectivity/v1beta"
|
|
468
|
+
#
|
|
469
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
470
|
+
# client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new
|
|
471
|
+
#
|
|
472
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
473
|
+
# request = Google::Cloud::NetworkConnectivity::V1beta::ListTransportsRequest.new
|
|
474
|
+
#
|
|
475
|
+
# # Call the list_transports method.
|
|
476
|
+
# result = client.list_transports request
|
|
477
|
+
#
|
|
478
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
479
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
480
|
+
# result.each do |item|
|
|
481
|
+
# # Each element is of type ::Google::Cloud::NetworkConnectivity::V1beta::Transport.
|
|
482
|
+
# p item
|
|
483
|
+
# end
|
|
484
|
+
#
|
|
485
|
+
def list_transports request, options = nil
|
|
486
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
487
|
+
|
|
488
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::ListTransportsRequest
|
|
489
|
+
|
|
490
|
+
# Converts hash and nil to an options object
|
|
491
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
492
|
+
|
|
493
|
+
# Customize the options with defaults
|
|
494
|
+
metadata = @config.rpcs.list_transports.metadata.to_h
|
|
495
|
+
|
|
496
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
497
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
498
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
499
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION
|
|
500
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
501
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
502
|
+
|
|
503
|
+
header_params = {}
|
|
504
|
+
if request.parent
|
|
505
|
+
header_params["parent"] = request.parent
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
509
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
510
|
+
|
|
511
|
+
options.apply_defaults timeout: @config.rpcs.list_transports.timeout,
|
|
512
|
+
metadata: metadata,
|
|
513
|
+
retry_policy: @config.rpcs.list_transports.retry_policy
|
|
514
|
+
|
|
515
|
+
options.apply_defaults timeout: @config.timeout,
|
|
516
|
+
metadata: @config.metadata,
|
|
517
|
+
retry_policy: @config.retry_policy
|
|
518
|
+
|
|
519
|
+
@transport_manager_stub.call_rpc :list_transports, request, options: options do |response, operation|
|
|
520
|
+
response = ::Gapic::PagedEnumerable.new @transport_manager_stub, :list_transports, request, response, operation, options
|
|
521
|
+
yield response, operation if block_given?
|
|
522
|
+
throw :response, response
|
|
523
|
+
end
|
|
524
|
+
rescue ::GRPC::BadStatus => e
|
|
525
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
##
|
|
529
|
+
# Gets details of a single Transport.
|
|
530
|
+
#
|
|
531
|
+
# @overload get_transport(request, options = nil)
|
|
532
|
+
# Pass arguments to `get_transport` via a request object, either of type
|
|
533
|
+
# {::Google::Cloud::NetworkConnectivity::V1beta::GetTransportRequest} or an equivalent Hash.
|
|
534
|
+
#
|
|
535
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetTransportRequest, ::Hash]
|
|
536
|
+
# A request object representing the call parameters. Required. To specify no
|
|
537
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
538
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
539
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
540
|
+
#
|
|
541
|
+
# @overload get_transport(name: nil)
|
|
542
|
+
# Pass arguments to `get_transport` via keyword arguments. Note that at
|
|
543
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
544
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
545
|
+
#
|
|
546
|
+
# @param name [::String]
|
|
547
|
+
# Required. Name of the resource.
|
|
548
|
+
#
|
|
549
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
550
|
+
# @yieldparam response [::Google::Cloud::NetworkConnectivity::V1beta::Transport]
|
|
551
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
552
|
+
#
|
|
553
|
+
# @return [::Google::Cloud::NetworkConnectivity::V1beta::Transport]
|
|
554
|
+
#
|
|
555
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
556
|
+
#
|
|
557
|
+
# @example Basic example
|
|
558
|
+
# require "google/cloud/network_connectivity/v1beta"
|
|
559
|
+
#
|
|
560
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
561
|
+
# client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new
|
|
562
|
+
#
|
|
563
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
564
|
+
# request = Google::Cloud::NetworkConnectivity::V1beta::GetTransportRequest.new
|
|
565
|
+
#
|
|
566
|
+
# # Call the get_transport method.
|
|
567
|
+
# result = client.get_transport request
|
|
568
|
+
#
|
|
569
|
+
# # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::Transport.
|
|
570
|
+
# p result
|
|
571
|
+
#
|
|
572
|
+
def get_transport request, options = nil
|
|
573
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
574
|
+
|
|
575
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetTransportRequest
|
|
576
|
+
|
|
577
|
+
# Converts hash and nil to an options object
|
|
578
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
579
|
+
|
|
580
|
+
# Customize the options with defaults
|
|
581
|
+
metadata = @config.rpcs.get_transport.metadata.to_h
|
|
582
|
+
|
|
583
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
584
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
585
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
586
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION
|
|
587
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
588
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
589
|
+
|
|
590
|
+
header_params = {}
|
|
591
|
+
if request.name
|
|
592
|
+
header_params["name"] = request.name
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
596
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
597
|
+
|
|
598
|
+
options.apply_defaults timeout: @config.rpcs.get_transport.timeout,
|
|
599
|
+
metadata: metadata,
|
|
600
|
+
retry_policy: @config.rpcs.get_transport.retry_policy
|
|
601
|
+
|
|
602
|
+
options.apply_defaults timeout: @config.timeout,
|
|
603
|
+
metadata: @config.metadata,
|
|
604
|
+
retry_policy: @config.retry_policy
|
|
605
|
+
|
|
606
|
+
@transport_manager_stub.call_rpc :get_transport, request, options: options do |response, operation|
|
|
607
|
+
yield response, operation if block_given?
|
|
608
|
+
end
|
|
609
|
+
rescue ::GRPC::BadStatus => e
|
|
610
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
##
|
|
614
|
+
# Gets the operational status of a single Transport.
|
|
615
|
+
#
|
|
616
|
+
# @overload get_status(request, options = nil)
|
|
617
|
+
# Pass arguments to `get_status` via a request object, either of type
|
|
618
|
+
# {::Google::Cloud::NetworkConnectivity::V1beta::GetStatusRequest} or an equivalent Hash.
|
|
619
|
+
#
|
|
620
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1beta::GetStatusRequest, ::Hash]
|
|
621
|
+
# A request object representing the call parameters. Required. To specify no
|
|
622
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
623
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
624
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
625
|
+
#
|
|
626
|
+
# @overload get_status(name: nil)
|
|
627
|
+
# Pass arguments to `get_status` via keyword arguments. Note that at
|
|
628
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
629
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
630
|
+
#
|
|
631
|
+
# @param name [::String]
|
|
632
|
+
# Required. Name of the resource.
|
|
633
|
+
#
|
|
634
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
635
|
+
# @yieldparam response [::Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponse]
|
|
636
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
637
|
+
#
|
|
638
|
+
# @return [::Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponse]
|
|
639
|
+
#
|
|
640
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
641
|
+
#
|
|
642
|
+
# @example Basic example
|
|
643
|
+
# require "google/cloud/network_connectivity/v1beta"
|
|
644
|
+
#
|
|
645
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
646
|
+
# client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new
|
|
647
|
+
#
|
|
648
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
649
|
+
# request = Google::Cloud::NetworkConnectivity::V1beta::GetStatusRequest.new
|
|
650
|
+
#
|
|
651
|
+
# # Call the get_status method.
|
|
652
|
+
# result = client.get_status request
|
|
653
|
+
#
|
|
654
|
+
# # The returned object is of type Google::Cloud::NetworkConnectivity::V1beta::GetStatusResponse.
|
|
655
|
+
# p result
|
|
656
|
+
#
|
|
657
|
+
def get_status request, options = nil
|
|
658
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
659
|
+
|
|
660
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::GetStatusRequest
|
|
661
|
+
|
|
662
|
+
# Converts hash and nil to an options object
|
|
663
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
664
|
+
|
|
665
|
+
# Customize the options with defaults
|
|
666
|
+
metadata = @config.rpcs.get_status.metadata.to_h
|
|
667
|
+
|
|
668
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
669
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
670
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
671
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION
|
|
672
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
673
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
674
|
+
|
|
675
|
+
header_params = {}
|
|
676
|
+
if request.name
|
|
677
|
+
header_params["name"] = request.name
|
|
678
|
+
end
|
|
679
|
+
|
|
680
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
681
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
682
|
+
|
|
683
|
+
options.apply_defaults timeout: @config.rpcs.get_status.timeout,
|
|
684
|
+
metadata: metadata,
|
|
685
|
+
retry_policy: @config.rpcs.get_status.retry_policy
|
|
686
|
+
|
|
687
|
+
options.apply_defaults timeout: @config.timeout,
|
|
688
|
+
metadata: @config.metadata,
|
|
689
|
+
retry_policy: @config.retry_policy
|
|
690
|
+
|
|
691
|
+
@transport_manager_stub.call_rpc :get_status, request, options: options do |response, operation|
|
|
692
|
+
yield response, operation if block_given?
|
|
693
|
+
end
|
|
694
|
+
rescue ::GRPC::BadStatus => e
|
|
695
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
##
|
|
699
|
+
# Creates a new Transport in a given project and location.
|
|
700
|
+
#
|
|
701
|
+
# @overload create_transport(request, options = nil)
|
|
702
|
+
# Pass arguments to `create_transport` via a request object, either of type
|
|
703
|
+
# {::Google::Cloud::NetworkConnectivity::V1beta::CreateTransportRequest} or an equivalent Hash.
|
|
704
|
+
#
|
|
705
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1beta::CreateTransportRequest, ::Hash]
|
|
706
|
+
# A request object representing the call parameters. Required. To specify no
|
|
707
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
708
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
709
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
710
|
+
#
|
|
711
|
+
# @overload create_transport(parent: nil, transport_id: nil, transport: nil, request_id: nil)
|
|
712
|
+
# Pass arguments to `create_transport` via keyword arguments. Note that at
|
|
713
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
714
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
715
|
+
#
|
|
716
|
+
# @param parent [::String]
|
|
717
|
+
# Required. Value for parent.
|
|
718
|
+
# @param transport_id [::String]
|
|
719
|
+
# Required. Id of the requesting object
|
|
720
|
+
# @param transport [::Google::Cloud::NetworkConnectivity::V1beta::Transport, ::Hash]
|
|
721
|
+
# Required. The resource being created
|
|
722
|
+
# @param request_id [::String]
|
|
723
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
724
|
+
# request ID so that if you must retry your request, the server will know to
|
|
725
|
+
# ignore the request if it has already been completed. The server will
|
|
726
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
727
|
+
#
|
|
728
|
+
# For example, consider a situation where you make an initial request and the
|
|
729
|
+
# request times out. If you make the request again with the same request
|
|
730
|
+
# ID, the server can check if original operation with the same request ID
|
|
731
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
732
|
+
# clients from accidentally creating duplicate commitments.
|
|
733
|
+
#
|
|
734
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
735
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
736
|
+
#
|
|
737
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
738
|
+
# @yieldparam response [::Gapic::Operation]
|
|
739
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
740
|
+
#
|
|
741
|
+
# @return [::Gapic::Operation]
|
|
742
|
+
#
|
|
743
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
744
|
+
#
|
|
745
|
+
# @example Basic example
|
|
746
|
+
# require "google/cloud/network_connectivity/v1beta"
|
|
747
|
+
#
|
|
748
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
749
|
+
# client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new
|
|
750
|
+
#
|
|
751
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
752
|
+
# request = Google::Cloud::NetworkConnectivity::V1beta::CreateTransportRequest.new
|
|
753
|
+
#
|
|
754
|
+
# # Call the create_transport method.
|
|
755
|
+
# result = client.create_transport request
|
|
756
|
+
#
|
|
757
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
758
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
759
|
+
# # Here is how to wait for a response.
|
|
760
|
+
# result.wait_until_done! timeout: 60
|
|
761
|
+
# if result.response?
|
|
762
|
+
# p result.response
|
|
763
|
+
# else
|
|
764
|
+
# puts "No response received."
|
|
765
|
+
# end
|
|
766
|
+
#
|
|
767
|
+
def create_transport request, options = nil
|
|
768
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
769
|
+
|
|
770
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::CreateTransportRequest
|
|
771
|
+
|
|
772
|
+
# Converts hash and nil to an options object
|
|
773
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
774
|
+
|
|
775
|
+
# Customize the options with defaults
|
|
776
|
+
metadata = @config.rpcs.create_transport.metadata.to_h
|
|
777
|
+
|
|
778
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
779
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
780
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
781
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION
|
|
782
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
783
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
784
|
+
|
|
785
|
+
header_params = {}
|
|
786
|
+
if request.parent
|
|
787
|
+
header_params["parent"] = request.parent
|
|
788
|
+
end
|
|
789
|
+
|
|
790
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
791
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
792
|
+
|
|
793
|
+
options.apply_defaults timeout: @config.rpcs.create_transport.timeout,
|
|
794
|
+
metadata: metadata,
|
|
795
|
+
retry_policy: @config.rpcs.create_transport.retry_policy
|
|
796
|
+
|
|
797
|
+
options.apply_defaults timeout: @config.timeout,
|
|
798
|
+
metadata: @config.metadata,
|
|
799
|
+
retry_policy: @config.retry_policy
|
|
800
|
+
|
|
801
|
+
@transport_manager_stub.call_rpc :create_transport, request, options: options do |response, operation|
|
|
802
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
803
|
+
yield response, operation if block_given?
|
|
804
|
+
throw :response, response
|
|
805
|
+
end
|
|
806
|
+
rescue ::GRPC::BadStatus => e
|
|
807
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
##
|
|
811
|
+
# Updates the parameters of a single Transport.
|
|
812
|
+
#
|
|
813
|
+
# @overload update_transport(request, options = nil)
|
|
814
|
+
# Pass arguments to `update_transport` via a request object, either of type
|
|
815
|
+
# {::Google::Cloud::NetworkConnectivity::V1beta::UpdateTransportRequest} or an equivalent Hash.
|
|
816
|
+
#
|
|
817
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1beta::UpdateTransportRequest, ::Hash]
|
|
818
|
+
# A request object representing the call parameters. Required. To specify no
|
|
819
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
820
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
821
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
822
|
+
#
|
|
823
|
+
# @overload update_transport(update_mask: nil, transport: nil, request_id: nil)
|
|
824
|
+
# Pass arguments to `update_transport` via keyword arguments. Note that at
|
|
825
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
826
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
827
|
+
#
|
|
828
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
829
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
|
830
|
+
# Transport resource by the update.
|
|
831
|
+
# The fields specified in the update_mask are relative to the resource, not
|
|
832
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
|
833
|
+
# user does not provide a mask then all fields present in the request will be
|
|
834
|
+
# overwritten.
|
|
835
|
+
# @param transport [::Google::Cloud::NetworkConnectivity::V1beta::Transport, ::Hash]
|
|
836
|
+
# Required. The resource being updated.
|
|
837
|
+
# @param request_id [::String]
|
|
838
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
839
|
+
# request ID so that if you must retry your request, the server will know to
|
|
840
|
+
# ignore the request if it has already been completed. The server will
|
|
841
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
842
|
+
#
|
|
843
|
+
# For example, consider a situation where you make an initial request and the
|
|
844
|
+
# request times out. If you make the request again with the same request
|
|
845
|
+
# ID, the server can check if original operation with the same request ID
|
|
846
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
847
|
+
# clients from accidentally creating duplicate commitments.
|
|
848
|
+
#
|
|
849
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
850
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
851
|
+
#
|
|
852
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
853
|
+
# @yieldparam response [::Gapic::Operation]
|
|
854
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
855
|
+
#
|
|
856
|
+
# @return [::Gapic::Operation]
|
|
857
|
+
#
|
|
858
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
859
|
+
#
|
|
860
|
+
# @example Basic example
|
|
861
|
+
# require "google/cloud/network_connectivity/v1beta"
|
|
862
|
+
#
|
|
863
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
864
|
+
# client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new
|
|
865
|
+
#
|
|
866
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
867
|
+
# request = Google::Cloud::NetworkConnectivity::V1beta::UpdateTransportRequest.new
|
|
868
|
+
#
|
|
869
|
+
# # Call the update_transport method.
|
|
870
|
+
# result = client.update_transport request
|
|
871
|
+
#
|
|
872
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
873
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
874
|
+
# # Here is how to wait for a response.
|
|
875
|
+
# result.wait_until_done! timeout: 60
|
|
876
|
+
# if result.response?
|
|
877
|
+
# p result.response
|
|
878
|
+
# else
|
|
879
|
+
# puts "No response received."
|
|
880
|
+
# end
|
|
881
|
+
#
|
|
882
|
+
def update_transport request, options = nil
|
|
883
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
884
|
+
|
|
885
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::UpdateTransportRequest
|
|
886
|
+
|
|
887
|
+
# Converts hash and nil to an options object
|
|
888
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
889
|
+
|
|
890
|
+
# Customize the options with defaults
|
|
891
|
+
metadata = @config.rpcs.update_transport.metadata.to_h
|
|
892
|
+
|
|
893
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
894
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
895
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
896
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION
|
|
897
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
898
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
899
|
+
|
|
900
|
+
header_params = {}
|
|
901
|
+
if request.transport&.name
|
|
902
|
+
header_params["transport.name"] = request.transport.name
|
|
903
|
+
end
|
|
904
|
+
|
|
905
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
906
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
907
|
+
|
|
908
|
+
options.apply_defaults timeout: @config.rpcs.update_transport.timeout,
|
|
909
|
+
metadata: metadata,
|
|
910
|
+
retry_policy: @config.rpcs.update_transport.retry_policy
|
|
911
|
+
|
|
912
|
+
options.apply_defaults timeout: @config.timeout,
|
|
913
|
+
metadata: @config.metadata,
|
|
914
|
+
retry_policy: @config.retry_policy
|
|
915
|
+
|
|
916
|
+
@transport_manager_stub.call_rpc :update_transport, request, options: options do |response, operation|
|
|
917
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
918
|
+
yield response, operation if block_given?
|
|
919
|
+
throw :response, response
|
|
920
|
+
end
|
|
921
|
+
rescue ::GRPC::BadStatus => e
|
|
922
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
923
|
+
end
|
|
924
|
+
|
|
925
|
+
##
|
|
926
|
+
# Deletes a single Transport.
|
|
927
|
+
#
|
|
928
|
+
# @overload delete_transport(request, options = nil)
|
|
929
|
+
# Pass arguments to `delete_transport` via a request object, either of type
|
|
930
|
+
# {::Google::Cloud::NetworkConnectivity::V1beta::DeleteTransportRequest} or an equivalent Hash.
|
|
931
|
+
#
|
|
932
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1beta::DeleteTransportRequest, ::Hash]
|
|
933
|
+
# A request object representing the call parameters. Required. To specify no
|
|
934
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
935
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
936
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
937
|
+
#
|
|
938
|
+
# @overload delete_transport(name: nil, request_id: nil)
|
|
939
|
+
# Pass arguments to `delete_transport` via keyword arguments. Note that at
|
|
940
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
941
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
942
|
+
#
|
|
943
|
+
# @param name [::String]
|
|
944
|
+
# Required. Name of the resource.
|
|
945
|
+
# @param request_id [::String]
|
|
946
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
947
|
+
# request ID so that if you must retry your request, the server will know to
|
|
948
|
+
# ignore the request if it has already been completed. The server will
|
|
949
|
+
# guarantee that for at least 60 minutes after the first request.
|
|
950
|
+
#
|
|
951
|
+
# For example, consider a situation where you make an initial request and the
|
|
952
|
+
# request times out. If you make the request again with the same request
|
|
953
|
+
# ID, the server can check if original operation with the same request ID
|
|
954
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
955
|
+
# clients from accidentally creating duplicate commitments.
|
|
956
|
+
#
|
|
957
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
958
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
959
|
+
#
|
|
960
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
961
|
+
# @yieldparam response [::Gapic::Operation]
|
|
962
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
963
|
+
#
|
|
964
|
+
# @return [::Gapic::Operation]
|
|
965
|
+
#
|
|
966
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
967
|
+
#
|
|
968
|
+
# @example Basic example
|
|
969
|
+
# require "google/cloud/network_connectivity/v1beta"
|
|
970
|
+
#
|
|
971
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
972
|
+
# client = Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new
|
|
973
|
+
#
|
|
974
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
975
|
+
# request = Google::Cloud::NetworkConnectivity::V1beta::DeleteTransportRequest.new
|
|
976
|
+
#
|
|
977
|
+
# # Call the delete_transport method.
|
|
978
|
+
# result = client.delete_transport request
|
|
979
|
+
#
|
|
980
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
981
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
982
|
+
# # Here is how to wait for a response.
|
|
983
|
+
# result.wait_until_done! timeout: 60
|
|
984
|
+
# if result.response?
|
|
985
|
+
# p result.response
|
|
986
|
+
# else
|
|
987
|
+
# puts "No response received."
|
|
988
|
+
# end
|
|
989
|
+
#
|
|
990
|
+
def delete_transport request, options = nil
|
|
991
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
992
|
+
|
|
993
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1beta::DeleteTransportRequest
|
|
994
|
+
|
|
995
|
+
# Converts hash and nil to an options object
|
|
996
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
997
|
+
|
|
998
|
+
# Customize the options with defaults
|
|
999
|
+
metadata = @config.rpcs.delete_transport.metadata.to_h
|
|
1000
|
+
|
|
1001
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1002
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1003
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1004
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1beta::VERSION
|
|
1005
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1006
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1007
|
+
|
|
1008
|
+
header_params = {}
|
|
1009
|
+
if request.name
|
|
1010
|
+
header_params["name"] = request.name
|
|
1011
|
+
end
|
|
1012
|
+
|
|
1013
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1014
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1015
|
+
|
|
1016
|
+
options.apply_defaults timeout: @config.rpcs.delete_transport.timeout,
|
|
1017
|
+
metadata: metadata,
|
|
1018
|
+
retry_policy: @config.rpcs.delete_transport.retry_policy
|
|
1019
|
+
|
|
1020
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1021
|
+
metadata: @config.metadata,
|
|
1022
|
+
retry_policy: @config.retry_policy
|
|
1023
|
+
|
|
1024
|
+
@transport_manager_stub.call_rpc :delete_transport, request, options: options do |response, operation|
|
|
1025
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1026
|
+
yield response, operation if block_given?
|
|
1027
|
+
throw :response, response
|
|
1028
|
+
end
|
|
1029
|
+
rescue ::GRPC::BadStatus => e
|
|
1030
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
##
|
|
1034
|
+
# Configuration class for the TransportManager API.
|
|
1035
|
+
#
|
|
1036
|
+
# This class represents the configuration for TransportManager,
|
|
1037
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1038
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1039
|
+
# applied individually to specific RPCs. See
|
|
1040
|
+
# {::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client::Configuration::Rpcs}
|
|
1041
|
+
# for a list of RPCs that can be configured independently.
|
|
1042
|
+
#
|
|
1043
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1044
|
+
# on construction.
|
|
1045
|
+
#
|
|
1046
|
+
# @example
|
|
1047
|
+
#
|
|
1048
|
+
# # Modify the global config, setting the timeout for
|
|
1049
|
+
# # list_remote_transport_profiles to 20 seconds,
|
|
1050
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1051
|
+
# ::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.configure do |config|
|
|
1052
|
+
# config.timeout = 10.0
|
|
1053
|
+
# config.rpcs.list_remote_transport_profiles.timeout = 20.0
|
|
1054
|
+
# end
|
|
1055
|
+
#
|
|
1056
|
+
# # Apply the above configuration only to a new client.
|
|
1057
|
+
# client = ::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new do |config|
|
|
1058
|
+
# config.timeout = 10.0
|
|
1059
|
+
# config.rpcs.list_remote_transport_profiles.timeout = 20.0
|
|
1060
|
+
# end
|
|
1061
|
+
#
|
|
1062
|
+
# @!attribute [rw] endpoint
|
|
1063
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1064
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1065
|
+
# @return [::String,nil]
|
|
1066
|
+
# @!attribute [rw] credentials
|
|
1067
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1068
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1069
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1070
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1071
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
1072
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
1073
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1074
|
+
# * (`nil`) indicating no credentials
|
|
1075
|
+
#
|
|
1076
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
1077
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
1078
|
+
# Google APIs can compromise the security of your systems and data.
|
|
1079
|
+
#
|
|
1080
|
+
# @example
|
|
1081
|
+
#
|
|
1082
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
1083
|
+
# # on the appropriate credentials class for your environment.
|
|
1084
|
+
#
|
|
1085
|
+
# require "googleauth"
|
|
1086
|
+
#
|
|
1087
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
1088
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
1089
|
+
# )
|
|
1090
|
+
#
|
|
1091
|
+
# client = ::Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Client.new do |config|
|
|
1092
|
+
# config.credentials = credentials
|
|
1093
|
+
# end
|
|
1094
|
+
#
|
|
1095
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1096
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1097
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1098
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1099
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1100
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1101
|
+
# @return [::Object]
|
|
1102
|
+
# @!attribute [rw] scope
|
|
1103
|
+
# The OAuth scopes
|
|
1104
|
+
# @return [::Array<::String>]
|
|
1105
|
+
# @!attribute [rw] lib_name
|
|
1106
|
+
# The library name as recorded in instrumentation and logging
|
|
1107
|
+
# @return [::String]
|
|
1108
|
+
# @!attribute [rw] lib_version
|
|
1109
|
+
# The library version as recorded in instrumentation and logging
|
|
1110
|
+
# @return [::String]
|
|
1111
|
+
# @!attribute [rw] channel_args
|
|
1112
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
1113
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
|
1114
|
+
# @return [::Hash]
|
|
1115
|
+
# @!attribute [rw] interceptors
|
|
1116
|
+
# An array of interceptors that are run before calls are executed.
|
|
1117
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
1118
|
+
# @!attribute [rw] timeout
|
|
1119
|
+
# The call timeout in seconds.
|
|
1120
|
+
# @return [::Numeric]
|
|
1121
|
+
# @!attribute [rw] metadata
|
|
1122
|
+
# Additional gRPC headers to be sent with the call.
|
|
1123
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1124
|
+
# @!attribute [rw] retry_policy
|
|
1125
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1126
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1127
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1128
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1129
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1130
|
+
# trigger a retry.
|
|
1131
|
+
# @return [::Hash]
|
|
1132
|
+
# @!attribute [rw] quota_project
|
|
1133
|
+
# A separate project against which to charge quota.
|
|
1134
|
+
# @return [::String]
|
|
1135
|
+
# @!attribute [rw] universe_domain
|
|
1136
|
+
# The universe domain within which to make requests. This determines the
|
|
1137
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1138
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1139
|
+
# @return [::String,nil]
|
|
1140
|
+
# @!attribute [rw] logger
|
|
1141
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1142
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1143
|
+
# explicitly disable logging.
|
|
1144
|
+
# @return [::Logger,:default,nil]
|
|
1145
|
+
#
|
|
1146
|
+
class Configuration
|
|
1147
|
+
extend ::Gapic::Config
|
|
1148
|
+
|
|
1149
|
+
# @private
|
|
1150
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1151
|
+
DEFAULT_ENDPOINT = "networkconnectivity.googleapis.com"
|
|
1152
|
+
|
|
1153
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1154
|
+
config_attr :credentials, nil do |value|
|
|
1155
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
1156
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
|
|
1157
|
+
allowed.any? { |klass| klass === value }
|
|
1158
|
+
end
|
|
1159
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1160
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1161
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1162
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
1163
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
1164
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1165
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1166
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1167
|
+
config_attr :quota_project, nil, ::String, nil
|
|
1168
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
1169
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1170
|
+
|
|
1171
|
+
# @private
|
|
1172
|
+
def initialize parent_config = nil
|
|
1173
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
1174
|
+
|
|
1175
|
+
yield self if block_given?
|
|
1176
|
+
end
|
|
1177
|
+
|
|
1178
|
+
##
|
|
1179
|
+
# Configurations for individual RPCs
|
|
1180
|
+
# @return [Rpcs]
|
|
1181
|
+
#
|
|
1182
|
+
def rpcs
|
|
1183
|
+
@rpcs ||= begin
|
|
1184
|
+
parent_rpcs = nil
|
|
1185
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1186
|
+
Rpcs.new parent_rpcs
|
|
1187
|
+
end
|
|
1188
|
+
end
|
|
1189
|
+
|
|
1190
|
+
##
|
|
1191
|
+
# Configuration for the channel pool
|
|
1192
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
|
1193
|
+
#
|
|
1194
|
+
def channel_pool
|
|
1195
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
|
1196
|
+
end
|
|
1197
|
+
|
|
1198
|
+
##
|
|
1199
|
+
# Configuration RPC class for the TransportManager API.
|
|
1200
|
+
#
|
|
1201
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
1202
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1203
|
+
# the following configuration fields:
|
|
1204
|
+
#
|
|
1205
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1206
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
1207
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1208
|
+
# include the following keys:
|
|
1209
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1210
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1211
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1212
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1213
|
+
# trigger a retry.
|
|
1214
|
+
#
|
|
1215
|
+
class Rpcs
|
|
1216
|
+
##
|
|
1217
|
+
# RPC-specific configuration for `list_remote_transport_profiles`
|
|
1218
|
+
# @return [::Gapic::Config::Method]
|
|
1219
|
+
#
|
|
1220
|
+
attr_reader :list_remote_transport_profiles
|
|
1221
|
+
##
|
|
1222
|
+
# RPC-specific configuration for `get_remote_transport_profile`
|
|
1223
|
+
# @return [::Gapic::Config::Method]
|
|
1224
|
+
#
|
|
1225
|
+
attr_reader :get_remote_transport_profile
|
|
1226
|
+
##
|
|
1227
|
+
# RPC-specific configuration for `list_transports`
|
|
1228
|
+
# @return [::Gapic::Config::Method]
|
|
1229
|
+
#
|
|
1230
|
+
attr_reader :list_transports
|
|
1231
|
+
##
|
|
1232
|
+
# RPC-specific configuration for `get_transport`
|
|
1233
|
+
# @return [::Gapic::Config::Method]
|
|
1234
|
+
#
|
|
1235
|
+
attr_reader :get_transport
|
|
1236
|
+
##
|
|
1237
|
+
# RPC-specific configuration for `get_status`
|
|
1238
|
+
# @return [::Gapic::Config::Method]
|
|
1239
|
+
#
|
|
1240
|
+
attr_reader :get_status
|
|
1241
|
+
##
|
|
1242
|
+
# RPC-specific configuration for `create_transport`
|
|
1243
|
+
# @return [::Gapic::Config::Method]
|
|
1244
|
+
#
|
|
1245
|
+
attr_reader :create_transport
|
|
1246
|
+
##
|
|
1247
|
+
# RPC-specific configuration for `update_transport`
|
|
1248
|
+
# @return [::Gapic::Config::Method]
|
|
1249
|
+
#
|
|
1250
|
+
attr_reader :update_transport
|
|
1251
|
+
##
|
|
1252
|
+
# RPC-specific configuration for `delete_transport`
|
|
1253
|
+
# @return [::Gapic::Config::Method]
|
|
1254
|
+
#
|
|
1255
|
+
attr_reader :delete_transport
|
|
1256
|
+
|
|
1257
|
+
# @private
|
|
1258
|
+
def initialize parent_rpcs = nil
|
|
1259
|
+
list_remote_transport_profiles_config = parent_rpcs.list_remote_transport_profiles if parent_rpcs.respond_to? :list_remote_transport_profiles
|
|
1260
|
+
@list_remote_transport_profiles = ::Gapic::Config::Method.new list_remote_transport_profiles_config
|
|
1261
|
+
get_remote_transport_profile_config = parent_rpcs.get_remote_transport_profile if parent_rpcs.respond_to? :get_remote_transport_profile
|
|
1262
|
+
@get_remote_transport_profile = ::Gapic::Config::Method.new get_remote_transport_profile_config
|
|
1263
|
+
list_transports_config = parent_rpcs.list_transports if parent_rpcs.respond_to? :list_transports
|
|
1264
|
+
@list_transports = ::Gapic::Config::Method.new list_transports_config
|
|
1265
|
+
get_transport_config = parent_rpcs.get_transport if parent_rpcs.respond_to? :get_transport
|
|
1266
|
+
@get_transport = ::Gapic::Config::Method.new get_transport_config
|
|
1267
|
+
get_status_config = parent_rpcs.get_status if parent_rpcs.respond_to? :get_status
|
|
1268
|
+
@get_status = ::Gapic::Config::Method.new get_status_config
|
|
1269
|
+
create_transport_config = parent_rpcs.create_transport if parent_rpcs.respond_to? :create_transport
|
|
1270
|
+
@create_transport = ::Gapic::Config::Method.new create_transport_config
|
|
1271
|
+
update_transport_config = parent_rpcs.update_transport if parent_rpcs.respond_to? :update_transport
|
|
1272
|
+
@update_transport = ::Gapic::Config::Method.new update_transport_config
|
|
1273
|
+
delete_transport_config = parent_rpcs.delete_transport if parent_rpcs.respond_to? :delete_transport
|
|
1274
|
+
@delete_transport = ::Gapic::Config::Method.new delete_transport_config
|
|
1275
|
+
|
|
1276
|
+
yield self if block_given?
|
|
1277
|
+
end
|
|
1278
|
+
end
|
|
1279
|
+
end
|
|
1280
|
+
end
|
|
1281
|
+
end
|
|
1282
|
+
end
|
|
1283
|
+
end
|
|
1284
|
+
end
|
|
1285
|
+
end
|