google-cloud-network_connectivity-v1 0.6.1 → 0.8.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/lib/google/cloud/network_connectivity/v1/hub_service/client.rb +1002 -42
- data/lib/google/cloud/network_connectivity/v1/hub_service/operations.rb +10 -1
- data/lib/google/cloud/network_connectivity/v1/hub_service/paths.rb +59 -0
- data/lib/google/cloud/network_connectivity/v1/policy_based_routing_service/client.rb +786 -0
- data/lib/google/cloud/network_connectivity/v1/policy_based_routing_service/credentials.rb +51 -0
- data/lib/google/cloud/network_connectivity/v1/policy_based_routing_service/operations.rb +779 -0
- data/lib/google/cloud/network_connectivity/v1/policy_based_routing_service/paths.rb +84 -0
- data/lib/google/cloud/network_connectivity/v1/policy_based_routing_service.rb +51 -0
- data/lib/google/cloud/network_connectivity/v1/version.rb +1 -1
- data/lib/google/cloud/network_connectivity/v1.rb +1 -0
- data/lib/google/cloud/networkconnectivity/v1/hub_pb.rb +32 -1
- data/lib/google/cloud/networkconnectivity/v1/hub_services_pb.rb +24 -0
- data/lib/google/cloud/networkconnectivity/v1/policy_based_routing_pb.rb +64 -0
- data/lib/google/cloud/networkconnectivity/v1/policy_based_routing_services_pb.rb +52 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/networkconnectivity/v1/common.rb +3 -2
- data/proto_docs/google/cloud/networkconnectivity/v1/hub.rb +709 -55
- data/proto_docs/google/cloud/networkconnectivity/v1/policy_based_routing.rb +312 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +14 -5
@@ -177,7 +177,8 @@ module Google
|
|
177
177
|
credentials: credentials,
|
178
178
|
endpoint: @config.endpoint,
|
179
179
|
channel_args: @config.channel_args,
|
180
|
-
interceptors: @config.interceptors
|
180
|
+
interceptors: @config.interceptors,
|
181
|
+
channel_pool_config: @config.channel_pool
|
181
182
|
)
|
182
183
|
end
|
183
184
|
|
@@ -225,11 +226,11 @@ module Google
|
|
225
226
|
# @param parent [::String]
|
226
227
|
# Required. The parent resource's name.
|
227
228
|
# @param page_size [::Integer]
|
228
|
-
# The maximum number of results per page
|
229
|
+
# The maximum number of results per page to return.
|
229
230
|
# @param page_token [::String]
|
230
231
|
# The page token.
|
231
232
|
# @param filter [::String]
|
232
|
-
# An expression that filters the
|
233
|
+
# An expression that filters the list of results.
|
233
234
|
# @param order_by [::String]
|
234
235
|
# Sort the results by a certain order.
|
235
236
|
#
|
@@ -412,11 +413,11 @@ module Google
|
|
412
413
|
# @param hub [::Google::Cloud::NetworkConnectivity::V1::Hub, ::Hash]
|
413
414
|
# Required. The initial values for a new hub.
|
414
415
|
# @param request_id [::String]
|
415
|
-
# Optional. A
|
416
|
-
#
|
417
|
-
#
|
418
|
-
#
|
419
|
-
# minutes
|
416
|
+
# Optional. A request ID to identify requests. Specify a unique request ID so
|
417
|
+
# that if you must retry your request, the server knows to ignore the request
|
418
|
+
# if it has already been completed. The server guarantees that a request
|
419
|
+
# doesn't result in creation of duplicate commitments for at least 60
|
420
|
+
# minutes.
|
420
421
|
#
|
421
422
|
# For example, consider a situation where you make an initial request and
|
422
423
|
# the request times out. If you make the request again with the same request
|
@@ -527,11 +528,11 @@ module Google
|
|
527
528
|
# @param hub [::Google::Cloud::NetworkConnectivity::V1::Hub, ::Hash]
|
528
529
|
# Required. The state that the hub should be in after the update.
|
529
530
|
# @param request_id [::String]
|
530
|
-
# Optional. A
|
531
|
-
#
|
532
|
-
#
|
533
|
-
#
|
534
|
-
# minutes
|
531
|
+
# Optional. A request ID to identify requests. Specify a unique request ID so
|
532
|
+
# that if you must retry your request, the server knows to ignore the request
|
533
|
+
# if it has already been completed. The server guarantees that a request
|
534
|
+
# doesn't result in creation of duplicate commitments for at least 60
|
535
|
+
# minutes.
|
535
536
|
#
|
536
537
|
# For example, consider a situation where you make an initial request and
|
537
538
|
# the request times out. If you make the request again with the same request
|
@@ -635,11 +636,11 @@ module Google
|
|
635
636
|
# @param name [::String]
|
636
637
|
# Required. The name of the hub to delete.
|
637
638
|
# @param request_id [::String]
|
638
|
-
# Optional. A
|
639
|
-
#
|
640
|
-
#
|
641
|
-
#
|
642
|
-
# minutes
|
639
|
+
# Optional. A request ID to identify requests. Specify a unique request ID so
|
640
|
+
# that if you must retry your request, the server knows to ignore the request
|
641
|
+
# if it has already been completed. The server guarantees that a request
|
642
|
+
# doesn't result in creation of duplicate commitments for at least 60
|
643
|
+
# minutes.
|
643
644
|
#
|
644
645
|
# For example, consider a situation where you make an initial request and
|
645
646
|
# the request times out. If you make the request again with the same request
|
@@ -722,6 +723,119 @@ module Google
|
|
722
723
|
raise ::Google::Cloud::Error.from_error(e)
|
723
724
|
end
|
724
725
|
|
726
|
+
##
|
727
|
+
# Lists the Network Connectivity Center spokes associated with a
|
728
|
+
# specified hub and location. The list includes both spokes that are attached
|
729
|
+
# to the hub and spokes that have been proposed but not yet accepted.
|
730
|
+
#
|
731
|
+
# @overload list_hub_spokes(request, options = nil)
|
732
|
+
# Pass arguments to `list_hub_spokes` via a request object, either of type
|
733
|
+
# {::Google::Cloud::NetworkConnectivity::V1::ListHubSpokesRequest} or an equivalent Hash.
|
734
|
+
#
|
735
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1::ListHubSpokesRequest, ::Hash]
|
736
|
+
# A request object representing the call parameters. Required. To specify no
|
737
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
738
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
739
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
740
|
+
#
|
741
|
+
# @overload list_hub_spokes(name: nil, spoke_locations: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
|
742
|
+
# Pass arguments to `list_hub_spokes` via keyword arguments. Note that at
|
743
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
744
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
745
|
+
#
|
746
|
+
# @param name [::String]
|
747
|
+
# Required. The name of the hub.
|
748
|
+
# @param spoke_locations [::Array<::String>]
|
749
|
+
# A list of locations.
|
750
|
+
# Specify one of the following: `[global]`, a single region (for
|
751
|
+
# example, `[us-central1]`), or a combination of
|
752
|
+
# values (for example, `[global, us-central1, us-west1]`).
|
753
|
+
# If the spoke_locations field is populated, the list of results
|
754
|
+
# includes only spokes in the specified location.
|
755
|
+
# If the spoke_locations field is not populated, the list of results
|
756
|
+
# includes spokes in all locations.
|
757
|
+
# @param page_size [::Integer]
|
758
|
+
# The maximum number of results to return per page.
|
759
|
+
# @param page_token [::String]
|
760
|
+
# The page token.
|
761
|
+
# @param filter [::String]
|
762
|
+
# An expression that filters the list of results.
|
763
|
+
# @param order_by [::String]
|
764
|
+
# Sort the results by name or create_time.
|
765
|
+
# @param view [::Google::Cloud::NetworkConnectivity::V1::ListHubSpokesRequest::SpokeView]
|
766
|
+
# The view of the spoke to return.
|
767
|
+
# The view that you use determines which spoke fields are included in the
|
768
|
+
# response.
|
769
|
+
#
|
770
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
771
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>]
|
772
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
773
|
+
#
|
774
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Spoke>]
|
775
|
+
#
|
776
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
777
|
+
#
|
778
|
+
# @example Basic example
|
779
|
+
# require "google/cloud/network_connectivity/v1"
|
780
|
+
#
|
781
|
+
# # Create a client object. The client can be reused for multiple calls.
|
782
|
+
# client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
|
783
|
+
#
|
784
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
785
|
+
# request = Google::Cloud::NetworkConnectivity::V1::ListHubSpokesRequest.new
|
786
|
+
#
|
787
|
+
# # Call the list_hub_spokes method.
|
788
|
+
# result = client.list_hub_spokes request
|
789
|
+
#
|
790
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
791
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
792
|
+
# result.each do |item|
|
793
|
+
# # Each element is of type ::Google::Cloud::NetworkConnectivity::V1::Spoke.
|
794
|
+
# p item
|
795
|
+
# end
|
796
|
+
#
|
797
|
+
def list_hub_spokes request, options = nil
|
798
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
799
|
+
|
800
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::ListHubSpokesRequest
|
801
|
+
|
802
|
+
# Converts hash and nil to an options object
|
803
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
804
|
+
|
805
|
+
# Customize the options with defaults
|
806
|
+
metadata = @config.rpcs.list_hub_spokes.metadata.to_h
|
807
|
+
|
808
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
809
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
810
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
811
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
|
812
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
813
|
+
|
814
|
+
header_params = {}
|
815
|
+
if request.name
|
816
|
+
header_params["name"] = request.name
|
817
|
+
end
|
818
|
+
|
819
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
820
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
821
|
+
|
822
|
+
options.apply_defaults timeout: @config.rpcs.list_hub_spokes.timeout,
|
823
|
+
metadata: metadata,
|
824
|
+
retry_policy: @config.rpcs.list_hub_spokes.retry_policy
|
825
|
+
|
826
|
+
options.apply_defaults timeout: @config.timeout,
|
827
|
+
metadata: @config.metadata,
|
828
|
+
retry_policy: @config.retry_policy
|
829
|
+
|
830
|
+
@hub_service_stub.call_rpc :list_hub_spokes, request, options: options do |response, operation|
|
831
|
+
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_hub_spokes, request, response, operation, options
|
832
|
+
yield response, operation if block_given?
|
833
|
+
return response
|
834
|
+
end
|
835
|
+
rescue ::GRPC::BadStatus => e
|
836
|
+
raise ::Google::Cloud::Error.from_error(e)
|
837
|
+
end
|
838
|
+
|
725
839
|
##
|
726
840
|
# Lists the Network Connectivity Center spokes in a specified project and
|
727
841
|
# location.
|
@@ -744,11 +858,11 @@ module Google
|
|
744
858
|
# @param parent [::String]
|
745
859
|
# Required. The parent resource.
|
746
860
|
# @param page_size [::Integer]
|
747
|
-
# The maximum number of results per page
|
861
|
+
# The maximum number of results to return per page.
|
748
862
|
# @param page_token [::String]
|
749
863
|
# The page token.
|
750
864
|
# @param filter [::String]
|
751
|
-
# An expression that filters the
|
865
|
+
# An expression that filters the list of results.
|
752
866
|
# @param order_by [::String]
|
753
867
|
# Sort the results by a certain order.
|
754
868
|
#
|
@@ -931,11 +1045,11 @@ module Google
|
|
931
1045
|
# @param spoke [::Google::Cloud::NetworkConnectivity::V1::Spoke, ::Hash]
|
932
1046
|
# Required. The initial values for a new spoke.
|
933
1047
|
# @param request_id [::String]
|
934
|
-
# Optional. A
|
935
|
-
#
|
936
|
-
#
|
937
|
-
#
|
938
|
-
# minutes
|
1048
|
+
# Optional. A request ID to identify requests. Specify a unique request ID so
|
1049
|
+
# that if you must retry your request, the server knows to ignore the request
|
1050
|
+
# if it has already been completed. The server guarantees that a request
|
1051
|
+
# doesn't result in creation of duplicate commitments for at least 60
|
1052
|
+
# minutes.
|
939
1053
|
#
|
940
1054
|
# For example, consider a situation where you make an initial request and
|
941
1055
|
# the request times out. If you make the request again with the same request
|
@@ -1045,11 +1159,11 @@ module Google
|
|
1045
1159
|
# @param spoke [::Google::Cloud::NetworkConnectivity::V1::Spoke, ::Hash]
|
1046
1160
|
# Required. The state that the spoke should be in after the update.
|
1047
1161
|
# @param request_id [::String]
|
1048
|
-
# Optional. A
|
1049
|
-
#
|
1050
|
-
#
|
1051
|
-
#
|
1052
|
-
# minutes
|
1162
|
+
# Optional. A request ID to identify requests. Specify a unique request ID so
|
1163
|
+
# that if you must retry your request, the server knows to ignore the request
|
1164
|
+
# if it has already been completed. The server guarantees that a request
|
1165
|
+
# doesn't result in creation of duplicate commitments for at least 60
|
1166
|
+
# minutes.
|
1053
1167
|
#
|
1054
1168
|
# For example, consider a situation where you make an initial request and
|
1055
1169
|
# the request times out. If you make the request again with the same request
|
@@ -1132,6 +1246,232 @@ module Google
|
|
1132
1246
|
raise ::Google::Cloud::Error.from_error(e)
|
1133
1247
|
end
|
1134
1248
|
|
1249
|
+
##
|
1250
|
+
# Rejects a Network Connectivity Center spoke from being attached to a hub.
|
1251
|
+
# If the spoke was previously in the `ACTIVE` state, it
|
1252
|
+
# transitions to the `INACTIVE` state and is no longer able to
|
1253
|
+
# connect to other spokes that are attached to the hub.
|
1254
|
+
#
|
1255
|
+
# @overload reject_hub_spoke(request, options = nil)
|
1256
|
+
# Pass arguments to `reject_hub_spoke` via a request object, either of type
|
1257
|
+
# {::Google::Cloud::NetworkConnectivity::V1::RejectHubSpokeRequest} or an equivalent Hash.
|
1258
|
+
#
|
1259
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1::RejectHubSpokeRequest, ::Hash]
|
1260
|
+
# A request object representing the call parameters. Required. To specify no
|
1261
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1262
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1263
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1264
|
+
#
|
1265
|
+
# @overload reject_hub_spoke(name: nil, spoke_uri: nil, request_id: nil, details: nil)
|
1266
|
+
# Pass arguments to `reject_hub_spoke` via keyword arguments. Note that at
|
1267
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1268
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1269
|
+
#
|
1270
|
+
# @param name [::String]
|
1271
|
+
# Required. The name of the hub from which to reject the spoke.
|
1272
|
+
# @param spoke_uri [::String]
|
1273
|
+
# Required. The URI of the spoke to reject from the hub.
|
1274
|
+
# @param request_id [::String]
|
1275
|
+
# Optional. A request ID to identify requests. Specify a unique request ID so
|
1276
|
+
# that if you must retry your request, the server knows to ignore the request
|
1277
|
+
# if it has already been completed. The server guarantees that a request
|
1278
|
+
# doesn't result in creation of duplicate commitments for at least 60
|
1279
|
+
# minutes.
|
1280
|
+
#
|
1281
|
+
# For example, consider a situation where you make an initial request and
|
1282
|
+
# the request times out. If you make the request again with the same request
|
1283
|
+
# ID, the server can check to see whether the original operation
|
1284
|
+
# was received. If it was, the server ignores the second request. This
|
1285
|
+
# behavior prevents clients from mistakenly creating duplicate commitments.
|
1286
|
+
#
|
1287
|
+
# The request ID must be a valid UUID, with the exception that zero UUID is
|
1288
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1289
|
+
# @param details [::String]
|
1290
|
+
# Optional. Additional information provided by the hub administrator.
|
1291
|
+
#
|
1292
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1293
|
+
# @yieldparam response [::Gapic::Operation]
|
1294
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1295
|
+
#
|
1296
|
+
# @return [::Gapic::Operation]
|
1297
|
+
#
|
1298
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1299
|
+
#
|
1300
|
+
# @example Basic example
|
1301
|
+
# require "google/cloud/network_connectivity/v1"
|
1302
|
+
#
|
1303
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1304
|
+
# client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
|
1305
|
+
#
|
1306
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1307
|
+
# request = Google::Cloud::NetworkConnectivity::V1::RejectHubSpokeRequest.new
|
1308
|
+
#
|
1309
|
+
# # Call the reject_hub_spoke method.
|
1310
|
+
# result = client.reject_hub_spoke request
|
1311
|
+
#
|
1312
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1313
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1314
|
+
# # Here is how to wait for a response.
|
1315
|
+
# result.wait_until_done! timeout: 60
|
1316
|
+
# if result.response?
|
1317
|
+
# p result.response
|
1318
|
+
# else
|
1319
|
+
# puts "No response received."
|
1320
|
+
# end
|
1321
|
+
#
|
1322
|
+
def reject_hub_spoke request, options = nil
|
1323
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1324
|
+
|
1325
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::RejectHubSpokeRequest
|
1326
|
+
|
1327
|
+
# Converts hash and nil to an options object
|
1328
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1329
|
+
|
1330
|
+
# Customize the options with defaults
|
1331
|
+
metadata = @config.rpcs.reject_hub_spoke.metadata.to_h
|
1332
|
+
|
1333
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1334
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1335
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1336
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
|
1337
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1338
|
+
|
1339
|
+
header_params = {}
|
1340
|
+
if request.name
|
1341
|
+
header_params["name"] = request.name
|
1342
|
+
end
|
1343
|
+
|
1344
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1345
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1346
|
+
|
1347
|
+
options.apply_defaults timeout: @config.rpcs.reject_hub_spoke.timeout,
|
1348
|
+
metadata: metadata,
|
1349
|
+
retry_policy: @config.rpcs.reject_hub_spoke.retry_policy
|
1350
|
+
|
1351
|
+
options.apply_defaults timeout: @config.timeout,
|
1352
|
+
metadata: @config.metadata,
|
1353
|
+
retry_policy: @config.retry_policy
|
1354
|
+
|
1355
|
+
@hub_service_stub.call_rpc :reject_hub_spoke, request, options: options do |response, operation|
|
1356
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1357
|
+
yield response, operation if block_given?
|
1358
|
+
return response
|
1359
|
+
end
|
1360
|
+
rescue ::GRPC::BadStatus => e
|
1361
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1362
|
+
end
|
1363
|
+
|
1364
|
+
##
|
1365
|
+
# Accepts a proposal to attach a Network Connectivity Center spoke
|
1366
|
+
# to a hub.
|
1367
|
+
#
|
1368
|
+
# @overload accept_hub_spoke(request, options = nil)
|
1369
|
+
# Pass arguments to `accept_hub_spoke` via a request object, either of type
|
1370
|
+
# {::Google::Cloud::NetworkConnectivity::V1::AcceptHubSpokeRequest} or an equivalent Hash.
|
1371
|
+
#
|
1372
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1::AcceptHubSpokeRequest, ::Hash]
|
1373
|
+
# A request object representing the call parameters. Required. To specify no
|
1374
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1375
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1376
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1377
|
+
#
|
1378
|
+
# @overload accept_hub_spoke(name: nil, spoke_uri: nil, request_id: nil)
|
1379
|
+
# Pass arguments to `accept_hub_spoke` via keyword arguments. Note that at
|
1380
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1381
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1382
|
+
#
|
1383
|
+
# @param name [::String]
|
1384
|
+
# Required. The name of the hub into which to accept the spoke.
|
1385
|
+
# @param spoke_uri [::String]
|
1386
|
+
# Required. The URI of the spoke to accept into the hub.
|
1387
|
+
# @param request_id [::String]
|
1388
|
+
# Optional. A request ID to identify requests. Specify a unique request ID so
|
1389
|
+
# that if you must retry your request, the server knows to ignore the request
|
1390
|
+
# if it has already been completed. The server guarantees that a request
|
1391
|
+
# doesn't result in creation of duplicate commitments for at least 60
|
1392
|
+
# minutes.
|
1393
|
+
#
|
1394
|
+
# For example, consider a situation where you make an initial request and
|
1395
|
+
# the request times out. If you make the request again with the same request
|
1396
|
+
# ID, the server can check to see whether the original operation
|
1397
|
+
# was received. If it was, the server ignores the second request. This
|
1398
|
+
# behavior prevents clients from mistakenly creating duplicate commitments.
|
1399
|
+
#
|
1400
|
+
# The request ID must be a valid UUID, with the exception that zero UUID is
|
1401
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1402
|
+
#
|
1403
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1404
|
+
# @yieldparam response [::Gapic::Operation]
|
1405
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1406
|
+
#
|
1407
|
+
# @return [::Gapic::Operation]
|
1408
|
+
#
|
1409
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1410
|
+
#
|
1411
|
+
# @example Basic example
|
1412
|
+
# require "google/cloud/network_connectivity/v1"
|
1413
|
+
#
|
1414
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1415
|
+
# client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
|
1416
|
+
#
|
1417
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1418
|
+
# request = Google::Cloud::NetworkConnectivity::V1::AcceptHubSpokeRequest.new
|
1419
|
+
#
|
1420
|
+
# # Call the accept_hub_spoke method.
|
1421
|
+
# result = client.accept_hub_spoke request
|
1422
|
+
#
|
1423
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1424
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1425
|
+
# # Here is how to wait for a response.
|
1426
|
+
# result.wait_until_done! timeout: 60
|
1427
|
+
# if result.response?
|
1428
|
+
# p result.response
|
1429
|
+
# else
|
1430
|
+
# puts "No response received."
|
1431
|
+
# end
|
1432
|
+
#
|
1433
|
+
def accept_hub_spoke request, options = nil
|
1434
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1435
|
+
|
1436
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::AcceptHubSpokeRequest
|
1437
|
+
|
1438
|
+
# Converts hash and nil to an options object
|
1439
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1440
|
+
|
1441
|
+
# Customize the options with defaults
|
1442
|
+
metadata = @config.rpcs.accept_hub_spoke.metadata.to_h
|
1443
|
+
|
1444
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1445
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1446
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1447
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
|
1448
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1449
|
+
|
1450
|
+
header_params = {}
|
1451
|
+
if request.name
|
1452
|
+
header_params["name"] = request.name
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1456
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1457
|
+
|
1458
|
+
options.apply_defaults timeout: @config.rpcs.accept_hub_spoke.timeout,
|
1459
|
+
metadata: metadata,
|
1460
|
+
retry_policy: @config.rpcs.accept_hub_spoke.retry_policy
|
1461
|
+
|
1462
|
+
options.apply_defaults timeout: @config.timeout,
|
1463
|
+
metadata: @config.metadata,
|
1464
|
+
retry_policy: @config.retry_policy
|
1465
|
+
|
1466
|
+
@hub_service_stub.call_rpc :accept_hub_spoke, request, options: options do |response, operation|
|
1467
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1468
|
+
yield response, operation if block_given?
|
1469
|
+
return response
|
1470
|
+
end
|
1471
|
+
rescue ::GRPC::BadStatus => e
|
1472
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1473
|
+
end
|
1474
|
+
|
1135
1475
|
##
|
1136
1476
|
# Deletes a Network Connectivity Center spoke.
|
1137
1477
|
#
|
@@ -1153,11 +1493,11 @@ module Google
|
|
1153
1493
|
# @param name [::String]
|
1154
1494
|
# Required. The name of the spoke to delete.
|
1155
1495
|
# @param request_id [::String]
|
1156
|
-
# Optional. A
|
1157
|
-
#
|
1158
|
-
#
|
1159
|
-
#
|
1160
|
-
# minutes
|
1496
|
+
# Optional. A request ID to identify requests. Specify a unique request ID so
|
1497
|
+
# that if you must retry your request, the server knows to ignore the request
|
1498
|
+
# if it has already been completed. The server guarantees that a request
|
1499
|
+
# doesn't result in creation of duplicate commitments for at least 60
|
1500
|
+
# minutes.
|
1161
1501
|
#
|
1162
1502
|
# For example, consider a situation where you make an initial request and
|
1163
1503
|
# the request times out. If you make the request again with the same request
|
@@ -1241,14 +1581,563 @@ module Google
|
|
1241
1581
|
end
|
1242
1582
|
|
1243
1583
|
##
|
1244
|
-
#
|
1584
|
+
# Gets details about a Network Connectivity Center route table.
|
1245
1585
|
#
|
1246
|
-
#
|
1247
|
-
#
|
1248
|
-
#
|
1249
|
-
#
|
1250
|
-
#
|
1251
|
-
#
|
1586
|
+
# @overload get_route_table(request, options = nil)
|
1587
|
+
# Pass arguments to `get_route_table` via a request object, either of type
|
1588
|
+
# {::Google::Cloud::NetworkConnectivity::V1::GetRouteTableRequest} or an equivalent Hash.
|
1589
|
+
#
|
1590
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1::GetRouteTableRequest, ::Hash]
|
1591
|
+
# A request object representing the call parameters. Required. To specify no
|
1592
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1593
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1594
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1595
|
+
#
|
1596
|
+
# @overload get_route_table(name: nil)
|
1597
|
+
# Pass arguments to `get_route_table` via keyword arguments. Note that at
|
1598
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1599
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1600
|
+
#
|
1601
|
+
# @param name [::String]
|
1602
|
+
# Required. The name of the route table resource.
|
1603
|
+
#
|
1604
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1605
|
+
# @yieldparam response [::Google::Cloud::NetworkConnectivity::V1::RouteTable]
|
1606
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1607
|
+
#
|
1608
|
+
# @return [::Google::Cloud::NetworkConnectivity::V1::RouteTable]
|
1609
|
+
#
|
1610
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1611
|
+
#
|
1612
|
+
# @example Basic example
|
1613
|
+
# require "google/cloud/network_connectivity/v1"
|
1614
|
+
#
|
1615
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1616
|
+
# client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
|
1617
|
+
#
|
1618
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1619
|
+
# request = Google::Cloud::NetworkConnectivity::V1::GetRouteTableRequest.new
|
1620
|
+
#
|
1621
|
+
# # Call the get_route_table method.
|
1622
|
+
# result = client.get_route_table request
|
1623
|
+
#
|
1624
|
+
# # The returned object is of type Google::Cloud::NetworkConnectivity::V1::RouteTable.
|
1625
|
+
# p result
|
1626
|
+
#
|
1627
|
+
def get_route_table request, options = nil
|
1628
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1629
|
+
|
1630
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::GetRouteTableRequest
|
1631
|
+
|
1632
|
+
# Converts hash and nil to an options object
|
1633
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1634
|
+
|
1635
|
+
# Customize the options with defaults
|
1636
|
+
metadata = @config.rpcs.get_route_table.metadata.to_h
|
1637
|
+
|
1638
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1639
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1640
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1641
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
|
1642
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1643
|
+
|
1644
|
+
header_params = {}
|
1645
|
+
if request.name
|
1646
|
+
header_params["name"] = request.name
|
1647
|
+
end
|
1648
|
+
|
1649
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1650
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1651
|
+
|
1652
|
+
options.apply_defaults timeout: @config.rpcs.get_route_table.timeout,
|
1653
|
+
metadata: metadata,
|
1654
|
+
retry_policy: @config.rpcs.get_route_table.retry_policy
|
1655
|
+
|
1656
|
+
options.apply_defaults timeout: @config.timeout,
|
1657
|
+
metadata: @config.metadata,
|
1658
|
+
retry_policy: @config.retry_policy
|
1659
|
+
|
1660
|
+
@hub_service_stub.call_rpc :get_route_table, request, options: options do |response, operation|
|
1661
|
+
yield response, operation if block_given?
|
1662
|
+
return response
|
1663
|
+
end
|
1664
|
+
rescue ::GRPC::BadStatus => e
|
1665
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1666
|
+
end
|
1667
|
+
|
1668
|
+
##
|
1669
|
+
# Gets details about the specified route.
|
1670
|
+
#
|
1671
|
+
# @overload get_route(request, options = nil)
|
1672
|
+
# Pass arguments to `get_route` via a request object, either of type
|
1673
|
+
# {::Google::Cloud::NetworkConnectivity::V1::GetRouteRequest} or an equivalent Hash.
|
1674
|
+
#
|
1675
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1::GetRouteRequest, ::Hash]
|
1676
|
+
# A request object representing the call parameters. Required. To specify no
|
1677
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1678
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1679
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1680
|
+
#
|
1681
|
+
# @overload get_route(name: nil)
|
1682
|
+
# Pass arguments to `get_route` via keyword arguments. Note that at
|
1683
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1684
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1685
|
+
#
|
1686
|
+
# @param name [::String]
|
1687
|
+
# Required. The name of the route resource.
|
1688
|
+
#
|
1689
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1690
|
+
# @yieldparam response [::Google::Cloud::NetworkConnectivity::V1::Route]
|
1691
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1692
|
+
#
|
1693
|
+
# @return [::Google::Cloud::NetworkConnectivity::V1::Route]
|
1694
|
+
#
|
1695
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1696
|
+
#
|
1697
|
+
# @example Basic example
|
1698
|
+
# require "google/cloud/network_connectivity/v1"
|
1699
|
+
#
|
1700
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1701
|
+
# client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
|
1702
|
+
#
|
1703
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1704
|
+
# request = Google::Cloud::NetworkConnectivity::V1::GetRouteRequest.new
|
1705
|
+
#
|
1706
|
+
# # Call the get_route method.
|
1707
|
+
# result = client.get_route request
|
1708
|
+
#
|
1709
|
+
# # The returned object is of type Google::Cloud::NetworkConnectivity::V1::Route.
|
1710
|
+
# p result
|
1711
|
+
#
|
1712
|
+
def get_route request, options = nil
|
1713
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1714
|
+
|
1715
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::GetRouteRequest
|
1716
|
+
|
1717
|
+
# Converts hash and nil to an options object
|
1718
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1719
|
+
|
1720
|
+
# Customize the options with defaults
|
1721
|
+
metadata = @config.rpcs.get_route.metadata.to_h
|
1722
|
+
|
1723
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1724
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1725
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1726
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
|
1727
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1728
|
+
|
1729
|
+
header_params = {}
|
1730
|
+
if request.name
|
1731
|
+
header_params["name"] = request.name
|
1732
|
+
end
|
1733
|
+
|
1734
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1735
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1736
|
+
|
1737
|
+
options.apply_defaults timeout: @config.rpcs.get_route.timeout,
|
1738
|
+
metadata: metadata,
|
1739
|
+
retry_policy: @config.rpcs.get_route.retry_policy
|
1740
|
+
|
1741
|
+
options.apply_defaults timeout: @config.timeout,
|
1742
|
+
metadata: @config.metadata,
|
1743
|
+
retry_policy: @config.retry_policy
|
1744
|
+
|
1745
|
+
@hub_service_stub.call_rpc :get_route, request, options: options do |response, operation|
|
1746
|
+
yield response, operation if block_given?
|
1747
|
+
return response
|
1748
|
+
end
|
1749
|
+
rescue ::GRPC::BadStatus => e
|
1750
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1751
|
+
end
|
1752
|
+
|
1753
|
+
##
|
1754
|
+
# Lists routes in a given project.
|
1755
|
+
#
|
1756
|
+
# @overload list_routes(request, options = nil)
|
1757
|
+
# Pass arguments to `list_routes` via a request object, either of type
|
1758
|
+
# {::Google::Cloud::NetworkConnectivity::V1::ListRoutesRequest} or an equivalent Hash.
|
1759
|
+
#
|
1760
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1::ListRoutesRequest, ::Hash]
|
1761
|
+
# A request object representing the call parameters. Required. To specify no
|
1762
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1763
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1764
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1765
|
+
#
|
1766
|
+
# @overload list_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1767
|
+
# Pass arguments to `list_routes` via keyword arguments. Note that at
|
1768
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1769
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1770
|
+
#
|
1771
|
+
# @param parent [::String]
|
1772
|
+
# Required. The parent resource's name.
|
1773
|
+
# @param page_size [::Integer]
|
1774
|
+
# The maximum number of results to return per page.
|
1775
|
+
# @param page_token [::String]
|
1776
|
+
# The page token.
|
1777
|
+
# @param filter [::String]
|
1778
|
+
# An expression that filters the list of results.
|
1779
|
+
# @param order_by [::String]
|
1780
|
+
# Sort the results by a certain order.
|
1781
|
+
#
|
1782
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1783
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Route>]
|
1784
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1785
|
+
#
|
1786
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Route>]
|
1787
|
+
#
|
1788
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1789
|
+
#
|
1790
|
+
# @example Basic example
|
1791
|
+
# require "google/cloud/network_connectivity/v1"
|
1792
|
+
#
|
1793
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1794
|
+
# client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
|
1795
|
+
#
|
1796
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1797
|
+
# request = Google::Cloud::NetworkConnectivity::V1::ListRoutesRequest.new
|
1798
|
+
#
|
1799
|
+
# # Call the list_routes method.
|
1800
|
+
# result = client.list_routes request
|
1801
|
+
#
|
1802
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1803
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1804
|
+
# result.each do |item|
|
1805
|
+
# # Each element is of type ::Google::Cloud::NetworkConnectivity::V1::Route.
|
1806
|
+
# p item
|
1807
|
+
# end
|
1808
|
+
#
|
1809
|
+
def list_routes request, options = nil
|
1810
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1811
|
+
|
1812
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::ListRoutesRequest
|
1813
|
+
|
1814
|
+
# Converts hash and nil to an options object
|
1815
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1816
|
+
|
1817
|
+
# Customize the options with defaults
|
1818
|
+
metadata = @config.rpcs.list_routes.metadata.to_h
|
1819
|
+
|
1820
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1821
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1822
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1823
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
|
1824
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1825
|
+
|
1826
|
+
header_params = {}
|
1827
|
+
if request.parent
|
1828
|
+
header_params["parent"] = request.parent
|
1829
|
+
end
|
1830
|
+
|
1831
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1832
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1833
|
+
|
1834
|
+
options.apply_defaults timeout: @config.rpcs.list_routes.timeout,
|
1835
|
+
metadata: metadata,
|
1836
|
+
retry_policy: @config.rpcs.list_routes.retry_policy
|
1837
|
+
|
1838
|
+
options.apply_defaults timeout: @config.timeout,
|
1839
|
+
metadata: @config.metadata,
|
1840
|
+
retry_policy: @config.retry_policy
|
1841
|
+
|
1842
|
+
@hub_service_stub.call_rpc :list_routes, request, options: options do |response, operation|
|
1843
|
+
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_routes, request, response, operation, options
|
1844
|
+
yield response, operation if block_given?
|
1845
|
+
return response
|
1846
|
+
end
|
1847
|
+
rescue ::GRPC::BadStatus => e
|
1848
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1849
|
+
end
|
1850
|
+
|
1851
|
+
##
|
1852
|
+
# Lists route tables in a given project.
|
1853
|
+
#
|
1854
|
+
# @overload list_route_tables(request, options = nil)
|
1855
|
+
# Pass arguments to `list_route_tables` via a request object, either of type
|
1856
|
+
# {::Google::Cloud::NetworkConnectivity::V1::ListRouteTablesRequest} or an equivalent Hash.
|
1857
|
+
#
|
1858
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1::ListRouteTablesRequest, ::Hash]
|
1859
|
+
# A request object representing the call parameters. Required. To specify no
|
1860
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1861
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1862
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1863
|
+
#
|
1864
|
+
# @overload list_route_tables(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1865
|
+
# Pass arguments to `list_route_tables` via keyword arguments. Note that at
|
1866
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1867
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1868
|
+
#
|
1869
|
+
# @param parent [::String]
|
1870
|
+
# Required. The parent resource's name.
|
1871
|
+
# @param page_size [::Integer]
|
1872
|
+
# The maximum number of results to return per page.
|
1873
|
+
# @param page_token [::String]
|
1874
|
+
# The page token.
|
1875
|
+
# @param filter [::String]
|
1876
|
+
# An expression that filters the list of results.
|
1877
|
+
# @param order_by [::String]
|
1878
|
+
# Sort the results by a certain order.
|
1879
|
+
#
|
1880
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1881
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::RouteTable>]
|
1882
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1883
|
+
#
|
1884
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::RouteTable>]
|
1885
|
+
#
|
1886
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1887
|
+
#
|
1888
|
+
# @example Basic example
|
1889
|
+
# require "google/cloud/network_connectivity/v1"
|
1890
|
+
#
|
1891
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1892
|
+
# client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
|
1893
|
+
#
|
1894
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1895
|
+
# request = Google::Cloud::NetworkConnectivity::V1::ListRouteTablesRequest.new
|
1896
|
+
#
|
1897
|
+
# # Call the list_route_tables method.
|
1898
|
+
# result = client.list_route_tables request
|
1899
|
+
#
|
1900
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1901
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1902
|
+
# result.each do |item|
|
1903
|
+
# # Each element is of type ::Google::Cloud::NetworkConnectivity::V1::RouteTable.
|
1904
|
+
# p item
|
1905
|
+
# end
|
1906
|
+
#
|
1907
|
+
def list_route_tables request, options = nil
|
1908
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1909
|
+
|
1910
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::ListRouteTablesRequest
|
1911
|
+
|
1912
|
+
# Converts hash and nil to an options object
|
1913
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1914
|
+
|
1915
|
+
# Customize the options with defaults
|
1916
|
+
metadata = @config.rpcs.list_route_tables.metadata.to_h
|
1917
|
+
|
1918
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1919
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1920
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1921
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
|
1922
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1923
|
+
|
1924
|
+
header_params = {}
|
1925
|
+
if request.parent
|
1926
|
+
header_params["parent"] = request.parent
|
1927
|
+
end
|
1928
|
+
|
1929
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1930
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1931
|
+
|
1932
|
+
options.apply_defaults timeout: @config.rpcs.list_route_tables.timeout,
|
1933
|
+
metadata: metadata,
|
1934
|
+
retry_policy: @config.rpcs.list_route_tables.retry_policy
|
1935
|
+
|
1936
|
+
options.apply_defaults timeout: @config.timeout,
|
1937
|
+
metadata: @config.metadata,
|
1938
|
+
retry_policy: @config.retry_policy
|
1939
|
+
|
1940
|
+
@hub_service_stub.call_rpc :list_route_tables, request, options: options do |response, operation|
|
1941
|
+
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_route_tables, request, response, operation, options
|
1942
|
+
yield response, operation if block_given?
|
1943
|
+
return response
|
1944
|
+
end
|
1945
|
+
rescue ::GRPC::BadStatus => e
|
1946
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1947
|
+
end
|
1948
|
+
|
1949
|
+
##
|
1950
|
+
# Gets details about a Network Connectivity Center group.
|
1951
|
+
#
|
1952
|
+
# @overload get_group(request, options = nil)
|
1953
|
+
# Pass arguments to `get_group` via a request object, either of type
|
1954
|
+
# {::Google::Cloud::NetworkConnectivity::V1::GetGroupRequest} or an equivalent Hash.
|
1955
|
+
#
|
1956
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1::GetGroupRequest, ::Hash]
|
1957
|
+
# A request object representing the call parameters. Required. To specify no
|
1958
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1959
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1960
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1961
|
+
#
|
1962
|
+
# @overload get_group(name: nil)
|
1963
|
+
# Pass arguments to `get_group` via keyword arguments. Note that at
|
1964
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1965
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1966
|
+
#
|
1967
|
+
# @param name [::String]
|
1968
|
+
# Required. The name of the route table resource.
|
1969
|
+
#
|
1970
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1971
|
+
# @yieldparam response [::Google::Cloud::NetworkConnectivity::V1::Group]
|
1972
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1973
|
+
#
|
1974
|
+
# @return [::Google::Cloud::NetworkConnectivity::V1::Group]
|
1975
|
+
#
|
1976
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1977
|
+
#
|
1978
|
+
# @example Basic example
|
1979
|
+
# require "google/cloud/network_connectivity/v1"
|
1980
|
+
#
|
1981
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1982
|
+
# client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
|
1983
|
+
#
|
1984
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1985
|
+
# request = Google::Cloud::NetworkConnectivity::V1::GetGroupRequest.new
|
1986
|
+
#
|
1987
|
+
# # Call the get_group method.
|
1988
|
+
# result = client.get_group request
|
1989
|
+
#
|
1990
|
+
# # The returned object is of type Google::Cloud::NetworkConnectivity::V1::Group.
|
1991
|
+
# p result
|
1992
|
+
#
|
1993
|
+
def get_group request, options = nil
|
1994
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1995
|
+
|
1996
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::GetGroupRequest
|
1997
|
+
|
1998
|
+
# Converts hash and nil to an options object
|
1999
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2000
|
+
|
2001
|
+
# Customize the options with defaults
|
2002
|
+
metadata = @config.rpcs.get_group.metadata.to_h
|
2003
|
+
|
2004
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2005
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2006
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2007
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
|
2008
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2009
|
+
|
2010
|
+
header_params = {}
|
2011
|
+
if request.name
|
2012
|
+
header_params["name"] = request.name
|
2013
|
+
end
|
2014
|
+
|
2015
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2016
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2017
|
+
|
2018
|
+
options.apply_defaults timeout: @config.rpcs.get_group.timeout,
|
2019
|
+
metadata: metadata,
|
2020
|
+
retry_policy: @config.rpcs.get_group.retry_policy
|
2021
|
+
|
2022
|
+
options.apply_defaults timeout: @config.timeout,
|
2023
|
+
metadata: @config.metadata,
|
2024
|
+
retry_policy: @config.retry_policy
|
2025
|
+
|
2026
|
+
@hub_service_stub.call_rpc :get_group, request, options: options do |response, operation|
|
2027
|
+
yield response, operation if block_given?
|
2028
|
+
return response
|
2029
|
+
end
|
2030
|
+
rescue ::GRPC::BadStatus => e
|
2031
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2032
|
+
end
|
2033
|
+
|
2034
|
+
##
|
2035
|
+
# Lists groups in a given hub.
|
2036
|
+
#
|
2037
|
+
# @overload list_groups(request, options = nil)
|
2038
|
+
# Pass arguments to `list_groups` via a request object, either of type
|
2039
|
+
# {::Google::Cloud::NetworkConnectivity::V1::ListGroupsRequest} or an equivalent Hash.
|
2040
|
+
#
|
2041
|
+
# @param request [::Google::Cloud::NetworkConnectivity::V1::ListGroupsRequest, ::Hash]
|
2042
|
+
# A request object representing the call parameters. Required. To specify no
|
2043
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2044
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2045
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2046
|
+
#
|
2047
|
+
# @overload list_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2048
|
+
# Pass arguments to `list_groups` via keyword arguments. Note that at
|
2049
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2050
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2051
|
+
#
|
2052
|
+
# @param parent [::String]
|
2053
|
+
# Required. The parent resource's name.
|
2054
|
+
# @param page_size [::Integer]
|
2055
|
+
# The maximum number of results to return per page.
|
2056
|
+
# @param page_token [::String]
|
2057
|
+
# The page token.
|
2058
|
+
# @param filter [::String]
|
2059
|
+
# An expression that filters the list of results.
|
2060
|
+
# @param order_by [::String]
|
2061
|
+
# Sort the results by a certain order.
|
2062
|
+
#
|
2063
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2064
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Group>]
|
2065
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2066
|
+
#
|
2067
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::Group>]
|
2068
|
+
#
|
2069
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2070
|
+
#
|
2071
|
+
# @example Basic example
|
2072
|
+
# require "google/cloud/network_connectivity/v1"
|
2073
|
+
#
|
2074
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2075
|
+
# client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
|
2076
|
+
#
|
2077
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2078
|
+
# request = Google::Cloud::NetworkConnectivity::V1::ListGroupsRequest.new
|
2079
|
+
#
|
2080
|
+
# # Call the list_groups method.
|
2081
|
+
# result = client.list_groups request
|
2082
|
+
#
|
2083
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2084
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2085
|
+
# result.each do |item|
|
2086
|
+
# # Each element is of type ::Google::Cloud::NetworkConnectivity::V1::Group.
|
2087
|
+
# p item
|
2088
|
+
# end
|
2089
|
+
#
|
2090
|
+
def list_groups request, options = nil
|
2091
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2092
|
+
|
2093
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::ListGroupsRequest
|
2094
|
+
|
2095
|
+
# Converts hash and nil to an options object
|
2096
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2097
|
+
|
2098
|
+
# Customize the options with defaults
|
2099
|
+
metadata = @config.rpcs.list_groups.metadata.to_h
|
2100
|
+
|
2101
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2102
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2103
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2104
|
+
gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
|
2105
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2106
|
+
|
2107
|
+
header_params = {}
|
2108
|
+
if request.parent
|
2109
|
+
header_params["parent"] = request.parent
|
2110
|
+
end
|
2111
|
+
|
2112
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2113
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2114
|
+
|
2115
|
+
options.apply_defaults timeout: @config.rpcs.list_groups.timeout,
|
2116
|
+
metadata: metadata,
|
2117
|
+
retry_policy: @config.rpcs.list_groups.retry_policy
|
2118
|
+
|
2119
|
+
options.apply_defaults timeout: @config.timeout,
|
2120
|
+
metadata: @config.metadata,
|
2121
|
+
retry_policy: @config.retry_policy
|
2122
|
+
|
2123
|
+
@hub_service_stub.call_rpc :list_groups, request, options: options do |response, operation|
|
2124
|
+
response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_groups, request, response, operation, options
|
2125
|
+
yield response, operation if block_given?
|
2126
|
+
return response
|
2127
|
+
end
|
2128
|
+
rescue ::GRPC::BadStatus => e
|
2129
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2130
|
+
end
|
2131
|
+
|
2132
|
+
##
|
2133
|
+
# Configuration class for the HubService API.
|
2134
|
+
#
|
2135
|
+
# This class represents the configuration for HubService,
|
2136
|
+
# providing control over timeouts, retry behavior, logging, transport
|
2137
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2138
|
+
# applied individually to specific RPCs. See
|
2139
|
+
# {::Google::Cloud::NetworkConnectivity::V1::HubService::Client::Configuration::Rpcs}
|
2140
|
+
# for a list of RPCs that can be configured independently.
|
1252
2141
|
#
|
1253
2142
|
# Configuration can be applied globally to all clients, or to a single client
|
1254
2143
|
# on construction.
|
@@ -1359,6 +2248,14 @@ module Google
|
|
1359
2248
|
end
|
1360
2249
|
end
|
1361
2250
|
|
2251
|
+
##
|
2252
|
+
# Configuration for the channel pool
|
2253
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
2254
|
+
#
|
2255
|
+
def channel_pool
|
2256
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
2257
|
+
end
|
2258
|
+
|
1362
2259
|
##
|
1363
2260
|
# Configuration RPC class for the HubService API.
|
1364
2261
|
#
|
@@ -1403,6 +2300,11 @@ module Google
|
|
1403
2300
|
#
|
1404
2301
|
attr_reader :delete_hub
|
1405
2302
|
##
|
2303
|
+
# RPC-specific configuration for `list_hub_spokes`
|
2304
|
+
# @return [::Gapic::Config::Method]
|
2305
|
+
#
|
2306
|
+
attr_reader :list_hub_spokes
|
2307
|
+
##
|
1406
2308
|
# RPC-specific configuration for `list_spokes`
|
1407
2309
|
# @return [::Gapic::Config::Method]
|
1408
2310
|
#
|
@@ -1423,10 +2325,50 @@ module Google
|
|
1423
2325
|
#
|
1424
2326
|
attr_reader :update_spoke
|
1425
2327
|
##
|
2328
|
+
# RPC-specific configuration for `reject_hub_spoke`
|
2329
|
+
# @return [::Gapic::Config::Method]
|
2330
|
+
#
|
2331
|
+
attr_reader :reject_hub_spoke
|
2332
|
+
##
|
2333
|
+
# RPC-specific configuration for `accept_hub_spoke`
|
2334
|
+
# @return [::Gapic::Config::Method]
|
2335
|
+
#
|
2336
|
+
attr_reader :accept_hub_spoke
|
2337
|
+
##
|
1426
2338
|
# RPC-specific configuration for `delete_spoke`
|
1427
2339
|
# @return [::Gapic::Config::Method]
|
1428
2340
|
#
|
1429
2341
|
attr_reader :delete_spoke
|
2342
|
+
##
|
2343
|
+
# RPC-specific configuration for `get_route_table`
|
2344
|
+
# @return [::Gapic::Config::Method]
|
2345
|
+
#
|
2346
|
+
attr_reader :get_route_table
|
2347
|
+
##
|
2348
|
+
# RPC-specific configuration for `get_route`
|
2349
|
+
# @return [::Gapic::Config::Method]
|
2350
|
+
#
|
2351
|
+
attr_reader :get_route
|
2352
|
+
##
|
2353
|
+
# RPC-specific configuration for `list_routes`
|
2354
|
+
# @return [::Gapic::Config::Method]
|
2355
|
+
#
|
2356
|
+
attr_reader :list_routes
|
2357
|
+
##
|
2358
|
+
# RPC-specific configuration for `list_route_tables`
|
2359
|
+
# @return [::Gapic::Config::Method]
|
2360
|
+
#
|
2361
|
+
attr_reader :list_route_tables
|
2362
|
+
##
|
2363
|
+
# RPC-specific configuration for `get_group`
|
2364
|
+
# @return [::Gapic::Config::Method]
|
2365
|
+
#
|
2366
|
+
attr_reader :get_group
|
2367
|
+
##
|
2368
|
+
# RPC-specific configuration for `list_groups`
|
2369
|
+
# @return [::Gapic::Config::Method]
|
2370
|
+
#
|
2371
|
+
attr_reader :list_groups
|
1430
2372
|
|
1431
2373
|
# @private
|
1432
2374
|
def initialize parent_rpcs = nil
|
@@ -1440,6 +2382,8 @@ module Google
|
|
1440
2382
|
@update_hub = ::Gapic::Config::Method.new update_hub_config
|
1441
2383
|
delete_hub_config = parent_rpcs.delete_hub if parent_rpcs.respond_to? :delete_hub
|
1442
2384
|
@delete_hub = ::Gapic::Config::Method.new delete_hub_config
|
2385
|
+
list_hub_spokes_config = parent_rpcs.list_hub_spokes if parent_rpcs.respond_to? :list_hub_spokes
|
2386
|
+
@list_hub_spokes = ::Gapic::Config::Method.new list_hub_spokes_config
|
1443
2387
|
list_spokes_config = parent_rpcs.list_spokes if parent_rpcs.respond_to? :list_spokes
|
1444
2388
|
@list_spokes = ::Gapic::Config::Method.new list_spokes_config
|
1445
2389
|
get_spoke_config = parent_rpcs.get_spoke if parent_rpcs.respond_to? :get_spoke
|
@@ -1448,8 +2392,24 @@ module Google
|
|
1448
2392
|
@create_spoke = ::Gapic::Config::Method.new create_spoke_config
|
1449
2393
|
update_spoke_config = parent_rpcs.update_spoke if parent_rpcs.respond_to? :update_spoke
|
1450
2394
|
@update_spoke = ::Gapic::Config::Method.new update_spoke_config
|
2395
|
+
reject_hub_spoke_config = parent_rpcs.reject_hub_spoke if parent_rpcs.respond_to? :reject_hub_spoke
|
2396
|
+
@reject_hub_spoke = ::Gapic::Config::Method.new reject_hub_spoke_config
|
2397
|
+
accept_hub_spoke_config = parent_rpcs.accept_hub_spoke if parent_rpcs.respond_to? :accept_hub_spoke
|
2398
|
+
@accept_hub_spoke = ::Gapic::Config::Method.new accept_hub_spoke_config
|
1451
2399
|
delete_spoke_config = parent_rpcs.delete_spoke if parent_rpcs.respond_to? :delete_spoke
|
1452
2400
|
@delete_spoke = ::Gapic::Config::Method.new delete_spoke_config
|
2401
|
+
get_route_table_config = parent_rpcs.get_route_table if parent_rpcs.respond_to? :get_route_table
|
2402
|
+
@get_route_table = ::Gapic::Config::Method.new get_route_table_config
|
2403
|
+
get_route_config = parent_rpcs.get_route if parent_rpcs.respond_to? :get_route
|
2404
|
+
@get_route = ::Gapic::Config::Method.new get_route_config
|
2405
|
+
list_routes_config = parent_rpcs.list_routes if parent_rpcs.respond_to? :list_routes
|
2406
|
+
@list_routes = ::Gapic::Config::Method.new list_routes_config
|
2407
|
+
list_route_tables_config = parent_rpcs.list_route_tables if parent_rpcs.respond_to? :list_route_tables
|
2408
|
+
@list_route_tables = ::Gapic::Config::Method.new list_route_tables_config
|
2409
|
+
get_group_config = parent_rpcs.get_group if parent_rpcs.respond_to? :get_group
|
2410
|
+
@get_group = ::Gapic::Config::Method.new get_group_config
|
2411
|
+
list_groups_config = parent_rpcs.list_groups if parent_rpcs.respond_to? :list_groups
|
2412
|
+
@list_groups = ::Gapic::Config::Method.new list_groups_config
|
1453
2413
|
|
1454
2414
|
yield self if block_given?
|
1455
2415
|
end
|