google-cloud-network_services-v1 2.1.0 → 2.2.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_services/v1/network_services/client.rb +1188 -140
- data/lib/google/cloud/network_services/v1/network_services/paths.rb +175 -0
- data/lib/google/cloud/network_services/v1/network_services/rest/client.rb +1115 -137
- data/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +613 -0
- data/lib/google/cloud/network_services/v1/version.rb +1 -1
- data/lib/google/cloud/networkservices/v1/common_pb.rb +2 -1
- data/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb +1 -1
- data/lib/google/cloud/networkservices/v1/gateway_pb.rb +4 -1
- data/lib/google/cloud/networkservices/v1/grpc_route_pb.rb +2 -1
- data/lib/google/cloud/networkservices/v1/http_route_pb.rb +3 -1
- data/lib/google/cloud/networkservices/v1/mesh_pb.rb +2 -1
- data/lib/google/cloud/networkservices/v1/network_services_pb.rb +4 -1
- data/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +20 -0
- data/lib/google/cloud/networkservices/v1/route_view_pb.rb +52 -0
- data/lib/google/cloud/networkservices/v1/service_binding_pb.rb +4 -1
- data/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb +58 -0
- data/lib/google/cloud/networkservices/v1/tcp_route_pb.rb +3 -1
- data/lib/google/cloud/networkservices/v1/tls_route_pb.rb +3 -1
- data/proto_docs/google/cloud/networkservices/v1/common.rb +18 -1
- data/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb +12 -1
- data/proto_docs/google/cloud/networkservices/v1/gateway.rb +96 -8
- data/proto_docs/google/cloud/networkservices/v1/grpc_route.rb +51 -7
- data/proto_docs/google/cloud/networkservices/v1/http_route.rb +86 -1
- data/proto_docs/google/cloud/networkservices/v1/mesh.rb +16 -1
- data/proto_docs/google/cloud/networkservices/v1/route_view.rb +168 -0
- data/proto_docs/google/cloud/networkservices/v1/service_binding.rb +47 -10
- data/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb +217 -0
- data/proto_docs/google/cloud/networkservices/v1/tcp_route.rb +23 -7
- data/proto_docs/google/cloud/networkservices/v1/tls_route.rb +35 -6
- metadata +6 -2
@@ -239,7 +239,7 @@ module Google
|
|
239
239
|
# @param options [::Gapic::CallOptions, ::Hash]
|
240
240
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
241
241
|
#
|
242
|
-
# @overload list_endpoint_policies(parent: nil, page_size: nil, page_token: nil)
|
242
|
+
# @overload list_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil)
|
243
243
|
# Pass arguments to `list_endpoint_policies` via keyword arguments. Note that at
|
244
244
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
245
245
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -254,6 +254,10 @@ module Google
|
|
254
254
|
# Indicates that this is a continuation of a prior
|
255
255
|
# `ListEndpointPolicies` call, and that the system should return the
|
256
256
|
# next page of data.
|
257
|
+
# @param return_partial_success [::Boolean]
|
258
|
+
# Optional. If true, allow partial responses for multi-regional Aggregated
|
259
|
+
# List requests. Otherwise if one of the locations is down or unreachable,
|
260
|
+
# the Aggregated List request will fail.
|
257
261
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
258
262
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>]
|
259
263
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1127,7 +1131,7 @@ module Google
|
|
1127
1131
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1128
1132
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1129
1133
|
#
|
1130
|
-
# @overload list_grpc_routes(parent: nil, page_size: nil, page_token: nil)
|
1134
|
+
# @overload list_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil)
|
1131
1135
|
# Pass arguments to `list_grpc_routes` via keyword arguments. Note that at
|
1132
1136
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1133
1137
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1141,6 +1145,10 @@ module Google
|
|
1141
1145
|
# The value returned by the last `ListGrpcRoutesResponse`
|
1142
1146
|
# Indicates that this is a continuation of a prior `ListGrpcRoutes` call,
|
1143
1147
|
# and that the system should return the next page of data.
|
1148
|
+
# @param return_partial_success [::Boolean]
|
1149
|
+
# Optional. If true, allow partial responses for multi-regional Aggregated
|
1150
|
+
# List requests. Otherwise if one of the locations is down or unreachable,
|
1151
|
+
# the Aggregated List request will fail.
|
1144
1152
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1145
1153
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>]
|
1146
1154
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1570,7 +1578,7 @@ module Google
|
|
1570
1578
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1571
1579
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1572
1580
|
#
|
1573
|
-
# @overload list_http_routes(parent: nil, page_size: nil, page_token: nil)
|
1581
|
+
# @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil)
|
1574
1582
|
# Pass arguments to `list_http_routes` via keyword arguments. Note that at
|
1575
1583
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1576
1584
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1584,6 +1592,10 @@ module Google
|
|
1584
1592
|
# The value returned by the last `ListHttpRoutesResponse`
|
1585
1593
|
# Indicates that this is a continuation of a prior `ListHttpRoutes` call,
|
1586
1594
|
# and that the system should return the next page of data.
|
1595
|
+
# @param return_partial_success [::Boolean]
|
1596
|
+
# Optional. If true, allow partial responses for multi-regional Aggregated
|
1597
|
+
# List requests. Otherwise if one of the locations is down or unreachable,
|
1598
|
+
# the Aggregated List request will fail.
|
1587
1599
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1588
1600
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>]
|
1589
1601
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -2013,7 +2025,7 @@ module Google
|
|
2013
2025
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2014
2026
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2015
2027
|
#
|
2016
|
-
# @overload list_tcp_routes(parent: nil, page_size: nil, page_token: nil)
|
2028
|
+
# @overload list_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil)
|
2017
2029
|
# Pass arguments to `list_tcp_routes` via keyword arguments. Note that at
|
2018
2030
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2019
2031
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -2027,6 +2039,10 @@ module Google
|
|
2027
2039
|
# The value returned by the last `ListTcpRoutesResponse`
|
2028
2040
|
# Indicates that this is a continuation of a prior `ListTcpRoutes` call,
|
2029
2041
|
# and that the system should return the next page of data.
|
2042
|
+
# @param return_partial_success [::Boolean]
|
2043
|
+
# Optional. If true, allow partial responses for multi-regional Aggregated
|
2044
|
+
# List requests. Otherwise if one of the locations is down or unreachable,
|
2045
|
+
# the Aggregated List request will fail.
|
2030
2046
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
2031
2047
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>]
|
2032
2048
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -2456,7 +2472,7 @@ module Google
|
|
2456
2472
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2457
2473
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2458
2474
|
#
|
2459
|
-
# @overload list_tls_routes(parent: nil, page_size: nil, page_token: nil)
|
2475
|
+
# @overload list_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil)
|
2460
2476
|
# Pass arguments to `list_tls_routes` via keyword arguments. Note that at
|
2461
2477
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2462
2478
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -2470,6 +2486,10 @@ module Google
|
|
2470
2486
|
# The value returned by the last `ListTlsRoutesResponse`
|
2471
2487
|
# Indicates that this is a continuation of a prior `ListTlsRoutes` call,
|
2472
2488
|
# and that the system should return the next page of data.
|
2489
|
+
# @param return_partial_success [::Boolean]
|
2490
|
+
# Optional. If true, allow partial responses for multi-regional Aggregated
|
2491
|
+
# List requests. Otherwise if one of the locations is down or unreachable,
|
2492
|
+
# the Aggregated List request will fail.
|
2473
2493
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
2474
2494
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>]
|
2475
2495
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -2906,7 +2926,7 @@ module Google
|
|
2906
2926
|
#
|
2907
2927
|
# @param parent [::String]
|
2908
2928
|
# Required. The project and location from which the ServiceBindings should be
|
2909
|
-
# listed, specified in the format `projects/*/locations
|
2929
|
+
# listed, specified in the format `projects/*/locations/*`.
|
2910
2930
|
# @param page_size [::Integer]
|
2911
2931
|
# Maximum number of ServiceBindings to return per call.
|
2912
2932
|
# @param page_token [::String]
|
@@ -2997,7 +3017,7 @@ module Google
|
|
2997
3017
|
#
|
2998
3018
|
# @param name [::String]
|
2999
3019
|
# Required. A name of the ServiceBinding to get. Must be in the format
|
3000
|
-
# `projects/*/locations
|
3020
|
+
# `projects/*/locations/*/serviceBindings/*`.
|
3001
3021
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3002
3022
|
# @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceBinding]
|
3003
3023
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -3076,7 +3096,7 @@ module Google
|
|
3076
3096
|
#
|
3077
3097
|
# @param parent [::String]
|
3078
3098
|
# Required. The parent resource of the ServiceBinding. Must be in the
|
3079
|
-
# format `projects/*/locations
|
3099
|
+
# format `projects/*/locations/*`.
|
3080
3100
|
# @param service_binding_id [::String]
|
3081
3101
|
# Required. Short name of the ServiceBinding resource to be created.
|
3082
3102
|
# @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash]
|
@@ -3148,6 +3168,99 @@ module Google
|
|
3148
3168
|
raise ::Google::Cloud::Error.from_error(e)
|
3149
3169
|
end
|
3150
3170
|
|
3171
|
+
##
|
3172
|
+
# Updates the parameters of a single ServiceBinding.
|
3173
|
+
#
|
3174
|
+
# @overload update_service_binding(request, options = nil)
|
3175
|
+
# Pass arguments to `update_service_binding` via a request object, either of type
|
3176
|
+
# {::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest} or an equivalent Hash.
|
3177
|
+
#
|
3178
|
+
# @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Hash]
|
3179
|
+
# A request object representing the call parameters. Required. To specify no
|
3180
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3181
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3182
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3183
|
+
#
|
3184
|
+
# @overload update_service_binding(update_mask: nil, service_binding: nil)
|
3185
|
+
# Pass arguments to `update_service_binding` via keyword arguments. Note that at
|
3186
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3187
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3188
|
+
#
|
3189
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3190
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
3191
|
+
# ServiceBinding resource by the update.
|
3192
|
+
# The fields specified in the update_mask are relative to the resource, not
|
3193
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
3194
|
+
# user does not provide a mask then all fields will be overwritten.
|
3195
|
+
# @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash]
|
3196
|
+
# Required. Updated ServiceBinding resource.
|
3197
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3198
|
+
# @yieldparam result [::Gapic::Operation]
|
3199
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3200
|
+
#
|
3201
|
+
# @return [::Gapic::Operation]
|
3202
|
+
#
|
3203
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3204
|
+
#
|
3205
|
+
# @example Basic example
|
3206
|
+
# require "google/cloud/network_services/v1"
|
3207
|
+
#
|
3208
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3209
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
3210
|
+
#
|
3211
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3212
|
+
# request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new
|
3213
|
+
#
|
3214
|
+
# # Call the update_service_binding method.
|
3215
|
+
# result = client.update_service_binding request
|
3216
|
+
#
|
3217
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3218
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3219
|
+
# # Here is how to wait for a response.
|
3220
|
+
# result.wait_until_done! timeout: 60
|
3221
|
+
# if result.response?
|
3222
|
+
# p result.response
|
3223
|
+
# else
|
3224
|
+
# puts "No response received."
|
3225
|
+
# end
|
3226
|
+
#
|
3227
|
+
def update_service_binding request, options = nil
|
3228
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3229
|
+
|
3230
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest
|
3231
|
+
|
3232
|
+
# Converts hash and nil to an options object
|
3233
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3234
|
+
|
3235
|
+
# Customize the options with defaults
|
3236
|
+
call_metadata = @config.rpcs.update_service_binding.metadata.to_h
|
3237
|
+
|
3238
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3239
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3240
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3241
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
3242
|
+
transports_version_send: [:rest]
|
3243
|
+
|
3244
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3245
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3246
|
+
|
3247
|
+
options.apply_defaults timeout: @config.rpcs.update_service_binding.timeout,
|
3248
|
+
metadata: call_metadata,
|
3249
|
+
retry_policy: @config.rpcs.update_service_binding.retry_policy
|
3250
|
+
|
3251
|
+
options.apply_defaults timeout: @config.timeout,
|
3252
|
+
metadata: @config.metadata,
|
3253
|
+
retry_policy: @config.retry_policy
|
3254
|
+
|
3255
|
+
@network_services_stub.update_service_binding request, options do |result, operation|
|
3256
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3257
|
+
yield result, operation if block_given?
|
3258
|
+
throw :response, result
|
3259
|
+
end
|
3260
|
+
rescue ::Gapic::Rest::Error => e
|
3261
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3262
|
+
end
|
3263
|
+
|
3151
3264
|
##
|
3152
3265
|
# Deletes a single ServiceBinding.
|
3153
3266
|
#
|
@@ -3168,7 +3281,7 @@ module Google
|
|
3168
3281
|
#
|
3169
3282
|
# @param name [::String]
|
3170
3283
|
# Required. A name of the ServiceBinding to delete. Must be in the format
|
3171
|
-
# `projects/*/locations
|
3284
|
+
# `projects/*/locations/*/serviceBindings/*`.
|
3172
3285
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3173
3286
|
# @yieldparam result [::Gapic::Operation]
|
3174
3287
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -3249,7 +3362,7 @@ module Google
|
|
3249
3362
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3250
3363
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3251
3364
|
#
|
3252
|
-
# @overload list_meshes(parent: nil, page_size: nil, page_token: nil)
|
3365
|
+
# @overload list_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil)
|
3253
3366
|
# Pass arguments to `list_meshes` via keyword arguments. Note that at
|
3254
3367
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3255
3368
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -3263,6 +3376,10 @@ module Google
|
|
3263
3376
|
# The value returned by the last `ListMeshesResponse`
|
3264
3377
|
# Indicates that this is a continuation of a prior `ListMeshes` call,
|
3265
3378
|
# and that the system should return the next page of data.
|
3379
|
+
# @param return_partial_success [::Boolean]
|
3380
|
+
# Optional. If true, allow partial responses for multi-regional Aggregated
|
3381
|
+
# List requests. Otherwise if one of the locations is down or unreachable,
|
3382
|
+
# the Aggregated List request will fail.
|
3266
3383
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3267
3384
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>]
|
3268
3385
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -3680,149 +3797,940 @@ module Google
|
|
3680
3797
|
end
|
3681
3798
|
|
3682
3799
|
##
|
3683
|
-
#
|
3800
|
+
# Lists ServiceLbPolicies in a given project and location.
|
3684
3801
|
#
|
3685
|
-
#
|
3686
|
-
#
|
3687
|
-
#
|
3688
|
-
# applied individually to specific RPCs. See
|
3689
|
-
# {::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client::Configuration::Rpcs}
|
3690
|
-
# for a list of RPCs that can be configured independently.
|
3802
|
+
# @overload list_service_lb_policies(request, options = nil)
|
3803
|
+
# Pass arguments to `list_service_lb_policies` via a request object, either of type
|
3804
|
+
# {::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest} or an equivalent Hash.
|
3691
3805
|
#
|
3692
|
-
#
|
3693
|
-
#
|
3806
|
+
# @param request [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Hash]
|
3807
|
+
# A request object representing the call parameters. Required. To specify no
|
3808
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3809
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3810
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3694
3811
|
#
|
3695
|
-
# @
|
3812
|
+
# @overload list_service_lb_policies(parent: nil, page_size: nil, page_token: nil)
|
3813
|
+
# Pass arguments to `list_service_lb_policies` via keyword arguments. Note that at
|
3814
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3815
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3696
3816
|
#
|
3697
|
-
#
|
3698
|
-
#
|
3699
|
-
#
|
3700
|
-
#
|
3701
|
-
#
|
3702
|
-
#
|
3703
|
-
#
|
3817
|
+
# @param parent [::String]
|
3818
|
+
# Required. The project and location from which the ServiceLbPolicies should
|
3819
|
+
# be listed, specified in the format
|
3820
|
+
# `projects/{project}/locations/{location}`.
|
3821
|
+
# @param page_size [::Integer]
|
3822
|
+
# Maximum number of ServiceLbPolicies to return per call.
|
3823
|
+
# @param page_token [::String]
|
3824
|
+
# The value returned by the last `ListServiceLbPoliciesResponse`
|
3825
|
+
# Indicates that this is a continuation of a prior `ListRouters` call,
|
3826
|
+
# and that the system should return the next page of data.
|
3827
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3828
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>]
|
3829
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3704
3830
|
#
|
3705
|
-
#
|
3706
|
-
# client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config|
|
3707
|
-
# config.timeout = 10.0
|
3708
|
-
# config.rpcs.list_endpoint_policies.timeout = 20.0
|
3709
|
-
# end
|
3831
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>]
|
3710
3832
|
#
|
3711
|
-
#
|
3712
|
-
# A custom service endpoint, as a hostname or hostname:port. The default is
|
3713
|
-
# nil, indicating to use the default endpoint in the current universe domain.
|
3714
|
-
# @return [::String,nil]
|
3715
|
-
# @!attribute [rw] credentials
|
3716
|
-
# Credentials to send with calls. You may provide any of the following types:
|
3717
|
-
# * (`String`) The path to a service account key file in JSON format
|
3718
|
-
# * (`Hash`) A service account key as a Hash
|
3719
|
-
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
3720
|
-
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
3721
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
3722
|
-
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
3723
|
-
# * (`nil`) indicating no credentials
|
3833
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3724
3834
|
#
|
3725
|
-
#
|
3726
|
-
#
|
3727
|
-
# providing it to a Google API client library. Providing an unvalidated credential
|
3728
|
-
# configuration to Google APIs can compromise the security of your systems and data.
|
3729
|
-
# For more information, refer to [Validate credential configurations from external
|
3730
|
-
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
3731
|
-
# @return [::Object]
|
3732
|
-
# @!attribute [rw] scope
|
3733
|
-
# The OAuth scopes
|
3734
|
-
# @return [::Array<::String>]
|
3735
|
-
# @!attribute [rw] lib_name
|
3736
|
-
# The library name as recorded in instrumentation and logging
|
3737
|
-
# @return [::String]
|
3738
|
-
# @!attribute [rw] lib_version
|
3739
|
-
# The library version as recorded in instrumentation and logging
|
3740
|
-
# @return [::String]
|
3741
|
-
# @!attribute [rw] timeout
|
3742
|
-
# The call timeout in seconds.
|
3743
|
-
# @return [::Numeric]
|
3744
|
-
# @!attribute [rw] metadata
|
3745
|
-
# Additional headers to be sent with the call.
|
3746
|
-
# @return [::Hash{::Symbol=>::String}]
|
3747
|
-
# @!attribute [rw] retry_policy
|
3748
|
-
# The retry policy. The value is a hash with the following keys:
|
3749
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3750
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3751
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3752
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3753
|
-
# trigger a retry.
|
3754
|
-
# @return [::Hash]
|
3755
|
-
# @!attribute [rw] quota_project
|
3756
|
-
# A separate project against which to charge quota.
|
3757
|
-
# @return [::String]
|
3758
|
-
# @!attribute [rw] universe_domain
|
3759
|
-
# The universe domain within which to make requests. This determines the
|
3760
|
-
# default endpoint URL. The default value of nil uses the environment
|
3761
|
-
# universe (usually the default "googleapis.com" universe).
|
3762
|
-
# @return [::String,nil]
|
3763
|
-
# @!attribute [rw] logger
|
3764
|
-
# A custom logger to use for request/response debug logging, or the value
|
3765
|
-
# `:default` (the default) to construct a default logger, or `nil` to
|
3766
|
-
# explicitly disable logging.
|
3767
|
-
# @return [::Logger,:default,nil]
|
3835
|
+
# @example Basic example
|
3836
|
+
# require "google/cloud/network_services/v1"
|
3768
3837
|
#
|
3769
|
-
|
3770
|
-
|
3838
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3839
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
3840
|
+
#
|
3841
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3842
|
+
# request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new
|
3843
|
+
#
|
3844
|
+
# # Call the list_service_lb_policies method.
|
3845
|
+
# result = client.list_service_lb_policies request
|
3846
|
+
#
|
3847
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3848
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3849
|
+
# result.each do |item|
|
3850
|
+
# # Each element is of type ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.
|
3851
|
+
# p item
|
3852
|
+
# end
|
3853
|
+
#
|
3854
|
+
def list_service_lb_policies request, options = nil
|
3855
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3771
3856
|
|
3772
|
-
|
3773
|
-
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
3774
|
-
DEFAULT_ENDPOINT = "networkservices.googleapis.com"
|
3857
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest
|
3775
3858
|
|
3776
|
-
|
3777
|
-
|
3778
|
-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
3779
|
-
allowed.any? { |klass| klass === value }
|
3780
|
-
end
|
3781
|
-
config_attr :scope, nil, ::String, ::Array, nil
|
3782
|
-
config_attr :lib_name, nil, ::String, nil
|
3783
|
-
config_attr :lib_version, nil, ::String, nil
|
3784
|
-
config_attr :timeout, nil, ::Numeric, nil
|
3785
|
-
config_attr :metadata, nil, ::Hash, nil
|
3786
|
-
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3787
|
-
config_attr :quota_project, nil, ::String, nil
|
3788
|
-
config_attr :universe_domain, nil, ::String, nil
|
3859
|
+
# Converts hash and nil to an options object
|
3860
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3789
3861
|
|
3790
|
-
#
|
3791
|
-
|
3792
|
-
# are only used when this service is used as mixin, and only
|
3793
|
-
# by the host service.
|
3794
|
-
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
3795
|
-
config_attr :bindings_override, {}, ::Hash, nil
|
3796
|
-
config_attr :logger, :default, ::Logger, nil, :default
|
3862
|
+
# Customize the options with defaults
|
3863
|
+
call_metadata = @config.rpcs.list_service_lb_policies.metadata.to_h
|
3797
3864
|
|
3798
|
-
#
|
3799
|
-
|
3800
|
-
@
|
3865
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3866
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3867
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3868
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
3869
|
+
transports_version_send: [:rest]
|
3801
3870
|
|
3802
|
-
|
3803
|
-
|
3871
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3872
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3804
3873
|
|
3805
|
-
|
3806
|
-
|
3807
|
-
|
3808
|
-
|
3809
|
-
|
3810
|
-
|
3811
|
-
|
3812
|
-
|
3813
|
-
|
3814
|
-
|
3874
|
+
options.apply_defaults timeout: @config.rpcs.list_service_lb_policies.timeout,
|
3875
|
+
metadata: call_metadata,
|
3876
|
+
retry_policy: @config.rpcs.list_service_lb_policies.retry_policy
|
3877
|
+
|
3878
|
+
options.apply_defaults timeout: @config.timeout,
|
3879
|
+
metadata: @config.metadata,
|
3880
|
+
retry_policy: @config.retry_policy
|
3881
|
+
|
3882
|
+
@network_services_stub.list_service_lb_policies request, options do |result, operation|
|
3883
|
+
result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, "service_lb_policies", request, result, options
|
3884
|
+
yield result, operation if block_given?
|
3885
|
+
throw :response, result
|
3815
3886
|
end
|
3887
|
+
rescue ::Gapic::Rest::Error => e
|
3888
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3889
|
+
end
|
3816
3890
|
|
3817
|
-
|
3818
|
-
|
3819
|
-
|
3820
|
-
|
3821
|
-
|
3822
|
-
|
3823
|
-
|
3824
|
-
|
3825
|
-
|
3891
|
+
##
|
3892
|
+
# Gets details of a single ServiceLbPolicy.
|
3893
|
+
#
|
3894
|
+
# @overload get_service_lb_policy(request, options = nil)
|
3895
|
+
# Pass arguments to `get_service_lb_policy` via a request object, either of type
|
3896
|
+
# {::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest} or an equivalent Hash.
|
3897
|
+
#
|
3898
|
+
# @param request [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Hash]
|
3899
|
+
# A request object representing the call parameters. Required. To specify no
|
3900
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3901
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3902
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3903
|
+
#
|
3904
|
+
# @overload get_service_lb_policy(name: nil)
|
3905
|
+
# Pass arguments to `get_service_lb_policy` via keyword arguments. Note that at
|
3906
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3907
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3908
|
+
#
|
3909
|
+
# @param name [::String]
|
3910
|
+
# Required. A name of the ServiceLbPolicy to get. Must be in the format
|
3911
|
+
# `projects/{project}/locations/{location}/serviceLbPolicies/*`.
|
3912
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3913
|
+
# @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy]
|
3914
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3915
|
+
#
|
3916
|
+
# @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy]
|
3917
|
+
#
|
3918
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3919
|
+
#
|
3920
|
+
# @example Basic example
|
3921
|
+
# require "google/cloud/network_services/v1"
|
3922
|
+
#
|
3923
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3924
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
3925
|
+
#
|
3926
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3927
|
+
# request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new
|
3928
|
+
#
|
3929
|
+
# # Call the get_service_lb_policy method.
|
3930
|
+
# result = client.get_service_lb_policy request
|
3931
|
+
#
|
3932
|
+
# # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy.
|
3933
|
+
# p result
|
3934
|
+
#
|
3935
|
+
def get_service_lb_policy request, options = nil
|
3936
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3937
|
+
|
3938
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest
|
3939
|
+
|
3940
|
+
# Converts hash and nil to an options object
|
3941
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3942
|
+
|
3943
|
+
# Customize the options with defaults
|
3944
|
+
call_metadata = @config.rpcs.get_service_lb_policy.metadata.to_h
|
3945
|
+
|
3946
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3947
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3948
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3949
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
3950
|
+
transports_version_send: [:rest]
|
3951
|
+
|
3952
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3953
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3954
|
+
|
3955
|
+
options.apply_defaults timeout: @config.rpcs.get_service_lb_policy.timeout,
|
3956
|
+
metadata: call_metadata,
|
3957
|
+
retry_policy: @config.rpcs.get_service_lb_policy.retry_policy
|
3958
|
+
|
3959
|
+
options.apply_defaults timeout: @config.timeout,
|
3960
|
+
metadata: @config.metadata,
|
3961
|
+
retry_policy: @config.retry_policy
|
3962
|
+
|
3963
|
+
@network_services_stub.get_service_lb_policy request, options do |result, operation|
|
3964
|
+
yield result, operation if block_given?
|
3965
|
+
end
|
3966
|
+
rescue ::Gapic::Rest::Error => e
|
3967
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3968
|
+
end
|
3969
|
+
|
3970
|
+
##
|
3971
|
+
# Creates a new ServiceLbPolicy in a given project and location.
|
3972
|
+
#
|
3973
|
+
# @overload create_service_lb_policy(request, options = nil)
|
3974
|
+
# Pass arguments to `create_service_lb_policy` via a request object, either of type
|
3975
|
+
# {::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest} or an equivalent Hash.
|
3976
|
+
#
|
3977
|
+
# @param request [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Hash]
|
3978
|
+
# A request object representing the call parameters. Required. To specify no
|
3979
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3980
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3981
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3982
|
+
#
|
3983
|
+
# @overload create_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil)
|
3984
|
+
# Pass arguments to `create_service_lb_policy` via keyword arguments. Note that at
|
3985
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3986
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3987
|
+
#
|
3988
|
+
# @param parent [::String]
|
3989
|
+
# Required. The parent resource of the ServiceLbPolicy. Must be in the
|
3990
|
+
# format `projects/{project}/locations/{location}`.
|
3991
|
+
# @param service_lb_policy_id [::String]
|
3992
|
+
# Required. Short name of the ServiceLbPolicy resource to be created.
|
3993
|
+
# E.g. for resource name
|
3994
|
+
# `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.
|
3995
|
+
# the id is value of \\{service_lb_policy_name}
|
3996
|
+
# @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash]
|
3997
|
+
# Required. ServiceLbPolicy resource to be created.
|
3998
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3999
|
+
# @yieldparam result [::Gapic::Operation]
|
4000
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4001
|
+
#
|
4002
|
+
# @return [::Gapic::Operation]
|
4003
|
+
#
|
4004
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4005
|
+
#
|
4006
|
+
# @example Basic example
|
4007
|
+
# require "google/cloud/network_services/v1"
|
4008
|
+
#
|
4009
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4010
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
4011
|
+
#
|
4012
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4013
|
+
# request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new
|
4014
|
+
#
|
4015
|
+
# # Call the create_service_lb_policy method.
|
4016
|
+
# result = client.create_service_lb_policy request
|
4017
|
+
#
|
4018
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4019
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4020
|
+
# # Here is how to wait for a response.
|
4021
|
+
# result.wait_until_done! timeout: 60
|
4022
|
+
# if result.response?
|
4023
|
+
# p result.response
|
4024
|
+
# else
|
4025
|
+
# puts "No response received."
|
4026
|
+
# end
|
4027
|
+
#
|
4028
|
+
def create_service_lb_policy request, options = nil
|
4029
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4030
|
+
|
4031
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest
|
4032
|
+
|
4033
|
+
# Converts hash and nil to an options object
|
4034
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4035
|
+
|
4036
|
+
# Customize the options with defaults
|
4037
|
+
call_metadata = @config.rpcs.create_service_lb_policy.metadata.to_h
|
4038
|
+
|
4039
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4040
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4041
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4042
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
4043
|
+
transports_version_send: [:rest]
|
4044
|
+
|
4045
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4046
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4047
|
+
|
4048
|
+
options.apply_defaults timeout: @config.rpcs.create_service_lb_policy.timeout,
|
4049
|
+
metadata: call_metadata,
|
4050
|
+
retry_policy: @config.rpcs.create_service_lb_policy.retry_policy
|
4051
|
+
|
4052
|
+
options.apply_defaults timeout: @config.timeout,
|
4053
|
+
metadata: @config.metadata,
|
4054
|
+
retry_policy: @config.retry_policy
|
4055
|
+
|
4056
|
+
@network_services_stub.create_service_lb_policy request, options do |result, operation|
|
4057
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4058
|
+
yield result, operation if block_given?
|
4059
|
+
throw :response, result
|
4060
|
+
end
|
4061
|
+
rescue ::Gapic::Rest::Error => e
|
4062
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4063
|
+
end
|
4064
|
+
|
4065
|
+
##
|
4066
|
+
# Updates the parameters of a single ServiceLbPolicy.
|
4067
|
+
#
|
4068
|
+
# @overload update_service_lb_policy(request, options = nil)
|
4069
|
+
# Pass arguments to `update_service_lb_policy` via a request object, either of type
|
4070
|
+
# {::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest} or an equivalent Hash.
|
4071
|
+
#
|
4072
|
+
# @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Hash]
|
4073
|
+
# A request object representing the call parameters. Required. To specify no
|
4074
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4075
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4076
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4077
|
+
#
|
4078
|
+
# @overload update_service_lb_policy(update_mask: nil, service_lb_policy: nil)
|
4079
|
+
# Pass arguments to `update_service_lb_policy` via keyword arguments. Note that at
|
4080
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4081
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4082
|
+
#
|
4083
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4084
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
4085
|
+
# ServiceLbPolicy resource by the update.
|
4086
|
+
# The fields specified in the update_mask are relative to the resource, not
|
4087
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
4088
|
+
# user does not provide a mask then all fields will be overwritten.
|
4089
|
+
# @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash]
|
4090
|
+
# Required. Updated ServiceLbPolicy resource.
|
4091
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4092
|
+
# @yieldparam result [::Gapic::Operation]
|
4093
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4094
|
+
#
|
4095
|
+
# @return [::Gapic::Operation]
|
4096
|
+
#
|
4097
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4098
|
+
#
|
4099
|
+
# @example Basic example
|
4100
|
+
# require "google/cloud/network_services/v1"
|
4101
|
+
#
|
4102
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4103
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
4104
|
+
#
|
4105
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4106
|
+
# request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new
|
4107
|
+
#
|
4108
|
+
# # Call the update_service_lb_policy method.
|
4109
|
+
# result = client.update_service_lb_policy request
|
4110
|
+
#
|
4111
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4112
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4113
|
+
# # Here is how to wait for a response.
|
4114
|
+
# result.wait_until_done! timeout: 60
|
4115
|
+
# if result.response?
|
4116
|
+
# p result.response
|
4117
|
+
# else
|
4118
|
+
# puts "No response received."
|
4119
|
+
# end
|
4120
|
+
#
|
4121
|
+
def update_service_lb_policy request, options = nil
|
4122
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4123
|
+
|
4124
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest
|
4125
|
+
|
4126
|
+
# Converts hash and nil to an options object
|
4127
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4128
|
+
|
4129
|
+
# Customize the options with defaults
|
4130
|
+
call_metadata = @config.rpcs.update_service_lb_policy.metadata.to_h
|
4131
|
+
|
4132
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4133
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4134
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4135
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
4136
|
+
transports_version_send: [:rest]
|
4137
|
+
|
4138
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4139
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4140
|
+
|
4141
|
+
options.apply_defaults timeout: @config.rpcs.update_service_lb_policy.timeout,
|
4142
|
+
metadata: call_metadata,
|
4143
|
+
retry_policy: @config.rpcs.update_service_lb_policy.retry_policy
|
4144
|
+
|
4145
|
+
options.apply_defaults timeout: @config.timeout,
|
4146
|
+
metadata: @config.metadata,
|
4147
|
+
retry_policy: @config.retry_policy
|
4148
|
+
|
4149
|
+
@network_services_stub.update_service_lb_policy request, options do |result, operation|
|
4150
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4151
|
+
yield result, operation if block_given?
|
4152
|
+
throw :response, result
|
4153
|
+
end
|
4154
|
+
rescue ::Gapic::Rest::Error => e
|
4155
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4156
|
+
end
|
4157
|
+
|
4158
|
+
##
|
4159
|
+
# Deletes a single ServiceLbPolicy.
|
4160
|
+
#
|
4161
|
+
# @overload delete_service_lb_policy(request, options = nil)
|
4162
|
+
# Pass arguments to `delete_service_lb_policy` via a request object, either of type
|
4163
|
+
# {::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest} or an equivalent Hash.
|
4164
|
+
#
|
4165
|
+
# @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Hash]
|
4166
|
+
# A request object representing the call parameters. Required. To specify no
|
4167
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4168
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4169
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4170
|
+
#
|
4171
|
+
# @overload delete_service_lb_policy(name: nil)
|
4172
|
+
# Pass arguments to `delete_service_lb_policy` via keyword arguments. Note that at
|
4173
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4174
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4175
|
+
#
|
4176
|
+
# @param name [::String]
|
4177
|
+
# Required. A name of the ServiceLbPolicy to delete. Must be in the format
|
4178
|
+
# `projects/{project}/locations/{location}/serviceLbPolicies/*`.
|
4179
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4180
|
+
# @yieldparam result [::Gapic::Operation]
|
4181
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4182
|
+
#
|
4183
|
+
# @return [::Gapic::Operation]
|
4184
|
+
#
|
4185
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4186
|
+
#
|
4187
|
+
# @example Basic example
|
4188
|
+
# require "google/cloud/network_services/v1"
|
4189
|
+
#
|
4190
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4191
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
4192
|
+
#
|
4193
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4194
|
+
# request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new
|
4195
|
+
#
|
4196
|
+
# # Call the delete_service_lb_policy method.
|
4197
|
+
# result = client.delete_service_lb_policy request
|
4198
|
+
#
|
4199
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4200
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4201
|
+
# # Here is how to wait for a response.
|
4202
|
+
# result.wait_until_done! timeout: 60
|
4203
|
+
# if result.response?
|
4204
|
+
# p result.response
|
4205
|
+
# else
|
4206
|
+
# puts "No response received."
|
4207
|
+
# end
|
4208
|
+
#
|
4209
|
+
def delete_service_lb_policy request, options = nil
|
4210
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4211
|
+
|
4212
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest
|
4213
|
+
|
4214
|
+
# Converts hash and nil to an options object
|
4215
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4216
|
+
|
4217
|
+
# Customize the options with defaults
|
4218
|
+
call_metadata = @config.rpcs.delete_service_lb_policy.metadata.to_h
|
4219
|
+
|
4220
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4221
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4222
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4223
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
4224
|
+
transports_version_send: [:rest]
|
4225
|
+
|
4226
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4227
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4228
|
+
|
4229
|
+
options.apply_defaults timeout: @config.rpcs.delete_service_lb_policy.timeout,
|
4230
|
+
metadata: call_metadata,
|
4231
|
+
retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy
|
4232
|
+
|
4233
|
+
options.apply_defaults timeout: @config.timeout,
|
4234
|
+
metadata: @config.metadata,
|
4235
|
+
retry_policy: @config.retry_policy
|
4236
|
+
|
4237
|
+
@network_services_stub.delete_service_lb_policy request, options do |result, operation|
|
4238
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4239
|
+
yield result, operation if block_given?
|
4240
|
+
throw :response, result
|
4241
|
+
end
|
4242
|
+
rescue ::Gapic::Rest::Error => e
|
4243
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4244
|
+
end
|
4245
|
+
|
4246
|
+
##
|
4247
|
+
# Get a single RouteView of a Gateway.
|
4248
|
+
#
|
4249
|
+
# @overload get_gateway_route_view(request, options = nil)
|
4250
|
+
# Pass arguments to `get_gateway_route_view` via a request object, either of type
|
4251
|
+
# {::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest} or an equivalent Hash.
|
4252
|
+
#
|
4253
|
+
# @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Hash]
|
4254
|
+
# A request object representing the call parameters. Required. To specify no
|
4255
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4256
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4257
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4258
|
+
#
|
4259
|
+
# @overload get_gateway_route_view(name: nil)
|
4260
|
+
# Pass arguments to `get_gateway_route_view` via keyword arguments. Note that at
|
4261
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4262
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4263
|
+
#
|
4264
|
+
# @param name [::String]
|
4265
|
+
# Required. Name of the GatewayRouteView resource.
|
4266
|
+
# Formats:
|
4267
|
+
# projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view}
|
4268
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4269
|
+
# @yieldparam result [::Google::Cloud::NetworkServices::V1::GatewayRouteView]
|
4270
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4271
|
+
#
|
4272
|
+
# @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView]
|
4273
|
+
#
|
4274
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4275
|
+
#
|
4276
|
+
# @example Basic example
|
4277
|
+
# require "google/cloud/network_services/v1"
|
4278
|
+
#
|
4279
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4280
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
4281
|
+
#
|
4282
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4283
|
+
# request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new
|
4284
|
+
#
|
4285
|
+
# # Call the get_gateway_route_view method.
|
4286
|
+
# result = client.get_gateway_route_view request
|
4287
|
+
#
|
4288
|
+
# # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView.
|
4289
|
+
# p result
|
4290
|
+
#
|
4291
|
+
def get_gateway_route_view request, options = nil
|
4292
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4293
|
+
|
4294
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest
|
4295
|
+
|
4296
|
+
# Converts hash and nil to an options object
|
4297
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4298
|
+
|
4299
|
+
# Customize the options with defaults
|
4300
|
+
call_metadata = @config.rpcs.get_gateway_route_view.metadata.to_h
|
4301
|
+
|
4302
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4303
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4304
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4305
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
4306
|
+
transports_version_send: [:rest]
|
4307
|
+
|
4308
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4309
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4310
|
+
|
4311
|
+
options.apply_defaults timeout: @config.rpcs.get_gateway_route_view.timeout,
|
4312
|
+
metadata: call_metadata,
|
4313
|
+
retry_policy: @config.rpcs.get_gateway_route_view.retry_policy
|
4314
|
+
|
4315
|
+
options.apply_defaults timeout: @config.timeout,
|
4316
|
+
metadata: @config.metadata,
|
4317
|
+
retry_policy: @config.retry_policy
|
4318
|
+
|
4319
|
+
@network_services_stub.get_gateway_route_view request, options do |result, operation|
|
4320
|
+
yield result, operation if block_given?
|
4321
|
+
end
|
4322
|
+
rescue ::Gapic::Rest::Error => e
|
4323
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4324
|
+
end
|
4325
|
+
|
4326
|
+
##
|
4327
|
+
# Get a single RouteView of a Mesh.
|
4328
|
+
#
|
4329
|
+
# @overload get_mesh_route_view(request, options = nil)
|
4330
|
+
# Pass arguments to `get_mesh_route_view` via a request object, either of type
|
4331
|
+
# {::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest} or an equivalent Hash.
|
4332
|
+
#
|
4333
|
+
# @param request [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Hash]
|
4334
|
+
# A request object representing the call parameters. Required. To specify no
|
4335
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4336
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4337
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4338
|
+
#
|
4339
|
+
# @overload get_mesh_route_view(name: nil)
|
4340
|
+
# Pass arguments to `get_mesh_route_view` via keyword arguments. Note that at
|
4341
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4342
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4343
|
+
#
|
4344
|
+
# @param name [::String]
|
4345
|
+
# Required. Name of the MeshRouteView resource.
|
4346
|
+
# Format:
|
4347
|
+
# projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view}
|
4348
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4349
|
+
# @yieldparam result [::Google::Cloud::NetworkServices::V1::MeshRouteView]
|
4350
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4351
|
+
#
|
4352
|
+
# @return [::Google::Cloud::NetworkServices::V1::MeshRouteView]
|
4353
|
+
#
|
4354
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4355
|
+
#
|
4356
|
+
# @example Basic example
|
4357
|
+
# require "google/cloud/network_services/v1"
|
4358
|
+
#
|
4359
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4360
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
4361
|
+
#
|
4362
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4363
|
+
# request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new
|
4364
|
+
#
|
4365
|
+
# # Call the get_mesh_route_view method.
|
4366
|
+
# result = client.get_mesh_route_view request
|
4367
|
+
#
|
4368
|
+
# # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView.
|
4369
|
+
# p result
|
4370
|
+
#
|
4371
|
+
def get_mesh_route_view request, options = nil
|
4372
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4373
|
+
|
4374
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest
|
4375
|
+
|
4376
|
+
# Converts hash and nil to an options object
|
4377
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4378
|
+
|
4379
|
+
# Customize the options with defaults
|
4380
|
+
call_metadata = @config.rpcs.get_mesh_route_view.metadata.to_h
|
4381
|
+
|
4382
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4383
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4384
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4385
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
4386
|
+
transports_version_send: [:rest]
|
4387
|
+
|
4388
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4389
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4390
|
+
|
4391
|
+
options.apply_defaults timeout: @config.rpcs.get_mesh_route_view.timeout,
|
4392
|
+
metadata: call_metadata,
|
4393
|
+
retry_policy: @config.rpcs.get_mesh_route_view.retry_policy
|
4394
|
+
|
4395
|
+
options.apply_defaults timeout: @config.timeout,
|
4396
|
+
metadata: @config.metadata,
|
4397
|
+
retry_policy: @config.retry_policy
|
4398
|
+
|
4399
|
+
@network_services_stub.get_mesh_route_view request, options do |result, operation|
|
4400
|
+
yield result, operation if block_given?
|
4401
|
+
end
|
4402
|
+
rescue ::Gapic::Rest::Error => e
|
4403
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4404
|
+
end
|
4405
|
+
|
4406
|
+
##
|
4407
|
+
# Lists RouteViews
|
4408
|
+
#
|
4409
|
+
# @overload list_gateway_route_views(request, options = nil)
|
4410
|
+
# Pass arguments to `list_gateway_route_views` via a request object, either of type
|
4411
|
+
# {::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest} or an equivalent Hash.
|
4412
|
+
#
|
4413
|
+
# @param request [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Hash]
|
4414
|
+
# A request object representing the call parameters. Required. To specify no
|
4415
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4416
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4417
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4418
|
+
#
|
4419
|
+
# @overload list_gateway_route_views(parent: nil, page_size: nil, page_token: nil)
|
4420
|
+
# Pass arguments to `list_gateway_route_views` via keyword arguments. Note that at
|
4421
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4422
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4423
|
+
#
|
4424
|
+
# @param parent [::String]
|
4425
|
+
# Required. The Gateway to which a Route is associated.
|
4426
|
+
# Formats:
|
4427
|
+
# projects/\\{project}/locations/\\{location}/gateways/\\{gateway}
|
4428
|
+
# @param page_size [::Integer]
|
4429
|
+
# Maximum number of GatewayRouteViews to return per call.
|
4430
|
+
# @param page_token [::String]
|
4431
|
+
# The value returned by the last `ListGatewayRouteViewsResponse`
|
4432
|
+
# Indicates that this is a continuation of a prior `ListGatewayRouteViews`
|
4433
|
+
# call, and that the system should return the next page of data.
|
4434
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4435
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>]
|
4436
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4437
|
+
#
|
4438
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>]
|
4439
|
+
#
|
4440
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4441
|
+
#
|
4442
|
+
# @example Basic example
|
4443
|
+
# require "google/cloud/network_services/v1"
|
4444
|
+
#
|
4445
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4446
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
4447
|
+
#
|
4448
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4449
|
+
# request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new
|
4450
|
+
#
|
4451
|
+
# # Call the list_gateway_route_views method.
|
4452
|
+
# result = client.list_gateway_route_views request
|
4453
|
+
#
|
4454
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4455
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4456
|
+
# result.each do |item|
|
4457
|
+
# # Each element is of type ::Google::Cloud::NetworkServices::V1::GatewayRouteView.
|
4458
|
+
# p item
|
4459
|
+
# end
|
4460
|
+
#
|
4461
|
+
def list_gateway_route_views request, options = nil
|
4462
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4463
|
+
|
4464
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest
|
4465
|
+
|
4466
|
+
# Converts hash and nil to an options object
|
4467
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4468
|
+
|
4469
|
+
# Customize the options with defaults
|
4470
|
+
call_metadata = @config.rpcs.list_gateway_route_views.metadata.to_h
|
4471
|
+
|
4472
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4473
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4474
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4475
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
4476
|
+
transports_version_send: [:rest]
|
4477
|
+
|
4478
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4479
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4480
|
+
|
4481
|
+
options.apply_defaults timeout: @config.rpcs.list_gateway_route_views.timeout,
|
4482
|
+
metadata: call_metadata,
|
4483
|
+
retry_policy: @config.rpcs.list_gateway_route_views.retry_policy
|
4484
|
+
|
4485
|
+
options.apply_defaults timeout: @config.timeout,
|
4486
|
+
metadata: @config.metadata,
|
4487
|
+
retry_policy: @config.retry_policy
|
4488
|
+
|
4489
|
+
@network_services_stub.list_gateway_route_views request, options do |result, operation|
|
4490
|
+
result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, "gateway_route_views", request, result, options
|
4491
|
+
yield result, operation if block_given?
|
4492
|
+
throw :response, result
|
4493
|
+
end
|
4494
|
+
rescue ::Gapic::Rest::Error => e
|
4495
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4496
|
+
end
|
4497
|
+
|
4498
|
+
##
|
4499
|
+
# Lists RouteViews
|
4500
|
+
#
|
4501
|
+
# @overload list_mesh_route_views(request, options = nil)
|
4502
|
+
# Pass arguments to `list_mesh_route_views` via a request object, either of type
|
4503
|
+
# {::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest} or an equivalent Hash.
|
4504
|
+
#
|
4505
|
+
# @param request [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Hash]
|
4506
|
+
# A request object representing the call parameters. Required. To specify no
|
4507
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4508
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4509
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4510
|
+
#
|
4511
|
+
# @overload list_mesh_route_views(parent: nil, page_size: nil, page_token: nil)
|
4512
|
+
# Pass arguments to `list_mesh_route_views` via keyword arguments. Note that at
|
4513
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4514
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4515
|
+
#
|
4516
|
+
# @param parent [::String]
|
4517
|
+
# Required. The Mesh to which a Route is associated.
|
4518
|
+
# Format:
|
4519
|
+
# projects/\\{project}/locations/\\{location}/meshes/\\{mesh}
|
4520
|
+
# @param page_size [::Integer]
|
4521
|
+
# Maximum number of MeshRouteViews to return per call.
|
4522
|
+
# @param page_token [::String]
|
4523
|
+
# The value returned by the last `ListMeshRouteViewsResponse`
|
4524
|
+
# Indicates that this is a continuation of a prior `ListMeshRouteViews` call,
|
4525
|
+
# and that the system should return the next page of data.
|
4526
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4527
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>]
|
4528
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4529
|
+
#
|
4530
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>]
|
4531
|
+
#
|
4532
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4533
|
+
#
|
4534
|
+
# @example Basic example
|
4535
|
+
# require "google/cloud/network_services/v1"
|
4536
|
+
#
|
4537
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4538
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
4539
|
+
#
|
4540
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4541
|
+
# request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new
|
4542
|
+
#
|
4543
|
+
# # Call the list_mesh_route_views method.
|
4544
|
+
# result = client.list_mesh_route_views request
|
4545
|
+
#
|
4546
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4547
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4548
|
+
# result.each do |item|
|
4549
|
+
# # Each element is of type ::Google::Cloud::NetworkServices::V1::MeshRouteView.
|
4550
|
+
# p item
|
4551
|
+
# end
|
4552
|
+
#
|
4553
|
+
def list_mesh_route_views request, options = nil
|
4554
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4555
|
+
|
4556
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest
|
4557
|
+
|
4558
|
+
# Converts hash and nil to an options object
|
4559
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4560
|
+
|
4561
|
+
# Customize the options with defaults
|
4562
|
+
call_metadata = @config.rpcs.list_mesh_route_views.metadata.to_h
|
4563
|
+
|
4564
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4565
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4566
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4567
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
4568
|
+
transports_version_send: [:rest]
|
4569
|
+
|
4570
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4571
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4572
|
+
|
4573
|
+
options.apply_defaults timeout: @config.rpcs.list_mesh_route_views.timeout,
|
4574
|
+
metadata: call_metadata,
|
4575
|
+
retry_policy: @config.rpcs.list_mesh_route_views.retry_policy
|
4576
|
+
|
4577
|
+
options.apply_defaults timeout: @config.timeout,
|
4578
|
+
metadata: @config.metadata,
|
4579
|
+
retry_policy: @config.retry_policy
|
4580
|
+
|
4581
|
+
@network_services_stub.list_mesh_route_views request, options do |result, operation|
|
4582
|
+
result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, "mesh_route_views", request, result, options
|
4583
|
+
yield result, operation if block_given?
|
4584
|
+
throw :response, result
|
4585
|
+
end
|
4586
|
+
rescue ::Gapic::Rest::Error => e
|
4587
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4588
|
+
end
|
4589
|
+
|
4590
|
+
##
|
4591
|
+
# Configuration class for the NetworkServices REST API.
|
4592
|
+
#
|
4593
|
+
# This class represents the configuration for NetworkServices REST,
|
4594
|
+
# providing control over timeouts, retry behavior, logging, transport
|
4595
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
4596
|
+
# applied individually to specific RPCs. See
|
4597
|
+
# {::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client::Configuration::Rpcs}
|
4598
|
+
# for a list of RPCs that can be configured independently.
|
4599
|
+
#
|
4600
|
+
# Configuration can be applied globally to all clients, or to a single client
|
4601
|
+
# on construction.
|
4602
|
+
#
|
4603
|
+
# @example
|
4604
|
+
#
|
4605
|
+
# # Modify the global config, setting the timeout for
|
4606
|
+
# # list_endpoint_policies to 20 seconds,
|
4607
|
+
# # and all remaining timeouts to 10 seconds.
|
4608
|
+
# ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.configure do |config|
|
4609
|
+
# config.timeout = 10.0
|
4610
|
+
# config.rpcs.list_endpoint_policies.timeout = 20.0
|
4611
|
+
# end
|
4612
|
+
#
|
4613
|
+
# # Apply the above configuration only to a new client.
|
4614
|
+
# client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config|
|
4615
|
+
# config.timeout = 10.0
|
4616
|
+
# config.rpcs.list_endpoint_policies.timeout = 20.0
|
4617
|
+
# end
|
4618
|
+
#
|
4619
|
+
# @!attribute [rw] endpoint
|
4620
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
4621
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
4622
|
+
# @return [::String,nil]
|
4623
|
+
# @!attribute [rw] credentials
|
4624
|
+
# Credentials to send with calls. You may provide any of the following types:
|
4625
|
+
# * (`String`) The path to a service account key file in JSON format
|
4626
|
+
# * (`Hash`) A service account key as a Hash
|
4627
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
4628
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
4629
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
4630
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
4631
|
+
# * (`nil`) indicating no credentials
|
4632
|
+
#
|
4633
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
4634
|
+
# external source for authentication to Google Cloud, you must validate it before
|
4635
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
4636
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
4637
|
+
# For more information, refer to [Validate credential configurations from external
|
4638
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
4639
|
+
# @return [::Object]
|
4640
|
+
# @!attribute [rw] scope
|
4641
|
+
# The OAuth scopes
|
4642
|
+
# @return [::Array<::String>]
|
4643
|
+
# @!attribute [rw] lib_name
|
4644
|
+
# The library name as recorded in instrumentation and logging
|
4645
|
+
# @return [::String]
|
4646
|
+
# @!attribute [rw] lib_version
|
4647
|
+
# The library version as recorded in instrumentation and logging
|
4648
|
+
# @return [::String]
|
4649
|
+
# @!attribute [rw] timeout
|
4650
|
+
# The call timeout in seconds.
|
4651
|
+
# @return [::Numeric]
|
4652
|
+
# @!attribute [rw] metadata
|
4653
|
+
# Additional headers to be sent with the call.
|
4654
|
+
# @return [::Hash{::Symbol=>::String}]
|
4655
|
+
# @!attribute [rw] retry_policy
|
4656
|
+
# The retry policy. The value is a hash with the following keys:
|
4657
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
4658
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
4659
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
4660
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
4661
|
+
# trigger a retry.
|
4662
|
+
# @return [::Hash]
|
4663
|
+
# @!attribute [rw] quota_project
|
4664
|
+
# A separate project against which to charge quota.
|
4665
|
+
# @return [::String]
|
4666
|
+
# @!attribute [rw] universe_domain
|
4667
|
+
# The universe domain within which to make requests. This determines the
|
4668
|
+
# default endpoint URL. The default value of nil uses the environment
|
4669
|
+
# universe (usually the default "googleapis.com" universe).
|
4670
|
+
# @return [::String,nil]
|
4671
|
+
# @!attribute [rw] logger
|
4672
|
+
# A custom logger to use for request/response debug logging, or the value
|
4673
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
4674
|
+
# explicitly disable logging.
|
4675
|
+
# @return [::Logger,:default,nil]
|
4676
|
+
#
|
4677
|
+
class Configuration
|
4678
|
+
extend ::Gapic::Config
|
4679
|
+
|
4680
|
+
# @private
|
4681
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
4682
|
+
DEFAULT_ENDPOINT = "networkservices.googleapis.com"
|
4683
|
+
|
4684
|
+
config_attr :endpoint, nil, ::String, nil
|
4685
|
+
config_attr :credentials, nil do |value|
|
4686
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
4687
|
+
allowed.any? { |klass| klass === value }
|
4688
|
+
end
|
4689
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
4690
|
+
config_attr :lib_name, nil, ::String, nil
|
4691
|
+
config_attr :lib_version, nil, ::String, nil
|
4692
|
+
config_attr :timeout, nil, ::Numeric, nil
|
4693
|
+
config_attr :metadata, nil, ::Hash, nil
|
4694
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
4695
|
+
config_attr :quota_project, nil, ::String, nil
|
4696
|
+
config_attr :universe_domain, nil, ::String, nil
|
4697
|
+
|
4698
|
+
# @private
|
4699
|
+
# Overrides for http bindings for the RPCs of this service
|
4700
|
+
# are only used when this service is used as mixin, and only
|
4701
|
+
# by the host service.
|
4702
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
4703
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
4704
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
4705
|
+
|
4706
|
+
# @private
|
4707
|
+
def initialize parent_config = nil
|
4708
|
+
@parent_config = parent_config unless parent_config.nil?
|
4709
|
+
|
4710
|
+
yield self if block_given?
|
4711
|
+
end
|
4712
|
+
|
4713
|
+
##
|
4714
|
+
# Configurations for individual RPCs
|
4715
|
+
# @return [Rpcs]
|
4716
|
+
#
|
4717
|
+
def rpcs
|
4718
|
+
@rpcs ||= begin
|
4719
|
+
parent_rpcs = nil
|
4720
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
4721
|
+
Rpcs.new parent_rpcs
|
4722
|
+
end
|
4723
|
+
end
|
4724
|
+
|
4725
|
+
##
|
4726
|
+
# Configuration RPC class for the NetworkServices API.
|
4727
|
+
#
|
4728
|
+
# Includes fields providing the configuration for each RPC in this service.
|
4729
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
4730
|
+
# the following configuration fields:
|
4731
|
+
#
|
4732
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
4733
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
3826
4734
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
3827
4735
|
# include the following keys:
|
3828
4736
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -3998,6 +4906,11 @@ module Google
|
|
3998
4906
|
#
|
3999
4907
|
attr_reader :create_service_binding
|
4000
4908
|
##
|
4909
|
+
# RPC-specific configuration for `update_service_binding`
|
4910
|
+
# @return [::Gapic::Config::Method]
|
4911
|
+
#
|
4912
|
+
attr_reader :update_service_binding
|
4913
|
+
##
|
4001
4914
|
# RPC-specific configuration for `delete_service_binding`
|
4002
4915
|
# @return [::Gapic::Config::Method]
|
4003
4916
|
#
|
@@ -4027,6 +4940,51 @@ module Google
|
|
4027
4940
|
# @return [::Gapic::Config::Method]
|
4028
4941
|
#
|
4029
4942
|
attr_reader :delete_mesh
|
4943
|
+
##
|
4944
|
+
# RPC-specific configuration for `list_service_lb_policies`
|
4945
|
+
# @return [::Gapic::Config::Method]
|
4946
|
+
#
|
4947
|
+
attr_reader :list_service_lb_policies
|
4948
|
+
##
|
4949
|
+
# RPC-specific configuration for `get_service_lb_policy`
|
4950
|
+
# @return [::Gapic::Config::Method]
|
4951
|
+
#
|
4952
|
+
attr_reader :get_service_lb_policy
|
4953
|
+
##
|
4954
|
+
# RPC-specific configuration for `create_service_lb_policy`
|
4955
|
+
# @return [::Gapic::Config::Method]
|
4956
|
+
#
|
4957
|
+
attr_reader :create_service_lb_policy
|
4958
|
+
##
|
4959
|
+
# RPC-specific configuration for `update_service_lb_policy`
|
4960
|
+
# @return [::Gapic::Config::Method]
|
4961
|
+
#
|
4962
|
+
attr_reader :update_service_lb_policy
|
4963
|
+
##
|
4964
|
+
# RPC-specific configuration for `delete_service_lb_policy`
|
4965
|
+
# @return [::Gapic::Config::Method]
|
4966
|
+
#
|
4967
|
+
attr_reader :delete_service_lb_policy
|
4968
|
+
##
|
4969
|
+
# RPC-specific configuration for `get_gateway_route_view`
|
4970
|
+
# @return [::Gapic::Config::Method]
|
4971
|
+
#
|
4972
|
+
attr_reader :get_gateway_route_view
|
4973
|
+
##
|
4974
|
+
# RPC-specific configuration for `get_mesh_route_view`
|
4975
|
+
# @return [::Gapic::Config::Method]
|
4976
|
+
#
|
4977
|
+
attr_reader :get_mesh_route_view
|
4978
|
+
##
|
4979
|
+
# RPC-specific configuration for `list_gateway_route_views`
|
4980
|
+
# @return [::Gapic::Config::Method]
|
4981
|
+
#
|
4982
|
+
attr_reader :list_gateway_route_views
|
4983
|
+
##
|
4984
|
+
# RPC-specific configuration for `list_mesh_route_views`
|
4985
|
+
# @return [::Gapic::Config::Method]
|
4986
|
+
#
|
4987
|
+
attr_reader :list_mesh_route_views
|
4030
4988
|
|
4031
4989
|
# @private
|
4032
4990
|
def initialize parent_rpcs = nil
|
@@ -4096,6 +5054,8 @@ module Google
|
|
4096
5054
|
@get_service_binding = ::Gapic::Config::Method.new get_service_binding_config
|
4097
5055
|
create_service_binding_config = parent_rpcs.create_service_binding if parent_rpcs.respond_to? :create_service_binding
|
4098
5056
|
@create_service_binding = ::Gapic::Config::Method.new create_service_binding_config
|
5057
|
+
update_service_binding_config = parent_rpcs.update_service_binding if parent_rpcs.respond_to? :update_service_binding
|
5058
|
+
@update_service_binding = ::Gapic::Config::Method.new update_service_binding_config
|
4099
5059
|
delete_service_binding_config = parent_rpcs.delete_service_binding if parent_rpcs.respond_to? :delete_service_binding
|
4100
5060
|
@delete_service_binding = ::Gapic::Config::Method.new delete_service_binding_config
|
4101
5061
|
list_meshes_config = parent_rpcs.list_meshes if parent_rpcs.respond_to? :list_meshes
|
@@ -4108,6 +5068,24 @@ module Google
|
|
4108
5068
|
@update_mesh = ::Gapic::Config::Method.new update_mesh_config
|
4109
5069
|
delete_mesh_config = parent_rpcs.delete_mesh if parent_rpcs.respond_to? :delete_mesh
|
4110
5070
|
@delete_mesh = ::Gapic::Config::Method.new delete_mesh_config
|
5071
|
+
list_service_lb_policies_config = parent_rpcs.list_service_lb_policies if parent_rpcs.respond_to? :list_service_lb_policies
|
5072
|
+
@list_service_lb_policies = ::Gapic::Config::Method.new list_service_lb_policies_config
|
5073
|
+
get_service_lb_policy_config = parent_rpcs.get_service_lb_policy if parent_rpcs.respond_to? :get_service_lb_policy
|
5074
|
+
@get_service_lb_policy = ::Gapic::Config::Method.new get_service_lb_policy_config
|
5075
|
+
create_service_lb_policy_config = parent_rpcs.create_service_lb_policy if parent_rpcs.respond_to? :create_service_lb_policy
|
5076
|
+
@create_service_lb_policy = ::Gapic::Config::Method.new create_service_lb_policy_config
|
5077
|
+
update_service_lb_policy_config = parent_rpcs.update_service_lb_policy if parent_rpcs.respond_to? :update_service_lb_policy
|
5078
|
+
@update_service_lb_policy = ::Gapic::Config::Method.new update_service_lb_policy_config
|
5079
|
+
delete_service_lb_policy_config = parent_rpcs.delete_service_lb_policy if parent_rpcs.respond_to? :delete_service_lb_policy
|
5080
|
+
@delete_service_lb_policy = ::Gapic::Config::Method.new delete_service_lb_policy_config
|
5081
|
+
get_gateway_route_view_config = parent_rpcs.get_gateway_route_view if parent_rpcs.respond_to? :get_gateway_route_view
|
5082
|
+
@get_gateway_route_view = ::Gapic::Config::Method.new get_gateway_route_view_config
|
5083
|
+
get_mesh_route_view_config = parent_rpcs.get_mesh_route_view if parent_rpcs.respond_to? :get_mesh_route_view
|
5084
|
+
@get_mesh_route_view = ::Gapic::Config::Method.new get_mesh_route_view_config
|
5085
|
+
list_gateway_route_views_config = parent_rpcs.list_gateway_route_views if parent_rpcs.respond_to? :list_gateway_route_views
|
5086
|
+
@list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config
|
5087
|
+
list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views
|
5088
|
+
@list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config
|
4111
5089
|
|
4112
5090
|
yield self if block_given?
|
4113
5091
|
end
|