Class: Google::Cloud::NetworkConnectivity::V1::DataTransferService::Client
- Inherits:
-
Object
- Object
- Google::Cloud::NetworkConnectivity::V1::DataTransferService::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb
Overview
Client for the DataTransferService service.
DataTransferService is the service for the Data Transfer API.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Client
readonly
Get the associated client for mix-in of the IAMPolicy.
-
#location_client ⇒ Google::Cloud::Location::Locations::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::NetworkConnectivity::V1::DataTransferService::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the DataTransferService Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the DataTransferService Client instance.
-
#create_destination(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a
Destinationresource in a specified project and location. -
#create_multicloud_data_transfer_config(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a
MulticloudDataTransferConfigresource in a specified project and location. -
#delete_destination(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes a
Destinationresource. -
#delete_multicloud_data_transfer_config(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes a
MulticloudDataTransferConfigresource. -
#get_destination(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::NetworkConnectivity::V1::Destination
Gets the details of a
Destinationresource. -
#get_multicloud_data_transfer_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferConfig
Gets the details of a
MulticloudDataTransferConfigresource. -
#get_multicloud_data_transfer_supported_service(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferSupportedService
Gets the details of a service that is supported for Data Transfer Essentials.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new DataTransferService client object.
-
#list_destinations(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Destination>
Lists the
Destinationresources in a specified project and location. -
#list_multicloud_data_transfer_configs(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferConfig>
Lists the
MulticloudDataTransferConfigresources in a specified project and location. -
#list_multicloud_data_transfer_supported_services(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferSupportedService>
Lists the services in the project for a region that are supported for Data Transfer Essentials.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_destination(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Updates a
Destinationresource in a specified project and location. -
#update_multicloud_data_transfer_config(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Updates a
MulticloudDataTransferConfigresource in a specified project and location.
Methods included from Paths
#destination_path, #location_path, #multicloud_data_transfer_config_path, #multicloud_data_transfer_supported_service_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new DataTransferService client object.
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 155 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/networkconnectivity/v1/data_transfer_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @data_transfer_service_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::NetworkConnectivity::V1::DataTransferService::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool, logger: @config.logger ) @data_transfer_service_stub.stub_logger&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end @location_client = Google::Cloud::Location::Locations::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @data_transfer_service_stub.endpoint config.universe_domain = @data_transfer_service_stub.universe_domain config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= end @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @data_transfer_service_stub.endpoint config.universe_domain = @data_transfer_service_stub.universe_domain config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
248 249 250 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 248 def iam_policy_client @iam_policy_client end |
#location_client ⇒ Google::Cloud::Location::Locations::Client (readonly)
Get the associated client for mix-in of the Locations.
241 242 243 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 241 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::NetworkConnectivity::V1::DataTransferService::Operations (readonly)
Get the associated client for long-running operations.
234 235 236 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 234 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the DataTransferService Client class.
See Configuration for a description of the configuration fields.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 64 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "NetworkConnectivity", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_multicloud_data_transfer_configs.timeout = 60.0 default_config.rpcs.get_multicloud_data_transfer_config.timeout = 60.0 default_config.rpcs.create_multicloud_data_transfer_config.timeout = 60.0 default_config.rpcs.update_multicloud_data_transfer_config.timeout = 60.0 default_config.rpcs.delete_multicloud_data_transfer_config.timeout = 60.0 default_config.rpcs.list_destinations.timeout = 60.0 default_config.rpcs.get_destination.timeout = 60.0 default_config.rpcs.create_destination.timeout = 60.0 default_config.rpcs.update_destination.timeout = 60.0 default_config.rpcs.delete_destination.timeout = 60.0 default_config.rpcs.get_multicloud_data_transfer_supported_service.timeout = 60.0 default_config.rpcs.list_multicloud_data_transfer_supported_services.timeout = 60.0 default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the DataTransferService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
125 126 127 128 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 125 def configure yield @config if block_given? @config end |
#create_destination(request, options = nil) ⇒ ::Gapic::Operation #create_destination(parent: nil, destination_id: nil, destination: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a Destination resource in a specified project and location.
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 1053 def create_destination request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::CreateDestinationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_destination..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_destination.timeout, metadata: , retry_policy: @config.rpcs.create_destination.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :create_destination, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_multicloud_data_transfer_config(request, options = nil) ⇒ ::Gapic::Operation #create_multicloud_data_transfer_config(parent: nil, multicloud_data_transfer_config_id: nil, multicloud_data_transfer_config: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a MulticloudDataTransferConfig resource in a specified project
and location.
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 522 def create_multicloud_data_transfer_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::CreateMulticloudDataTransferConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_multicloud_data_transfer_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_multicloud_data_transfer_config.timeout, metadata: , retry_policy: @config.rpcs.create_multicloud_data_transfer_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :create_multicloud_data_transfer_config, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_destination(request, options = nil) ⇒ ::Gapic::Operation #delete_destination(name: nil, request_id: nil, etag: nil) ⇒ ::Gapic::Operation
Deletes a Destination resource.
1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 1277 def delete_destination request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::DeleteDestinationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_destination..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_destination.timeout, metadata: , retry_policy: @config.rpcs.delete_destination.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :delete_destination, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_multicloud_data_transfer_config(request, options = nil) ⇒ ::Gapic::Operation #delete_multicloud_data_transfer_config(name: nil, request_id: nil, etag: nil) ⇒ ::Gapic::Operation
Deletes a MulticloudDataTransferConfig resource.
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 752 def delete_multicloud_data_transfer_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::DeleteMulticloudDataTransferConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_multicloud_data_transfer_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_multicloud_data_transfer_config.timeout, metadata: , retry_policy: @config.rpcs.delete_multicloud_data_transfer_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :delete_multicloud_data_transfer_config, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_destination(request, options = nil) ⇒ ::Google::Cloud::NetworkConnectivity::V1::Destination #get_destination(name: nil) ⇒ ::Google::Cloud::NetworkConnectivity::V1::Destination
Gets the details of a Destination resource.
941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 941 def get_destination request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::GetDestinationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_destination..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_destination.timeout, metadata: , retry_policy: @config.rpcs.get_destination.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :get_destination, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_multicloud_data_transfer_config(request, options = nil) ⇒ ::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferConfig #get_multicloud_data_transfer_config(name: nil) ⇒ ::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferConfig
Gets the details of a MulticloudDataTransferConfig resource.
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 408 def get_multicloud_data_transfer_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::GetMulticloudDataTransferConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_multicloud_data_transfer_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_multicloud_data_transfer_config.timeout, metadata: , retry_policy: @config.rpcs.get_multicloud_data_transfer_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :get_multicloud_data_transfer_config, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_multicloud_data_transfer_supported_service(request, options = nil) ⇒ ::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferSupportedService #get_multicloud_data_transfer_supported_service(name: nil) ⇒ ::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferSupportedService
Gets the details of a service that is supported for Data Transfer Essentials.
1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 1365 def get_multicloud_data_transfer_supported_service request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::GetMulticloudDataTransferSupportedServiceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_multicloud_data_transfer_supported_service..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_multicloud_data_transfer_supported_service.timeout, metadata: , retry_policy: @config.rpcs.get_multicloud_data_transfer_supported_service.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :get_multicloud_data_transfer_supported_service, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_destinations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Destination> #list_destinations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Destination>
Lists the Destination resources in a specified project and location.
854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 854 def list_destinations request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::ListDestinationsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_destinations..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_destinations.timeout, metadata: , retry_policy: @config.rpcs.list_destinations.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :list_destinations, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_destinations, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_multicloud_data_transfer_configs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferConfig> #list_multicloud_data_transfer_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferConfig>
Lists the MulticloudDataTransferConfig resources in a specified project
and location.
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 321 def list_multicloud_data_transfer_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::ListMulticloudDataTransferConfigsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_multicloud_data_transfer_configs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_multicloud_data_transfer_configs.timeout, metadata: , retry_policy: @config.rpcs.list_multicloud_data_transfer_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :list_multicloud_data_transfer_configs, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_multicloud_data_transfer_configs, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_multicloud_data_transfer_supported_services(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferSupportedService> #list_multicloud_data_transfer_supported_services(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::MulticloudDataTransferSupportedService>
Lists the services in the project for a region that are supported for Data Transfer Essentials.
1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 1459 def list_multicloud_data_transfer_supported_services request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::ListMulticloudDataTransferSupportedServicesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_multicloud_data_transfer_supported_services..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_multicloud_data_transfer_supported_services.timeout, metadata: , retry_policy: @config.rpcs.list_multicloud_data_transfer_supported_services.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :list_multicloud_data_transfer_supported_services, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_multicloud_data_transfer_supported_services, request, response, operation, yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
255 256 257 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 255 def logger @data_transfer_service_stub.logger end |
#universe_domain ⇒ String
The effective universe domain
135 136 137 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 135 def universe_domain @data_transfer_service_stub.universe_domain end |
#update_destination(request, options = nil) ⇒ ::Gapic::Operation #update_destination(update_mask: nil, destination: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates a Destination resource in a specified project and location.
1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 1166 def update_destination request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::UpdateDestinationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_destination..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.destination&.name header_params["destination.name"] = request.destination.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_destination.timeout, metadata: , retry_policy: @config.rpcs.update_destination.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :update_destination, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_multicloud_data_transfer_config(request, options = nil) ⇒ ::Gapic::Operation #update_multicloud_data_transfer_config(update_mask: nil, multicloud_data_transfer_config: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates a MulticloudDataTransferConfig resource in a specified project
and location.
638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 |
# File 'lib/google/cloud/network_connectivity/v1/data_transfer_service/client.rb', line 638 def update_multicloud_data_transfer_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::UpdateMulticloudDataTransferConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_multicloud_data_transfer_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.multicloud_data_transfer_config&.name header_params["multicloud_data_transfer_config.name"] = request.multicloud_data_transfer_config.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_multicloud_data_transfer_config.timeout, metadata: , retry_policy: @config.rpcs.update_multicloud_data_transfer_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :update_multicloud_data_transfer_config, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |