google-cloud-service_directory-v1beta1 0.6.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb +83 -59
- data/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb +583 -195
- data/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb +17 -0
- data/lib/google/cloud/service_directory/v1beta1/version.rb +1 -1
- data/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb +6 -2
- data/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb +2 -2
- data/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb +5 -2
- data/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb +2 -2
- data/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb +6 -6
- data/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb +5 -2
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb +48 -12
- data/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb +29 -14
- data/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb +9 -3
- data/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb +115 -77
- data/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb +35 -6
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +5 -4
@@ -55,13 +55,12 @@ module Google
|
|
55
55
|
# See {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client::Configuration}
|
56
56
|
# for a description of the configuration fields.
|
57
57
|
#
|
58
|
-
#
|
58
|
+
# @example
|
59
59
|
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
# end
|
60
|
+
# # Modify the configuration for all RegistrationService clients
|
61
|
+
# ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.configure do |config|
|
62
|
+
# config.timeout = 10.0
|
63
|
+
# end
|
65
64
|
#
|
66
65
|
# @yield [config] Configure the Client client.
|
67
66
|
# @yieldparam config [Client::Configuration]
|
@@ -81,10 +80,7 @@ module Google
|
|
81
80
|
|
82
81
|
default_config.timeout = 15.0
|
83
82
|
default_config.retry_policy = {
|
84
|
-
initial_delay: 1.0,
|
85
|
-
max_delay: 60.0,
|
86
|
-
multiplier: 1.3,
|
87
|
-
retry_codes: [14, 2]
|
83
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
|
88
84
|
}
|
89
85
|
|
90
86
|
default_config
|
@@ -116,19 +112,15 @@ module Google
|
|
116
112
|
##
|
117
113
|
# Create a new RegistrationService client object.
|
118
114
|
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
# To create a new RegistrationService client with the default
|
122
|
-
# configuration:
|
123
|
-
#
|
124
|
-
# client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
115
|
+
# @example
|
125
116
|
#
|
126
|
-
#
|
127
|
-
#
|
117
|
+
# # Create a client using the default configuration
|
118
|
+
# client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
128
119
|
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
120
|
+
# # Create a client using a custom configuration
|
121
|
+
# client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config|
|
122
|
+
# config.timeout = 10.0
|
123
|
+
# end
|
132
124
|
#
|
133
125
|
# @yield [config] Configure the RegistrationService client.
|
134
126
|
# @yieldparam config [Client::Configuration]
|
@@ -148,14 +140,13 @@ module Google
|
|
148
140
|
|
149
141
|
# Create credentials
|
150
142
|
credentials = @config.credentials
|
151
|
-
# Use self-signed JWT if the
|
143
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
152
144
|
# but only if the default endpoint does not have a region prefix.
|
153
|
-
enable_self_signed_jwt = @config.
|
154
|
-
@config.endpoint == Client.configure.endpoint &&
|
145
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
155
146
|
!@config.endpoint.split(".").first.include?("-")
|
156
147
|
credentials ||= Credentials.default scope: @config.scope,
|
157
148
|
enable_self_signed_jwt: enable_self_signed_jwt
|
158
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
149
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
159
150
|
credentials = Credentials.new credentials, scope: @config.scope
|
160
151
|
end
|
161
152
|
@quota_project_id = @config.quota_project
|
@@ -173,7 +164,7 @@ module Google
|
|
173
164
|
# Service calls
|
174
165
|
|
175
166
|
##
|
176
|
-
# Creates a namespace, and returns the new
|
167
|
+
# Creates a namespace, and returns the new namespace.
|
177
168
|
#
|
178
169
|
# @overload create_namespace(request, options = nil)
|
179
170
|
# Pass arguments to `create_namespace` via a request object, either of type
|
@@ -212,6 +203,21 @@ module Google
|
|
212
203
|
#
|
213
204
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
214
205
|
#
|
206
|
+
# @example Basic example
|
207
|
+
# require "google/cloud/service_directory/v1beta1"
|
208
|
+
#
|
209
|
+
# # Create a client object. The client can be reused for multiple calls.
|
210
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
211
|
+
#
|
212
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
213
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new
|
214
|
+
#
|
215
|
+
# # Call the create_namespace method.
|
216
|
+
# result = client.create_namespace request
|
217
|
+
#
|
218
|
+
# # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace.
|
219
|
+
# p result
|
220
|
+
#
|
215
221
|
def create_namespace request, options = nil
|
216
222
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
217
223
|
|
@@ -229,16 +235,20 @@ module Google
|
|
229
235
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
230
236
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
231
237
|
|
232
|
-
header_params = {
|
233
|
-
|
234
|
-
|
238
|
+
header_params = {}
|
239
|
+
if request.parent
|
240
|
+
header_params["parent"] = request.parent
|
241
|
+
end
|
242
|
+
|
235
243
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
236
244
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
237
245
|
|
238
246
|
options.apply_defaults timeout: @config.rpcs.create_namespace.timeout,
|
239
247
|
metadata: metadata,
|
240
248
|
retry_policy: @config.rpcs.create_namespace.retry_policy
|
241
|
-
|
249
|
+
|
250
|
+
options.apply_defaults timeout: @config.timeout,
|
251
|
+
metadata: @config.metadata,
|
242
252
|
retry_policy: @config.retry_policy
|
243
253
|
|
244
254
|
@registration_service_stub.call_rpc :create_namespace, request, options: options do |response, operation|
|
@@ -268,46 +278,51 @@ module Google
|
|
268
278
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
269
279
|
#
|
270
280
|
# @param parent [::String]
|
271
|
-
# Required. The resource name of the project and location whose namespaces
|
272
|
-
# list.
|
281
|
+
# Required. The resource name of the project and location whose namespaces you'd like
|
282
|
+
# to list.
|
273
283
|
# @param page_size [::Integer]
|
274
284
|
# Optional. The maximum number of items to return.
|
275
285
|
# @param page_token [::String]
|
276
286
|
# Optional. The next_page_token value returned from a previous List request, if any.
|
277
287
|
# @param filter [::String]
|
278
|
-
# Optional. The filter to list
|
288
|
+
# Optional. The filter to list results by.
|
289
|
+
#
|
290
|
+
# General `filter` string syntax:
|
291
|
+
# `<field> <operator> <value> (<logical connector>)`
|
279
292
|
#
|
280
|
-
#
|
281
|
-
#
|
282
|
-
#
|
283
|
-
#
|
284
|
-
#
|
285
|
-
# <value> must be the same data type as field.
|
286
|
-
# <logical connector> can be "AND, OR, NOT".
|
293
|
+
# * `<field>` can be `name` or `labels.<key>` for map field
|
294
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
295
|
+
# means `HAS`, and is roughly the same as `=`
|
296
|
+
# * `<value>` must be the same data type as field
|
297
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
287
298
|
#
|
288
299
|
# Examples of valid filters:
|
289
|
-
#
|
290
|
-
#
|
291
|
-
#
|
292
|
-
#
|
293
|
-
# *
|
294
|
-
#
|
295
|
-
#
|
296
|
-
# *
|
297
|
-
#
|
298
|
-
# *
|
299
|
-
#
|
300
|
-
#
|
300
|
+
#
|
301
|
+
# * `labels.owner` returns namespaces that have a label with the key
|
302
|
+
# `owner`, this is the same as `labels:owner`
|
303
|
+
# * `labels.owner=sd` returns namespaces that have key/value `owner=sd`
|
304
|
+
# * `name>projects/my-project/locations/us-east1/namespaces/namespace-c`
|
305
|
+
# returns namespaces that have name that is alphabetically later than the
|
306
|
+
# string, so "namespace-e" is returned but "namespace-a" is not
|
307
|
+
# * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have
|
308
|
+
# `owner` in label key but value is not `sd` AND have key/value `foo=bar`
|
309
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that namespace
|
310
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
311
|
+
# match any namespaces, it returns no results
|
312
|
+
#
|
313
|
+
# For more information about filtering, see
|
314
|
+
# [API Filtering](https://aip.dev/160).
|
301
315
|
# @param order_by [::String]
|
302
|
-
# Optional. The order to list
|
316
|
+
# Optional. The order to list results by.
|
317
|
+
#
|
318
|
+
# General `order_by` string syntax: `<field> (<asc|desc>) (,)`
|
319
|
+
#
|
320
|
+
# * `<field>` allows value: `name`
|
321
|
+
# * `<asc|desc>` ascending or descending order by `<field>`. If this is
|
322
|
+
# left blank, `asc` is used
|
303
323
|
#
|
304
|
-
#
|
305
|
-
#
|
306
|
-
# <field> allows values \\{"name"}
|
307
|
-
# <asc/desc> ascending or descending order by <field>. If this is left
|
308
|
-
# blank, "asc" is used.
|
309
|
-
# Note that an empty order_by string result in default order, which is order
|
310
|
-
# by name in ascending order.
|
324
|
+
# Note that an empty `order_by` string results in default order, which is
|
325
|
+
# order by `name` in ascending order.
|
311
326
|
#
|
312
327
|
# @yield [response, operation] Access the result along with the RPC operation
|
313
328
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>]
|
@@ -317,6 +332,27 @@ module Google
|
|
317
332
|
#
|
318
333
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
319
334
|
#
|
335
|
+
# @example Basic example
|
336
|
+
# require "google/cloud/service_directory/v1beta1"
|
337
|
+
#
|
338
|
+
# # Create a client object. The client can be reused for multiple calls.
|
339
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
340
|
+
#
|
341
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
342
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new
|
343
|
+
#
|
344
|
+
# # Call the list_namespaces method.
|
345
|
+
# result = client.list_namespaces request
|
346
|
+
#
|
347
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
348
|
+
# # iterate over all elements by calling #each, and the enumerable
|
349
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
350
|
+
# # methods are also available for managing paging directly.
|
351
|
+
# result.each do |response|
|
352
|
+
# # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.
|
353
|
+
# p response
|
354
|
+
# end
|
355
|
+
#
|
320
356
|
def list_namespaces request, options = nil
|
321
357
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
322
358
|
|
@@ -334,16 +370,20 @@ module Google
|
|
334
370
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
335
371
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
336
372
|
|
337
|
-
header_params = {
|
338
|
-
|
339
|
-
|
373
|
+
header_params = {}
|
374
|
+
if request.parent
|
375
|
+
header_params["parent"] = request.parent
|
376
|
+
end
|
377
|
+
|
340
378
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
341
379
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
342
380
|
|
343
381
|
options.apply_defaults timeout: @config.rpcs.list_namespaces.timeout,
|
344
382
|
metadata: metadata,
|
345
383
|
retry_policy: @config.rpcs.list_namespaces.retry_policy
|
346
|
-
|
384
|
+
|
385
|
+
options.apply_defaults timeout: @config.timeout,
|
386
|
+
metadata: @config.metadata,
|
347
387
|
retry_policy: @config.retry_policy
|
348
388
|
|
349
389
|
@registration_service_stub.call_rpc :list_namespaces, request, options: options do |response, operation|
|
@@ -384,6 +424,21 @@ module Google
|
|
384
424
|
#
|
385
425
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
386
426
|
#
|
427
|
+
# @example Basic example
|
428
|
+
# require "google/cloud/service_directory/v1beta1"
|
429
|
+
#
|
430
|
+
# # Create a client object. The client can be reused for multiple calls.
|
431
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
432
|
+
#
|
433
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
434
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new
|
435
|
+
#
|
436
|
+
# # Call the get_namespace method.
|
437
|
+
# result = client.get_namespace request
|
438
|
+
#
|
439
|
+
# # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace.
|
440
|
+
# p result
|
441
|
+
#
|
387
442
|
def get_namespace request, options = nil
|
388
443
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
389
444
|
|
@@ -401,16 +456,20 @@ module Google
|
|
401
456
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
402
457
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
403
458
|
|
404
|
-
header_params = {
|
405
|
-
|
406
|
-
|
459
|
+
header_params = {}
|
460
|
+
if request.name
|
461
|
+
header_params["name"] = request.name
|
462
|
+
end
|
463
|
+
|
407
464
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
408
465
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
409
466
|
|
410
467
|
options.apply_defaults timeout: @config.rpcs.get_namespace.timeout,
|
411
468
|
metadata: metadata,
|
412
469
|
retry_policy: @config.rpcs.get_namespace.retry_policy
|
413
|
-
|
470
|
+
|
471
|
+
options.apply_defaults timeout: @config.timeout,
|
472
|
+
metadata: @config.metadata,
|
414
473
|
retry_policy: @config.retry_policy
|
415
474
|
|
416
475
|
@registration_service_stub.call_rpc :get_namespace, request, options: options do |response, operation|
|
@@ -452,6 +511,21 @@ module Google
|
|
452
511
|
#
|
453
512
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
454
513
|
#
|
514
|
+
# @example Basic example
|
515
|
+
# require "google/cloud/service_directory/v1beta1"
|
516
|
+
#
|
517
|
+
# # Create a client object. The client can be reused for multiple calls.
|
518
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
519
|
+
#
|
520
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
521
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new
|
522
|
+
#
|
523
|
+
# # Call the update_namespace method.
|
524
|
+
# result = client.update_namespace request
|
525
|
+
#
|
526
|
+
# # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace.
|
527
|
+
# p result
|
528
|
+
#
|
455
529
|
def update_namespace request, options = nil
|
456
530
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
457
531
|
|
@@ -469,16 +543,20 @@ module Google
|
|
469
543
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
470
544
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
471
545
|
|
472
|
-
header_params = {
|
473
|
-
|
474
|
-
|
546
|
+
header_params = {}
|
547
|
+
if request.namespace&.name
|
548
|
+
header_params["namespace.name"] = request.namespace.name
|
549
|
+
end
|
550
|
+
|
475
551
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
476
552
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
477
553
|
|
478
554
|
options.apply_defaults timeout: @config.rpcs.update_namespace.timeout,
|
479
555
|
metadata: metadata,
|
480
556
|
retry_policy: @config.rpcs.update_namespace.retry_policy
|
481
|
-
|
557
|
+
|
558
|
+
options.apply_defaults timeout: @config.timeout,
|
559
|
+
metadata: @config.metadata,
|
482
560
|
retry_policy: @config.retry_policy
|
483
561
|
|
484
562
|
@registration_service_stub.call_rpc :update_namespace, request, options: options do |response, operation|
|
@@ -519,6 +597,21 @@ module Google
|
|
519
597
|
#
|
520
598
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
521
599
|
#
|
600
|
+
# @example Basic example
|
601
|
+
# require "google/cloud/service_directory/v1beta1"
|
602
|
+
#
|
603
|
+
# # Create a client object. The client can be reused for multiple calls.
|
604
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
605
|
+
#
|
606
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
607
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new
|
608
|
+
#
|
609
|
+
# # Call the delete_namespace method.
|
610
|
+
# result = client.delete_namespace request
|
611
|
+
#
|
612
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
613
|
+
# p result
|
614
|
+
#
|
522
615
|
def delete_namespace request, options = nil
|
523
616
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
524
617
|
|
@@ -536,16 +629,20 @@ module Google
|
|
536
629
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
537
630
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
538
631
|
|
539
|
-
header_params = {
|
540
|
-
|
541
|
-
|
632
|
+
header_params = {}
|
633
|
+
if request.name
|
634
|
+
header_params["name"] = request.name
|
635
|
+
end
|
636
|
+
|
542
637
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
543
638
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
544
639
|
|
545
640
|
options.apply_defaults timeout: @config.rpcs.delete_namespace.timeout,
|
546
641
|
metadata: metadata,
|
547
642
|
retry_policy: @config.rpcs.delete_namespace.retry_policy
|
548
|
-
|
643
|
+
|
644
|
+
options.apply_defaults timeout: @config.timeout,
|
645
|
+
metadata: @config.metadata,
|
549
646
|
retry_policy: @config.retry_policy
|
550
647
|
|
551
648
|
@registration_service_stub.call_rpc :delete_namespace, request, options: options do |response, operation|
|
@@ -557,7 +654,7 @@ module Google
|
|
557
654
|
end
|
558
655
|
|
559
656
|
##
|
560
|
-
# Creates a service, and returns the new
|
657
|
+
# Creates a service, and returns the new service.
|
561
658
|
#
|
562
659
|
# @overload create_service(request, options = nil)
|
563
660
|
# Pass arguments to `create_service` via a request object, either of type
|
@@ -595,6 +692,21 @@ module Google
|
|
595
692
|
#
|
596
693
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
597
694
|
#
|
695
|
+
# @example Basic example
|
696
|
+
# require "google/cloud/service_directory/v1beta1"
|
697
|
+
#
|
698
|
+
# # Create a client object. The client can be reused for multiple calls.
|
699
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
700
|
+
#
|
701
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
702
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new
|
703
|
+
#
|
704
|
+
# # Call the create_service method.
|
705
|
+
# result = client.create_service request
|
706
|
+
#
|
707
|
+
# # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service.
|
708
|
+
# p result
|
709
|
+
#
|
598
710
|
def create_service request, options = nil
|
599
711
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
600
712
|
|
@@ -612,16 +724,20 @@ module Google
|
|
612
724
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
613
725
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
614
726
|
|
615
|
-
header_params = {
|
616
|
-
|
617
|
-
|
727
|
+
header_params = {}
|
728
|
+
if request.parent
|
729
|
+
header_params["parent"] = request.parent
|
730
|
+
end
|
731
|
+
|
618
732
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
619
733
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
620
734
|
|
621
735
|
options.apply_defaults timeout: @config.rpcs.create_service.timeout,
|
622
736
|
metadata: metadata,
|
623
737
|
retry_policy: @config.rpcs.create_service.retry_policy
|
624
|
-
|
738
|
+
|
739
|
+
options.apply_defaults timeout: @config.timeout,
|
740
|
+
metadata: @config.metadata,
|
625
741
|
retry_policy: @config.retry_policy
|
626
742
|
|
627
743
|
@registration_service_stub.call_rpc :create_service, request, options: options do |response, operation|
|
@@ -651,7 +767,7 @@ module Google
|
|
651
767
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
652
768
|
#
|
653
769
|
# @param parent [::String]
|
654
|
-
# Required. The resource name of the namespace whose services
|
770
|
+
# Required. The resource name of the namespace whose services you'd
|
655
771
|
# like to list.
|
656
772
|
# @param page_size [::Integer]
|
657
773
|
# Optional. The maximum number of items to return.
|
@@ -659,31 +775,47 @@ module Google
|
|
659
775
|
# Optional. The next_page_token value returned from a previous List request,
|
660
776
|
# if any.
|
661
777
|
# @param filter [::String]
|
662
|
-
# Optional. The filter to list
|
778
|
+
# Optional. The filter to list results by.
|
663
779
|
#
|
664
|
-
# General filter string syntax:
|
665
|
-
#
|
666
|
-
#
|
667
|
-
#
|
668
|
-
#
|
669
|
-
#
|
670
|
-
#
|
780
|
+
# General `filter` string syntax:
|
781
|
+
# `<field> <operator> <value> (<logical connector>)`
|
782
|
+
#
|
783
|
+
# * `<field>` can be `name` or `metadata.<key>` for map field
|
784
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
785
|
+
# means `HAS`, and is roughly the same as `=`
|
786
|
+
# * `<value>` must be the same data type as field
|
787
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
671
788
|
#
|
672
789
|
# Examples of valid filters:
|
673
|
-
#
|
674
|
-
#
|
675
|
-
#
|
676
|
-
#
|
677
|
-
#
|
678
|
-
#
|
679
|
-
#
|
680
|
-
#
|
681
|
-
#
|
682
|
-
# *
|
683
|
-
#
|
684
|
-
#
|
790
|
+
#
|
791
|
+
# * `metadata.owner` returns services that have a metadata with the key
|
792
|
+
# `owner`, this is the same as `metadata:owner`
|
793
|
+
# * `metadata.protocol=gRPC` returns services that have key/value
|
794
|
+
# `protocol=gRPC`
|
795
|
+
# *
|
796
|
+
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c`
|
797
|
+
# returns services that have name that is alphabetically later than the
|
798
|
+
# string, so "service-e" is returned but "service-a" is not
|
799
|
+
# * `metadata.owner!=sd AND metadata.foo=bar` returns services that have
|
800
|
+
# `owner` in metadata key but value is not `sd` AND have key/value
|
801
|
+
# `foo=bar`
|
802
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that service
|
803
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
804
|
+
# match any services, it returns no results
|
805
|
+
#
|
806
|
+
# For more information about filtering, see
|
807
|
+
# [API Filtering](https://aip.dev/160).
|
685
808
|
# @param order_by [::String]
|
686
|
-
# Optional. The order to list
|
809
|
+
# Optional. The order to list results by.
|
810
|
+
#
|
811
|
+
# General `order_by` string syntax: `<field> (<asc|desc>) (,)`
|
812
|
+
#
|
813
|
+
# * `<field>` allows value: `name`
|
814
|
+
# * `<asc|desc>` ascending or descending order by `<field>`. If this is
|
815
|
+
# left blank, `asc` is used
|
816
|
+
#
|
817
|
+
# Note that an empty `order_by` string results in default order, which is
|
818
|
+
# order by `name` in ascending order.
|
687
819
|
#
|
688
820
|
# @yield [response, operation] Access the result along with the RPC operation
|
689
821
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>]
|
@@ -693,6 +825,27 @@ module Google
|
|
693
825
|
#
|
694
826
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
695
827
|
#
|
828
|
+
# @example Basic example
|
829
|
+
# require "google/cloud/service_directory/v1beta1"
|
830
|
+
#
|
831
|
+
# # Create a client object. The client can be reused for multiple calls.
|
832
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
833
|
+
#
|
834
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
835
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new
|
836
|
+
#
|
837
|
+
# # Call the list_services method.
|
838
|
+
# result = client.list_services request
|
839
|
+
#
|
840
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
841
|
+
# # iterate over all elements by calling #each, and the enumerable
|
842
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
843
|
+
# # methods are also available for managing paging directly.
|
844
|
+
# result.each do |response|
|
845
|
+
# # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Service.
|
846
|
+
# p response
|
847
|
+
# end
|
848
|
+
#
|
696
849
|
def list_services request, options = nil
|
697
850
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
698
851
|
|
@@ -710,16 +863,20 @@ module Google
|
|
710
863
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
711
864
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
712
865
|
|
713
|
-
header_params = {
|
714
|
-
|
715
|
-
|
866
|
+
header_params = {}
|
867
|
+
if request.parent
|
868
|
+
header_params["parent"] = request.parent
|
869
|
+
end
|
870
|
+
|
716
871
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
717
872
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
718
873
|
|
719
874
|
options.apply_defaults timeout: @config.rpcs.list_services.timeout,
|
720
875
|
metadata: metadata,
|
721
876
|
retry_policy: @config.rpcs.list_services.retry_policy
|
722
|
-
|
877
|
+
|
878
|
+
options.apply_defaults timeout: @config.timeout,
|
879
|
+
metadata: @config.metadata,
|
723
880
|
retry_policy: @config.retry_policy
|
724
881
|
|
725
882
|
@registration_service_stub.call_rpc :list_services, request, options: options do |response, operation|
|
@@ -760,6 +917,21 @@ module Google
|
|
760
917
|
#
|
761
918
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
762
919
|
#
|
920
|
+
# @example Basic example
|
921
|
+
# require "google/cloud/service_directory/v1beta1"
|
922
|
+
#
|
923
|
+
# # Create a client object. The client can be reused for multiple calls.
|
924
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
925
|
+
#
|
926
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
927
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new
|
928
|
+
#
|
929
|
+
# # Call the get_service method.
|
930
|
+
# result = client.get_service request
|
931
|
+
#
|
932
|
+
# # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service.
|
933
|
+
# p result
|
934
|
+
#
|
763
935
|
def get_service request, options = nil
|
764
936
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
765
937
|
|
@@ -777,16 +949,20 @@ module Google
|
|
777
949
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
778
950
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
779
951
|
|
780
|
-
header_params = {
|
781
|
-
|
782
|
-
|
952
|
+
header_params = {}
|
953
|
+
if request.name
|
954
|
+
header_params["name"] = request.name
|
955
|
+
end
|
956
|
+
|
783
957
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
784
958
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
785
959
|
|
786
960
|
options.apply_defaults timeout: @config.rpcs.get_service.timeout,
|
787
961
|
metadata: metadata,
|
788
962
|
retry_policy: @config.rpcs.get_service.retry_policy
|
789
|
-
|
963
|
+
|
964
|
+
options.apply_defaults timeout: @config.timeout,
|
965
|
+
metadata: @config.metadata,
|
790
966
|
retry_policy: @config.retry_policy
|
791
967
|
|
792
968
|
@registration_service_stub.call_rpc :get_service, request, options: options do |response, operation|
|
@@ -828,6 +1004,21 @@ module Google
|
|
828
1004
|
#
|
829
1005
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
830
1006
|
#
|
1007
|
+
# @example Basic example
|
1008
|
+
# require "google/cloud/service_directory/v1beta1"
|
1009
|
+
#
|
1010
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1011
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1012
|
+
#
|
1013
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1014
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new
|
1015
|
+
#
|
1016
|
+
# # Call the update_service method.
|
1017
|
+
# result = client.update_service request
|
1018
|
+
#
|
1019
|
+
# # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service.
|
1020
|
+
# p result
|
1021
|
+
#
|
831
1022
|
def update_service request, options = nil
|
832
1023
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
833
1024
|
|
@@ -845,16 +1036,20 @@ module Google
|
|
845
1036
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
846
1037
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
847
1038
|
|
848
|
-
header_params = {
|
849
|
-
|
850
|
-
|
1039
|
+
header_params = {}
|
1040
|
+
if request.service&.name
|
1041
|
+
header_params["service.name"] = request.service.name
|
1042
|
+
end
|
1043
|
+
|
851
1044
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
852
1045
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
853
1046
|
|
854
1047
|
options.apply_defaults timeout: @config.rpcs.update_service.timeout,
|
855
1048
|
metadata: metadata,
|
856
1049
|
retry_policy: @config.rpcs.update_service.retry_policy
|
857
|
-
|
1050
|
+
|
1051
|
+
options.apply_defaults timeout: @config.timeout,
|
1052
|
+
metadata: @config.metadata,
|
858
1053
|
retry_policy: @config.retry_policy
|
859
1054
|
|
860
1055
|
@registration_service_stub.call_rpc :update_service, request, options: options do |response, operation|
|
@@ -895,6 +1090,21 @@ module Google
|
|
895
1090
|
#
|
896
1091
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
897
1092
|
#
|
1093
|
+
# @example Basic example
|
1094
|
+
# require "google/cloud/service_directory/v1beta1"
|
1095
|
+
#
|
1096
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1097
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1098
|
+
#
|
1099
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1100
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new
|
1101
|
+
#
|
1102
|
+
# # Call the delete_service method.
|
1103
|
+
# result = client.delete_service request
|
1104
|
+
#
|
1105
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1106
|
+
# p result
|
1107
|
+
#
|
898
1108
|
def delete_service request, options = nil
|
899
1109
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
900
1110
|
|
@@ -912,16 +1122,20 @@ module Google
|
|
912
1122
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
913
1123
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
914
1124
|
|
915
|
-
header_params = {
|
916
|
-
|
917
|
-
|
1125
|
+
header_params = {}
|
1126
|
+
if request.name
|
1127
|
+
header_params["name"] = request.name
|
1128
|
+
end
|
1129
|
+
|
918
1130
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
919
1131
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
920
1132
|
|
921
1133
|
options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
|
922
1134
|
metadata: metadata,
|
923
1135
|
retry_policy: @config.rpcs.delete_service.retry_policy
|
924
|
-
|
1136
|
+
|
1137
|
+
options.apply_defaults timeout: @config.timeout,
|
1138
|
+
metadata: @config.metadata,
|
925
1139
|
retry_policy: @config.retry_policy
|
926
1140
|
|
927
1141
|
@registration_service_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
@@ -933,7 +1147,7 @@ module Google
|
|
933
1147
|
end
|
934
1148
|
|
935
1149
|
##
|
936
|
-
# Creates
|
1150
|
+
# Creates an endpoint, and returns the new endpoint.
|
937
1151
|
#
|
938
1152
|
# @overload create_endpoint(request, options = nil)
|
939
1153
|
# Pass arguments to `create_endpoint` via a request object, either of type
|
@@ -971,6 +1185,21 @@ module Google
|
|
971
1185
|
#
|
972
1186
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
973
1187
|
#
|
1188
|
+
# @example Basic example
|
1189
|
+
# require "google/cloud/service_directory/v1beta1"
|
1190
|
+
#
|
1191
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1192
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1193
|
+
#
|
1194
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1195
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new
|
1196
|
+
#
|
1197
|
+
# # Call the create_endpoint method.
|
1198
|
+
# result = client.create_endpoint request
|
1199
|
+
#
|
1200
|
+
# # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint.
|
1201
|
+
# p result
|
1202
|
+
#
|
974
1203
|
def create_endpoint request, options = nil
|
975
1204
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
976
1205
|
|
@@ -988,16 +1217,20 @@ module Google
|
|
988
1217
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
989
1218
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
990
1219
|
|
991
|
-
header_params = {
|
992
|
-
|
993
|
-
|
1220
|
+
header_params = {}
|
1221
|
+
if request.parent
|
1222
|
+
header_params["parent"] = request.parent
|
1223
|
+
end
|
1224
|
+
|
994
1225
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
995
1226
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
996
1227
|
|
997
1228
|
options.apply_defaults timeout: @config.rpcs.create_endpoint.timeout,
|
998
1229
|
metadata: metadata,
|
999
1230
|
retry_policy: @config.rpcs.create_endpoint.retry_policy
|
1000
|
-
|
1231
|
+
|
1232
|
+
options.apply_defaults timeout: @config.timeout,
|
1233
|
+
metadata: @config.metadata,
|
1001
1234
|
retry_policy: @config.retry_policy
|
1002
1235
|
|
1003
1236
|
@registration_service_stub.call_rpc :create_endpoint, request, options: options do |response, operation|
|
@@ -1027,7 +1260,7 @@ module Google
|
|
1027
1260
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1028
1261
|
#
|
1029
1262
|
# @param parent [::String]
|
1030
|
-
# Required. The resource name of the service whose endpoints
|
1263
|
+
# Required. The resource name of the service whose endpoints you'd like to
|
1031
1264
|
# list.
|
1032
1265
|
# @param page_size [::Integer]
|
1033
1266
|
# Optional. The maximum number of items to return.
|
@@ -1035,33 +1268,50 @@ module Google
|
|
1035
1268
|
# Optional. The next_page_token value returned from a previous List request,
|
1036
1269
|
# if any.
|
1037
1270
|
# @param filter [::String]
|
1038
|
-
# Optional. The filter to list
|
1271
|
+
# Optional. The filter to list results by.
|
1272
|
+
#
|
1273
|
+
# General `filter` string syntax:
|
1274
|
+
# `<field> <operator> <value> (<logical connector>)`
|
1039
1275
|
#
|
1040
|
-
#
|
1041
|
-
#
|
1042
|
-
#
|
1043
|
-
#
|
1044
|
-
#
|
1045
|
-
#
|
1046
|
-
# <logical connector> can be "AND, OR, NOT".
|
1276
|
+
# * `<field>` can be `name`, `address`, `port`, or `metadata.<key>` for map
|
1277
|
+
# field
|
1278
|
+
# * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:`
|
1279
|
+
# means `HAS`, and is roughly the same as `=`
|
1280
|
+
# * `<value>` must be the same data type as field
|
1281
|
+
# * `<logical connector>` can be `AND`, `OR`, `NOT`
|
1047
1282
|
#
|
1048
1283
|
# Examples of valid filters:
|
1049
|
-
#
|
1050
|
-
#
|
1051
|
-
#
|
1052
|
-
#
|
1053
|
-
#
|
1054
|
-
# *
|
1055
|
-
# *
|
1056
|
-
#
|
1057
|
-
#
|
1058
|
-
#
|
1059
|
-
#
|
1060
|
-
# *
|
1061
|
-
#
|
1062
|
-
#
|
1284
|
+
#
|
1285
|
+
# * `metadata.owner` returns endpoints that have a metadata with the key
|
1286
|
+
# `owner`, this is the same as `metadata:owner`
|
1287
|
+
# * `metadata.protocol=gRPC` returns endpoints that have key/value
|
1288
|
+
# `protocol=gRPC`
|
1289
|
+
# * `address=192.108.1.105` returns endpoints that have this address
|
1290
|
+
# * `port>8080` returns endpoints that have port number larger than 8080
|
1291
|
+
# *
|
1292
|
+
# `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c`
|
1293
|
+
# returns endpoints that have name that is alphabetically later than the
|
1294
|
+
# string, so "endpoint-e" is returned but "endpoint-a" is not
|
1295
|
+
# * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have
|
1296
|
+
# `owner` in metadata key but value is not `sd` AND have key/value
|
1297
|
+
# `foo=bar`
|
1298
|
+
# * `doesnotexist.foo=bar` returns an empty list. Note that endpoint
|
1299
|
+
# doesn't have a field called "doesnotexist". Since the filter does not
|
1300
|
+
# match any endpoints, it returns no results
|
1301
|
+
#
|
1302
|
+
# For more information about filtering, see
|
1303
|
+
# [API Filtering](https://aip.dev/160).
|
1063
1304
|
# @param order_by [::String]
|
1064
|
-
# Optional. The order to list
|
1305
|
+
# Optional. The order to list results by.
|
1306
|
+
#
|
1307
|
+
# General `order_by` string syntax: `<field> (<asc|desc>) (,)`
|
1308
|
+
#
|
1309
|
+
# * `<field>` allows values: `name`, `address`, `port`
|
1310
|
+
# * `<asc|desc>` ascending or descending order by `<field>`. If this is
|
1311
|
+
# left blank, `asc` is used
|
1312
|
+
#
|
1313
|
+
# Note that an empty `order_by` string results in default order, which is
|
1314
|
+
# order by `name` in ascending order.
|
1065
1315
|
#
|
1066
1316
|
# @yield [response, operation] Access the result along with the RPC operation
|
1067
1317
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>]
|
@@ -1071,6 +1321,27 @@ module Google
|
|
1071
1321
|
#
|
1072
1322
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1073
1323
|
#
|
1324
|
+
# @example Basic example
|
1325
|
+
# require "google/cloud/service_directory/v1beta1"
|
1326
|
+
#
|
1327
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1328
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1329
|
+
#
|
1330
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1331
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new
|
1332
|
+
#
|
1333
|
+
# # Call the list_endpoints method.
|
1334
|
+
# result = client.list_endpoints request
|
1335
|
+
#
|
1336
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1337
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1338
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1339
|
+
# # methods are also available for managing paging directly.
|
1340
|
+
# result.each do |response|
|
1341
|
+
# # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.
|
1342
|
+
# p response
|
1343
|
+
# end
|
1344
|
+
#
|
1074
1345
|
def list_endpoints request, options = nil
|
1075
1346
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1076
1347
|
|
@@ -1088,16 +1359,20 @@ module Google
|
|
1088
1359
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
1089
1360
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1090
1361
|
|
1091
|
-
header_params = {
|
1092
|
-
|
1093
|
-
|
1362
|
+
header_params = {}
|
1363
|
+
if request.parent
|
1364
|
+
header_params["parent"] = request.parent
|
1365
|
+
end
|
1366
|
+
|
1094
1367
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1095
1368
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1096
1369
|
|
1097
1370
|
options.apply_defaults timeout: @config.rpcs.list_endpoints.timeout,
|
1098
1371
|
metadata: metadata,
|
1099
1372
|
retry_policy: @config.rpcs.list_endpoints.retry_policy
|
1100
|
-
|
1373
|
+
|
1374
|
+
options.apply_defaults timeout: @config.timeout,
|
1375
|
+
metadata: @config.metadata,
|
1101
1376
|
retry_policy: @config.retry_policy
|
1102
1377
|
|
1103
1378
|
@registration_service_stub.call_rpc :list_endpoints, request, options: options do |response, operation|
|
@@ -1110,7 +1385,7 @@ module Google
|
|
1110
1385
|
end
|
1111
1386
|
|
1112
1387
|
##
|
1113
|
-
# Gets
|
1388
|
+
# Gets an endpoint.
|
1114
1389
|
#
|
1115
1390
|
# @overload get_endpoint(request, options = nil)
|
1116
1391
|
# Pass arguments to `get_endpoint` via a request object, either of type
|
@@ -1138,6 +1413,21 @@ module Google
|
|
1138
1413
|
#
|
1139
1414
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1140
1415
|
#
|
1416
|
+
# @example Basic example
|
1417
|
+
# require "google/cloud/service_directory/v1beta1"
|
1418
|
+
#
|
1419
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1420
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1421
|
+
#
|
1422
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1423
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new
|
1424
|
+
#
|
1425
|
+
# # Call the get_endpoint method.
|
1426
|
+
# result = client.get_endpoint request
|
1427
|
+
#
|
1428
|
+
# # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint.
|
1429
|
+
# p result
|
1430
|
+
#
|
1141
1431
|
def get_endpoint request, options = nil
|
1142
1432
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1143
1433
|
|
@@ -1155,16 +1445,20 @@ module Google
|
|
1155
1445
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
1156
1446
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1157
1447
|
|
1158
|
-
header_params = {
|
1159
|
-
|
1160
|
-
|
1448
|
+
header_params = {}
|
1449
|
+
if request.name
|
1450
|
+
header_params["name"] = request.name
|
1451
|
+
end
|
1452
|
+
|
1161
1453
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1162
1454
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1163
1455
|
|
1164
1456
|
options.apply_defaults timeout: @config.rpcs.get_endpoint.timeout,
|
1165
1457
|
metadata: metadata,
|
1166
1458
|
retry_policy: @config.rpcs.get_endpoint.retry_policy
|
1167
|
-
|
1459
|
+
|
1460
|
+
options.apply_defaults timeout: @config.timeout,
|
1461
|
+
metadata: @config.metadata,
|
1168
1462
|
retry_policy: @config.retry_policy
|
1169
1463
|
|
1170
1464
|
@registration_service_stub.call_rpc :get_endpoint, request, options: options do |response, operation|
|
@@ -1176,7 +1470,7 @@ module Google
|
|
1176
1470
|
end
|
1177
1471
|
|
1178
1472
|
##
|
1179
|
-
# Updates
|
1473
|
+
# Updates an endpoint.
|
1180
1474
|
#
|
1181
1475
|
# @overload update_endpoint(request, options = nil)
|
1182
1476
|
# Pass arguments to `update_endpoint` via a request object, either of type
|
@@ -1206,6 +1500,21 @@ module Google
|
|
1206
1500
|
#
|
1207
1501
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1208
1502
|
#
|
1503
|
+
# @example Basic example
|
1504
|
+
# require "google/cloud/service_directory/v1beta1"
|
1505
|
+
#
|
1506
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1507
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1508
|
+
#
|
1509
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1510
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new
|
1511
|
+
#
|
1512
|
+
# # Call the update_endpoint method.
|
1513
|
+
# result = client.update_endpoint request
|
1514
|
+
#
|
1515
|
+
# # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint.
|
1516
|
+
# p result
|
1517
|
+
#
|
1209
1518
|
def update_endpoint request, options = nil
|
1210
1519
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1211
1520
|
|
@@ -1223,16 +1532,20 @@ module Google
|
|
1223
1532
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
1224
1533
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1225
1534
|
|
1226
|
-
header_params = {
|
1227
|
-
|
1228
|
-
|
1535
|
+
header_params = {}
|
1536
|
+
if request.endpoint&.name
|
1537
|
+
header_params["endpoint.name"] = request.endpoint.name
|
1538
|
+
end
|
1539
|
+
|
1229
1540
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1230
1541
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1231
1542
|
|
1232
1543
|
options.apply_defaults timeout: @config.rpcs.update_endpoint.timeout,
|
1233
1544
|
metadata: metadata,
|
1234
1545
|
retry_policy: @config.rpcs.update_endpoint.retry_policy
|
1235
|
-
|
1546
|
+
|
1547
|
+
options.apply_defaults timeout: @config.timeout,
|
1548
|
+
metadata: @config.metadata,
|
1236
1549
|
retry_policy: @config.retry_policy
|
1237
1550
|
|
1238
1551
|
@registration_service_stub.call_rpc :update_endpoint, request, options: options do |response, operation|
|
@@ -1244,7 +1557,7 @@ module Google
|
|
1244
1557
|
end
|
1245
1558
|
|
1246
1559
|
##
|
1247
|
-
# Deletes
|
1560
|
+
# Deletes an endpoint.
|
1248
1561
|
#
|
1249
1562
|
# @overload delete_endpoint(request, options = nil)
|
1250
1563
|
# Pass arguments to `delete_endpoint` via a request object, either of type
|
@@ -1272,6 +1585,21 @@ module Google
|
|
1272
1585
|
#
|
1273
1586
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1274
1587
|
#
|
1588
|
+
# @example Basic example
|
1589
|
+
# require "google/cloud/service_directory/v1beta1"
|
1590
|
+
#
|
1591
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1592
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1593
|
+
#
|
1594
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1595
|
+
# request = Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new
|
1596
|
+
#
|
1597
|
+
# # Call the delete_endpoint method.
|
1598
|
+
# result = client.delete_endpoint request
|
1599
|
+
#
|
1600
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1601
|
+
# p result
|
1602
|
+
#
|
1275
1603
|
def delete_endpoint request, options = nil
|
1276
1604
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1277
1605
|
|
@@ -1289,16 +1617,20 @@ module Google
|
|
1289
1617
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
1290
1618
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1291
1619
|
|
1292
|
-
header_params = {
|
1293
|
-
|
1294
|
-
|
1620
|
+
header_params = {}
|
1621
|
+
if request.name
|
1622
|
+
header_params["name"] = request.name
|
1623
|
+
end
|
1624
|
+
|
1295
1625
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1296
1626
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1297
1627
|
|
1298
1628
|
options.apply_defaults timeout: @config.rpcs.delete_endpoint.timeout,
|
1299
1629
|
metadata: metadata,
|
1300
1630
|
retry_policy: @config.rpcs.delete_endpoint.retry_policy
|
1301
|
-
|
1631
|
+
|
1632
|
+
options.apply_defaults timeout: @config.timeout,
|
1633
|
+
metadata: @config.metadata,
|
1302
1634
|
retry_policy: @config.retry_policy
|
1303
1635
|
|
1304
1636
|
@registration_service_stub.call_rpc :delete_endpoint, request, options: options do |response, operation|
|
@@ -1342,6 +1674,21 @@ module Google
|
|
1342
1674
|
#
|
1343
1675
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1344
1676
|
#
|
1677
|
+
# @example Basic example
|
1678
|
+
# require "google/cloud/service_directory/v1beta1"
|
1679
|
+
#
|
1680
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1681
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1682
|
+
#
|
1683
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1684
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
1685
|
+
#
|
1686
|
+
# # Call the get_iam_policy method.
|
1687
|
+
# result = client.get_iam_policy request
|
1688
|
+
#
|
1689
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1690
|
+
# p result
|
1691
|
+
#
|
1345
1692
|
def get_iam_policy request, options = nil
|
1346
1693
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1347
1694
|
|
@@ -1359,16 +1706,20 @@ module Google
|
|
1359
1706
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
1360
1707
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1361
1708
|
|
1362
|
-
header_params = {
|
1363
|
-
|
1364
|
-
|
1709
|
+
header_params = {}
|
1710
|
+
if request.resource
|
1711
|
+
header_params["resource"] = request.resource
|
1712
|
+
end
|
1713
|
+
|
1365
1714
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1366
1715
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1367
1716
|
|
1368
1717
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
1369
1718
|
metadata: metadata,
|
1370
1719
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
1371
|
-
|
1720
|
+
|
1721
|
+
options.apply_defaults timeout: @config.timeout,
|
1722
|
+
metadata: @config.metadata,
|
1372
1723
|
retry_policy: @config.retry_policy
|
1373
1724
|
|
1374
1725
|
@registration_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -1414,6 +1765,21 @@ module Google
|
|
1414
1765
|
#
|
1415
1766
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1416
1767
|
#
|
1768
|
+
# @example Basic example
|
1769
|
+
# require "google/cloud/service_directory/v1beta1"
|
1770
|
+
#
|
1771
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1772
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1773
|
+
#
|
1774
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1775
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
1776
|
+
#
|
1777
|
+
# # Call the set_iam_policy method.
|
1778
|
+
# result = client.set_iam_policy request
|
1779
|
+
#
|
1780
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1781
|
+
# p result
|
1782
|
+
#
|
1417
1783
|
def set_iam_policy request, options = nil
|
1418
1784
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1419
1785
|
|
@@ -1431,16 +1797,20 @@ module Google
|
|
1431
1797
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
1432
1798
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1433
1799
|
|
1434
|
-
header_params = {
|
1435
|
-
|
1436
|
-
|
1800
|
+
header_params = {}
|
1801
|
+
if request.resource
|
1802
|
+
header_params["resource"] = request.resource
|
1803
|
+
end
|
1804
|
+
|
1437
1805
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1438
1806
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1439
1807
|
|
1440
1808
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1441
1809
|
metadata: metadata,
|
1442
1810
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1443
|
-
|
1811
|
+
|
1812
|
+
options.apply_defaults timeout: @config.timeout,
|
1813
|
+
metadata: @config.metadata,
|
1444
1814
|
retry_policy: @config.retry_policy
|
1445
1815
|
|
1446
1816
|
@registration_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -1486,6 +1856,21 @@ module Google
|
|
1486
1856
|
#
|
1487
1857
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1488
1858
|
#
|
1859
|
+
# @example Basic example
|
1860
|
+
# require "google/cloud/service_directory/v1beta1"
|
1861
|
+
#
|
1862
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1863
|
+
# client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new
|
1864
|
+
#
|
1865
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1866
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
1867
|
+
#
|
1868
|
+
# # Call the test_iam_permissions method.
|
1869
|
+
# result = client.test_iam_permissions request
|
1870
|
+
#
|
1871
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
1872
|
+
# p result
|
1873
|
+
#
|
1489
1874
|
def test_iam_permissions request, options = nil
|
1490
1875
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1491
1876
|
|
@@ -1503,16 +1888,20 @@ module Google
|
|
1503
1888
|
gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION
|
1504
1889
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1505
1890
|
|
1506
|
-
header_params = {
|
1507
|
-
|
1508
|
-
|
1891
|
+
header_params = {}
|
1892
|
+
if request.resource
|
1893
|
+
header_params["resource"] = request.resource
|
1894
|
+
end
|
1895
|
+
|
1509
1896
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1510
1897
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1511
1898
|
|
1512
1899
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1513
1900
|
metadata: metadata,
|
1514
1901
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1515
|
-
|
1902
|
+
|
1903
|
+
options.apply_defaults timeout: @config.timeout,
|
1904
|
+
metadata: @config.metadata,
|
1516
1905
|
retry_policy: @config.retry_policy
|
1517
1906
|
|
1518
1907
|
@registration_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -1536,22 +1925,21 @@ module Google
|
|
1536
1925
|
# Configuration can be applied globally to all clients, or to a single client
|
1537
1926
|
# on construction.
|
1538
1927
|
#
|
1539
|
-
#
|
1540
|
-
#
|
1541
|
-
#
|
1542
|
-
# to 20 seconds,
|
1543
|
-
#
|
1544
|
-
#
|
1545
|
-
#
|
1546
|
-
#
|
1547
|
-
#
|
1548
|
-
#
|
1549
|
-
#
|
1550
|
-
#
|
1551
|
-
#
|
1552
|
-
#
|
1553
|
-
#
|
1554
|
-
# end
|
1928
|
+
# @example
|
1929
|
+
#
|
1930
|
+
# # Modify the global config, setting the timeout for
|
1931
|
+
# # create_namespace to 20 seconds,
|
1932
|
+
# # and all remaining timeouts to 10 seconds.
|
1933
|
+
# ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.configure do |config|
|
1934
|
+
# config.timeout = 10.0
|
1935
|
+
# config.rpcs.create_namespace.timeout = 20.0
|
1936
|
+
# end
|
1937
|
+
#
|
1938
|
+
# # Apply the above configuration only to a new client.
|
1939
|
+
# client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config|
|
1940
|
+
# config.timeout = 10.0
|
1941
|
+
# config.rpcs.create_namespace.timeout = 20.0
|
1942
|
+
# end
|
1555
1943
|
#
|
1556
1944
|
# @!attribute [rw] endpoint
|
1557
1945
|
# The hostname or hostname:port of the service endpoint.
|