google-cloud-service_management-v1 0.3.3 → 0.3.7

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.
@@ -27,7 +27,7 @@ module Google
27
27
  ##
28
28
  # Client for the ServiceManager service.
29
29
  #
30
- # [Google Service Management API](https://cloud.google.com/service-management/overview)
30
+ # [Google Service Management API](/service-management/overview)
31
31
  #
32
32
  class Client
33
33
  # @private
@@ -39,13 +39,12 @@ module Google
39
39
  # See {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client::Configuration}
40
40
  # for a description of the configuration fields.
41
41
  #
42
- # ## Example
42
+ # @example
43
43
  #
44
- # To modify the configuration for all ServiceManager clients:
45
- #
46
- # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config|
47
- # config.timeout = 10.0
48
- # end
44
+ # # Modify the configuration for all ServiceManager clients
45
+ # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config|
46
+ # config.timeout = 10.0
47
+ # end
49
48
  #
50
49
  # @yield [config] Configure the Client client.
51
50
  # @yieldparam config [Client::Configuration]
@@ -63,6 +62,8 @@ module Google
63
62
  end
64
63
  default_config = Client::Configuration.new parent_config
65
64
 
65
+ default_config.timeout = 10.0
66
+
66
67
  default_config
67
68
  end
68
69
  yield @configure if block_given?
@@ -92,19 +93,15 @@ module Google
92
93
  ##
93
94
  # Create a new ServiceManager client object.
94
95
  #
95
- # ## Examples
96
- #
97
- # To create a new ServiceManager client with the default
98
- # configuration:
99
- #
100
- # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
96
+ # @example
101
97
  #
102
- # To create a new ServiceManager client with a custom
103
- # configuration:
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
104
100
  #
105
- # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config|
106
- # config.timeout = 10.0
107
- # end
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
108
105
  #
109
106
  # @yield [config] Configure the ServiceManager client.
110
107
  # @yieldparam config [Client::Configuration]
@@ -124,10 +121,9 @@ module Google
124
121
 
125
122
  # Create credentials
126
123
  credentials = @config.credentials
127
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
124
+ # Use self-signed JWT if the endpoint is unchanged from default,
128
125
  # but only if the default endpoint does not have a region prefix.
129
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
130
- @config.endpoint == Client.configure.endpoint &&
126
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
131
127
  !@config.endpoint.split(".").first.include?("-")
132
128
  credentials ||= Credentials.default scope: @config.scope,
133
129
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -139,6 +135,7 @@ module Google
139
135
 
140
136
  @operations_client = Operations.new do |config|
141
137
  config.credentials = credentials
138
+ config.quota_project = @quota_project_id
142
139
  config.endpoint = @config.endpoint
143
140
  end
144
141
 
@@ -167,10 +164,6 @@ module Google
167
164
  # services the calling user has "servicemanagement.services.get" permission
168
165
  # for.
169
166
  #
170
- # **BETA:** If the caller specifies the `consumer_id`, it returns only the
171
- # services enabled on the consumer. The `consumer_id` must have the format
172
- # of "project:\\{PROJECT-ID}".
173
- #
174
167
  # @overload list_services(request, options = nil)
175
168
  # Pass arguments to `list_services` via a request object, either of type
176
169
  # {::Google::Cloud::ServiceManagement::V1::ListServicesRequest} or an equivalent Hash.
@@ -209,6 +202,27 @@ module Google
209
202
  #
210
203
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
211
204
  #
205
+ # @example Basic example
206
+ # require "google/cloud/service_management/v1"
207
+ #
208
+ # # Create a client object. The client can be reused for multiple calls.
209
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
210
+ #
211
+ # # Create a request. To set request fields, pass in keyword arguments.
212
+ # request = Google::Cloud::ServiceManagement::V1::ListServicesRequest.new
213
+ #
214
+ # # Call the list_services method.
215
+ # result = client.list_services request
216
+ #
217
+ # # The returned object is of type Gapic::PagedEnumerable. You can
218
+ # # iterate over all elements by calling #each, and the enumerable
219
+ # # will lazily make API calls to fetch subsequent pages. Other
220
+ # # methods are also available for managing paging directly.
221
+ # result.each do |response|
222
+ # # Each element is of type ::Google::Cloud::ServiceManagement::V1::ManagedService.
223
+ # p response
224
+ # end
225
+ #
212
226
  def list_services request, options = nil
213
227
  raise ::ArgumentError, "request must be provided" if request.nil?
214
228
 
@@ -229,7 +243,9 @@ module Google
229
243
  options.apply_defaults timeout: @config.rpcs.list_services.timeout,
230
244
  metadata: metadata,
231
245
  retry_policy: @config.rpcs.list_services.retry_policy
232
- options.apply_defaults metadata: @config.metadata,
246
+
247
+ options.apply_defaults timeout: @config.timeout,
248
+ metadata: @config.metadata,
233
249
  retry_policy: @config.retry_policy
234
250
 
235
251
  @service_manager_stub.call_rpc :list_services, request, options: options do |response, operation|
@@ -272,6 +288,21 @@ module Google
272
288
  #
273
289
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
274
290
  #
291
+ # @example Basic example
292
+ # require "google/cloud/service_management/v1"
293
+ #
294
+ # # Create a client object. The client can be reused for multiple calls.
295
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
296
+ #
297
+ # # Create a request. To set request fields, pass in keyword arguments.
298
+ # request = Google::Cloud::ServiceManagement::V1::GetServiceRequest.new
299
+ #
300
+ # # Call the get_service method.
301
+ # result = client.get_service request
302
+ #
303
+ # # The returned object is of type Google::Cloud::ServiceManagement::V1::ManagedService.
304
+ # p result
305
+ #
275
306
  def get_service request, options = nil
276
307
  raise ::ArgumentError, "request must be provided" if request.nil?
277
308
 
@@ -289,16 +320,20 @@ module Google
289
320
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
290
321
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
291
322
 
292
- header_params = {
293
- "service_name" => request.service_name
294
- }
323
+ header_params = {}
324
+ if request.service_name
325
+ header_params["service_name"] = request.service_name
326
+ end
327
+
295
328
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
296
329
  metadata[:"x-goog-request-params"] ||= request_params_header
297
330
 
298
331
  options.apply_defaults timeout: @config.rpcs.get_service.timeout,
299
332
  metadata: metadata,
300
333
  retry_policy: @config.rpcs.get_service.retry_policy
301
- options.apply_defaults metadata: @config.metadata,
334
+
335
+ options.apply_defaults timeout: @config.timeout,
336
+ metadata: @config.metadata,
302
337
  retry_policy: @config.retry_policy
303
338
 
304
339
  @service_manager_stub.call_rpc :get_service, request, options: options do |response, operation|
@@ -311,7 +346,14 @@ module Google
311
346
 
312
347
  ##
313
348
  # Creates a new managed service.
314
- # Please note one producer project can own no more than 20 services.
349
+ #
350
+ # A managed service is immutable, and is subject to mandatory 30-day
351
+ # data retention. You cannot move a service or recreate it within 30 days
352
+ # after deletion.
353
+ #
354
+ # One producer project can own no more than 500 services. For security and
355
+ # reliability purposes, a production service should be hosted in a
356
+ # dedicated producer project.
315
357
  #
316
358
  # Operation<response: ManagedService>
317
359
  #
@@ -341,6 +383,28 @@ module Google
341
383
  #
342
384
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
343
385
  #
386
+ # @example Basic example
387
+ # require "google/cloud/service_management/v1"
388
+ #
389
+ # # Create a client object. The client can be reused for multiple calls.
390
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
391
+ #
392
+ # # Create a request. To set request fields, pass in keyword arguments.
393
+ # request = Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new
394
+ #
395
+ # # Call the create_service method.
396
+ # result = client.create_service request
397
+ #
398
+ # # The returned object is of type Gapic::Operation. You can use this
399
+ # # object to check the status of an operation, cancel it, or wait
400
+ # # for results. Here is how to block until completion:
401
+ # result.wait_until_done! timeout: 60
402
+ # if result.response?
403
+ # p result.response
404
+ # else
405
+ # puts "Error!"
406
+ # end
407
+ #
344
408
  def create_service request, options = nil
345
409
  raise ::ArgumentError, "request must be provided" if request.nil?
346
410
 
@@ -361,7 +425,9 @@ module Google
361
425
  options.apply_defaults timeout: @config.rpcs.create_service.timeout,
362
426
  metadata: metadata,
363
427
  retry_policy: @config.rpcs.create_service.retry_policy
364
- options.apply_defaults metadata: @config.metadata,
428
+
429
+ options.apply_defaults timeout: @config.timeout,
430
+ metadata: @config.metadata,
365
431
  retry_policy: @config.retry_policy
366
432
 
367
433
  @service_manager_stub.call_rpc :create_service, request, options: options do |response, operation|
@@ -397,7 +463,7 @@ module Google
397
463
  # the default parameter values, pass an empty Hash as a request object (see above).
398
464
  #
399
465
  # @param service_name [::String]
400
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
466
+ # Required. The name of the service. See the [overview](/service-management/overview)
401
467
  # for naming requirements. For example: `example.googleapis.com`.
402
468
  #
403
469
  # @yield [response, operation] Access the result along with the RPC operation
@@ -408,6 +474,28 @@ module Google
408
474
  #
409
475
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
410
476
  #
477
+ # @example Basic example
478
+ # require "google/cloud/service_management/v1"
479
+ #
480
+ # # Create a client object. The client can be reused for multiple calls.
481
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
482
+ #
483
+ # # Create a request. To set request fields, pass in keyword arguments.
484
+ # request = Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new
485
+ #
486
+ # # Call the delete_service method.
487
+ # result = client.delete_service request
488
+ #
489
+ # # The returned object is of type Gapic::Operation. You can use this
490
+ # # object to check the status of an operation, cancel it, or wait
491
+ # # for results. Here is how to block until completion:
492
+ # result.wait_until_done! timeout: 60
493
+ # if result.response?
494
+ # p result.response
495
+ # else
496
+ # puts "Error!"
497
+ # end
498
+ #
411
499
  def delete_service request, options = nil
412
500
  raise ::ArgumentError, "request must be provided" if request.nil?
413
501
 
@@ -425,16 +513,20 @@ module Google
425
513
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
426
514
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
427
515
 
428
- header_params = {
429
- "service_name" => request.service_name
430
- }
516
+ header_params = {}
517
+ if request.service_name
518
+ header_params["service_name"] = request.service_name
519
+ end
520
+
431
521
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
432
522
  metadata[:"x-goog-request-params"] ||= request_params_header
433
523
 
434
524
  options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
435
525
  metadata: metadata,
436
526
  retry_policy: @config.rpcs.delete_service.retry_policy
437
- options.apply_defaults metadata: @config.metadata,
527
+
528
+ options.apply_defaults timeout: @config.timeout,
529
+ metadata: @config.metadata,
438
530
  retry_policy: @config.retry_policy
439
531
 
440
532
  @service_manager_stub.call_rpc :delete_service, request, options: options do |response, operation|
@@ -470,7 +562,7 @@ module Google
470
562
  # the default parameter values, pass an empty Hash as a request object (see above).
471
563
  #
472
564
  # @param service_name [::String]
473
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
565
+ # Required. The name of the service. See the [overview](/service-management/overview)
474
566
  # for naming requirements. For example: `example.googleapis.com`.
475
567
  #
476
568
  # @yield [response, operation] Access the result along with the RPC operation
@@ -481,6 +573,28 @@ module Google
481
573
  #
482
574
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
483
575
  #
576
+ # @example Basic example
577
+ # require "google/cloud/service_management/v1"
578
+ #
579
+ # # Create a client object. The client can be reused for multiple calls.
580
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
581
+ #
582
+ # # Create a request. To set request fields, pass in keyword arguments.
583
+ # request = Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new
584
+ #
585
+ # # Call the undelete_service method.
586
+ # result = client.undelete_service request
587
+ #
588
+ # # The returned object is of type Gapic::Operation. You can use this
589
+ # # object to check the status of an operation, cancel it, or wait
590
+ # # for results. Here is how to block until completion:
591
+ # result.wait_until_done! timeout: 60
592
+ # if result.response?
593
+ # p result.response
594
+ # else
595
+ # puts "Error!"
596
+ # end
597
+ #
484
598
  def undelete_service request, options = nil
485
599
  raise ::ArgumentError, "request must be provided" if request.nil?
486
600
 
@@ -498,16 +612,20 @@ module Google
498
612
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
499
613
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
500
614
 
501
- header_params = {
502
- "service_name" => request.service_name
503
- }
615
+ header_params = {}
616
+ if request.service_name
617
+ header_params["service_name"] = request.service_name
618
+ end
619
+
504
620
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
505
621
  metadata[:"x-goog-request-params"] ||= request_params_header
506
622
 
507
623
  options.apply_defaults timeout: @config.rpcs.undelete_service.timeout,
508
624
  metadata: metadata,
509
625
  retry_policy: @config.rpcs.undelete_service.retry_policy
510
- options.apply_defaults metadata: @config.metadata,
626
+
627
+ options.apply_defaults timeout: @config.timeout,
628
+ metadata: @config.metadata,
511
629
  retry_policy: @config.retry_policy
512
630
 
513
631
  @service_manager_stub.call_rpc :undelete_service, request, options: options do |response, operation|
@@ -539,7 +657,7 @@ module Google
539
657
  # the default parameter values, pass an empty Hash as a request object (see above).
540
658
  #
541
659
  # @param service_name [::String]
542
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
660
+ # Required. The name of the service. See the [overview](/service-management/overview)
543
661
  # for naming requirements. For example: `example.googleapis.com`.
544
662
  # @param page_token [::String]
545
663
  # The token of the page to retrieve.
@@ -555,6 +673,27 @@ module Google
555
673
  #
556
674
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
557
675
  #
676
+ # @example Basic example
677
+ # require "google/cloud/service_management/v1"
678
+ #
679
+ # # Create a client object. The client can be reused for multiple calls.
680
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
681
+ #
682
+ # # Create a request. To set request fields, pass in keyword arguments.
683
+ # request = Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new
684
+ #
685
+ # # Call the list_service_configs method.
686
+ # result = client.list_service_configs request
687
+ #
688
+ # # The returned object is of type Gapic::PagedEnumerable. You can
689
+ # # iterate over all elements by calling #each, and the enumerable
690
+ # # will lazily make API calls to fetch subsequent pages. Other
691
+ # # methods are also available for managing paging directly.
692
+ # result.each do |response|
693
+ # # Each element is of type ::Google::Api::Service.
694
+ # p response
695
+ # end
696
+ #
558
697
  def list_service_configs request, options = nil
559
698
  raise ::ArgumentError, "request must be provided" if request.nil?
560
699
 
@@ -572,16 +711,20 @@ module Google
572
711
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
573
712
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
574
713
 
575
- header_params = {
576
- "service_name" => request.service_name
577
- }
714
+ header_params = {}
715
+ if request.service_name
716
+ header_params["service_name"] = request.service_name
717
+ end
718
+
578
719
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
579
720
  metadata[:"x-goog-request-params"] ||= request_params_header
580
721
 
581
722
  options.apply_defaults timeout: @config.rpcs.list_service_configs.timeout,
582
723
  metadata: metadata,
583
724
  retry_policy: @config.rpcs.list_service_configs.retry_policy
584
- options.apply_defaults metadata: @config.metadata,
725
+
726
+ options.apply_defaults timeout: @config.timeout,
727
+ metadata: @config.metadata,
585
728
  retry_policy: @config.retry_policy
586
729
 
587
730
  @service_manager_stub.call_rpc :list_service_configs, request, options: options do |response, operation|
@@ -612,7 +755,7 @@ module Google
612
755
  # the default parameter values, pass an empty Hash as a request object (see above).
613
756
  #
614
757
  # @param service_name [::String]
615
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
758
+ # Required. The name of the service. See the [overview](/service-management/overview)
616
759
  # for naming requirements. For example: `example.googleapis.com`.
617
760
  # @param config_id [::String]
618
761
  # Required. The id of the service configuration resource.
@@ -631,6 +774,21 @@ module Google
631
774
  #
632
775
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
633
776
  #
777
+ # @example Basic example
778
+ # require "google/cloud/service_management/v1"
779
+ #
780
+ # # Create a client object. The client can be reused for multiple calls.
781
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
782
+ #
783
+ # # Create a request. To set request fields, pass in keyword arguments.
784
+ # request = Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new
785
+ #
786
+ # # Call the get_service_config method.
787
+ # result = client.get_service_config request
788
+ #
789
+ # # The returned object is of type Google::Api::Service.
790
+ # p result
791
+ #
634
792
  def get_service_config request, options = nil
635
793
  raise ::ArgumentError, "request must be provided" if request.nil?
636
794
 
@@ -648,17 +806,23 @@ module Google
648
806
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
649
807
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
650
808
 
651
- header_params = {
652
- "service_name" => request.service_name,
653
- "config_id" => request.config_id
654
- }
809
+ header_params = {}
810
+ if request.service_name
811
+ header_params["service_name"] = request.service_name
812
+ end
813
+ if request.config_id
814
+ header_params["config_id"] = request.config_id
815
+ end
816
+
655
817
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
656
818
  metadata[:"x-goog-request-params"] ||= request_params_header
657
819
 
658
820
  options.apply_defaults timeout: @config.rpcs.get_service_config.timeout,
659
821
  metadata: metadata,
660
822
  retry_policy: @config.rpcs.get_service_config.retry_policy
661
- options.apply_defaults metadata: @config.metadata,
823
+
824
+ options.apply_defaults timeout: @config.timeout,
825
+ metadata: @config.metadata,
662
826
  retry_policy: @config.retry_policy
663
827
 
664
828
  @service_manager_stub.call_rpc :get_service_config, request, options: options do |response, operation|
@@ -695,7 +859,7 @@ module Google
695
859
  # the default parameter values, pass an empty Hash as a request object (see above).
696
860
  #
697
861
  # @param service_name [::String]
698
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
862
+ # Required. The name of the service. See the [overview](/service-management/overview)
699
863
  # for naming requirements. For example: `example.googleapis.com`.
700
864
  # @param service_config [::Google::Api::Service, ::Hash]
701
865
  # Required. The service configuration resource.
@@ -708,6 +872,21 @@ module Google
708
872
  #
709
873
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
710
874
  #
875
+ # @example Basic example
876
+ # require "google/cloud/service_management/v1"
877
+ #
878
+ # # Create a client object. The client can be reused for multiple calls.
879
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
880
+ #
881
+ # # Create a request. To set request fields, pass in keyword arguments.
882
+ # request = Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new
883
+ #
884
+ # # Call the create_service_config method.
885
+ # result = client.create_service_config request
886
+ #
887
+ # # The returned object is of type Google::Api::Service.
888
+ # p result
889
+ #
711
890
  def create_service_config request, options = nil
712
891
  raise ::ArgumentError, "request must be provided" if request.nil?
713
892
 
@@ -725,16 +904,20 @@ module Google
725
904
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
726
905
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
727
906
 
728
- header_params = {
729
- "service_name" => request.service_name
730
- }
907
+ header_params = {}
908
+ if request.service_name
909
+ header_params["service_name"] = request.service_name
910
+ end
911
+
731
912
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
732
913
  metadata[:"x-goog-request-params"] ||= request_params_header
733
914
 
734
915
  options.apply_defaults timeout: @config.rpcs.create_service_config.timeout,
735
916
  metadata: metadata,
736
917
  retry_policy: @config.rpcs.create_service_config.retry_policy
737
- options.apply_defaults metadata: @config.metadata,
918
+
919
+ options.apply_defaults timeout: @config.timeout,
920
+ metadata: @config.metadata,
738
921
  retry_policy: @config.retry_policy
739
922
 
740
923
  @service_manager_stub.call_rpc :create_service_config, request, options: options do |response, operation|
@@ -776,7 +959,7 @@ module Google
776
959
  # the default parameter values, pass an empty Hash as a request object (see above).
777
960
  #
778
961
  # @param service_name [::String]
779
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
962
+ # Required. The name of the service. See the [overview](/service-management/overview)
780
963
  # for naming requirements. For example: `example.googleapis.com`.
781
964
  # @param config_source [::Google::Cloud::ServiceManagement::V1::ConfigSource, ::Hash]
782
965
  # Required. The source configuration for the service.
@@ -793,6 +976,28 @@ module Google
793
976
  #
794
977
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
795
978
  #
979
+ # @example Basic example
980
+ # require "google/cloud/service_management/v1"
981
+ #
982
+ # # Create a client object. The client can be reused for multiple calls.
983
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
984
+ #
985
+ # # Create a request. To set request fields, pass in keyword arguments.
986
+ # request = Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new
987
+ #
988
+ # # Call the submit_config_source method.
989
+ # result = client.submit_config_source request
990
+ #
991
+ # # The returned object is of type Gapic::Operation. You can use this
992
+ # # object to check the status of an operation, cancel it, or wait
993
+ # # for results. Here is how to block until completion:
994
+ # result.wait_until_done! timeout: 60
995
+ # if result.response?
996
+ # p result.response
997
+ # else
998
+ # puts "Error!"
999
+ # end
1000
+ #
796
1001
  def submit_config_source request, options = nil
797
1002
  raise ::ArgumentError, "request must be provided" if request.nil?
798
1003
 
@@ -810,16 +1015,20 @@ module Google
810
1015
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
811
1016
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
812
1017
 
813
- header_params = {
814
- "service_name" => request.service_name
815
- }
1018
+ header_params = {}
1019
+ if request.service_name
1020
+ header_params["service_name"] = request.service_name
1021
+ end
1022
+
816
1023
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
817
1024
  metadata[:"x-goog-request-params"] ||= request_params_header
818
1025
 
819
1026
  options.apply_defaults timeout: @config.rpcs.submit_config_source.timeout,
820
1027
  metadata: metadata,
821
1028
  retry_policy: @config.rpcs.submit_config_source.retry_policy
822
- options.apply_defaults metadata: @config.metadata,
1029
+
1030
+ options.apply_defaults timeout: @config.timeout,
1031
+ metadata: @config.metadata,
823
1032
  retry_policy: @config.retry_policy
824
1033
 
825
1034
  @service_manager_stub.call_rpc :submit_config_source, request, options: options do |response, operation|
@@ -851,7 +1060,7 @@ module Google
851
1060
  # the default parameter values, pass an empty Hash as a request object (see above).
852
1061
  #
853
1062
  # @param service_name [::String]
854
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
1063
+ # Required. The name of the service. See the [overview](/service-management/overview)
855
1064
  # for naming requirements. For example: `example.googleapis.com`.
856
1065
  # @param page_token [::String]
857
1066
  # The token of the page to retrieve.
@@ -862,10 +1071,10 @@ module Google
862
1071
  # Required. Use `filter` to return subset of rollouts.
863
1072
  # The following filters are supported:
864
1073
  # -- To limit the results to only those in
865
- # status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
1074
+ # [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
866
1075
  # use filter='status=SUCCESS'
867
1076
  # -- To limit the results to those in
868
- # status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
1077
+ # [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
869
1078
  # or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
870
1079
  #
871
1080
  # @yield [response, operation] Access the result along with the RPC operation
@@ -876,6 +1085,27 @@ module Google
876
1085
  #
877
1086
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
878
1087
  #
1088
+ # @example Basic example
1089
+ # require "google/cloud/service_management/v1"
1090
+ #
1091
+ # # Create a client object. The client can be reused for multiple calls.
1092
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
1093
+ #
1094
+ # # Create a request. To set request fields, pass in keyword arguments.
1095
+ # request = Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new
1096
+ #
1097
+ # # Call the list_service_rollouts method.
1098
+ # result = client.list_service_rollouts request
1099
+ #
1100
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1101
+ # # iterate over all elements by calling #each, and the enumerable
1102
+ # # will lazily make API calls to fetch subsequent pages. Other
1103
+ # # methods are also available for managing paging directly.
1104
+ # result.each do |response|
1105
+ # # Each element is of type ::Google::Cloud::ServiceManagement::V1::Rollout.
1106
+ # p response
1107
+ # end
1108
+ #
879
1109
  def list_service_rollouts request, options = nil
880
1110
  raise ::ArgumentError, "request must be provided" if request.nil?
881
1111
 
@@ -893,16 +1123,20 @@ module Google
893
1123
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
894
1124
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
895
1125
 
896
- header_params = {
897
- "service_name" => request.service_name
898
- }
1126
+ header_params = {}
1127
+ if request.service_name
1128
+ header_params["service_name"] = request.service_name
1129
+ end
1130
+
899
1131
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
900
1132
  metadata[:"x-goog-request-params"] ||= request_params_header
901
1133
 
902
1134
  options.apply_defaults timeout: @config.rpcs.list_service_rollouts.timeout,
903
1135
  metadata: metadata,
904
1136
  retry_policy: @config.rpcs.list_service_rollouts.retry_policy
905
- options.apply_defaults metadata: @config.metadata,
1137
+
1138
+ options.apply_defaults timeout: @config.timeout,
1139
+ metadata: @config.metadata,
906
1140
  retry_policy: @config.retry_policy
907
1141
 
908
1142
  @service_manager_stub.call_rpc :list_service_rollouts, request, options: options do |response, operation|
@@ -933,7 +1167,7 @@ module Google
933
1167
  # the default parameter values, pass an empty Hash as a request object (see above).
934
1168
  #
935
1169
  # @param service_name [::String]
936
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
1170
+ # Required. The name of the service. See the [overview](/service-management/overview)
937
1171
  # for naming requirements. For example: `example.googleapis.com`.
938
1172
  # @param rollout_id [::String]
939
1173
  # Required. The id of the rollout resource.
@@ -946,6 +1180,21 @@ module Google
946
1180
  #
947
1181
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
948
1182
  #
1183
+ # @example Basic example
1184
+ # require "google/cloud/service_management/v1"
1185
+ #
1186
+ # # Create a client object. The client can be reused for multiple calls.
1187
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
1188
+ #
1189
+ # # Create a request. To set request fields, pass in keyword arguments.
1190
+ # request = Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new
1191
+ #
1192
+ # # Call the get_service_rollout method.
1193
+ # result = client.get_service_rollout request
1194
+ #
1195
+ # # The returned object is of type Google::Cloud::ServiceManagement::V1::Rollout.
1196
+ # p result
1197
+ #
949
1198
  def get_service_rollout request, options = nil
950
1199
  raise ::ArgumentError, "request must be provided" if request.nil?
951
1200
 
@@ -963,17 +1212,23 @@ module Google
963
1212
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
964
1213
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
965
1214
 
966
- header_params = {
967
- "service_name" => request.service_name,
968
- "rollout_id" => request.rollout_id
969
- }
1215
+ header_params = {}
1216
+ if request.service_name
1217
+ header_params["service_name"] = request.service_name
1218
+ end
1219
+ if request.rollout_id
1220
+ header_params["rollout_id"] = request.rollout_id
1221
+ end
1222
+
970
1223
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
971
1224
  metadata[:"x-goog-request-params"] ||= request_params_header
972
1225
 
973
1226
  options.apply_defaults timeout: @config.rpcs.get_service_rollout.timeout,
974
1227
  metadata: metadata,
975
1228
  retry_policy: @config.rpcs.get_service_rollout.retry_policy
976
- options.apply_defaults metadata: @config.metadata,
1229
+
1230
+ options.apply_defaults timeout: @config.timeout,
1231
+ metadata: @config.metadata,
977
1232
  retry_policy: @config.retry_policy
978
1233
 
979
1234
  @service_manager_stub.call_rpc :get_service_rollout, request, options: options do |response, operation|
@@ -1016,7 +1271,7 @@ module Google
1016
1271
  # the default parameter values, pass an empty Hash as a request object (see above).
1017
1272
  #
1018
1273
  # @param service_name [::String]
1019
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
1274
+ # Required. The name of the service. See the [overview](/service-management/overview)
1020
1275
  # for naming requirements. For example: `example.googleapis.com`.
1021
1276
  # @param rollout [::Google::Cloud::ServiceManagement::V1::Rollout, ::Hash]
1022
1277
  # Required. The rollout resource. The `service_name` field is output only.
@@ -1029,6 +1284,28 @@ module Google
1029
1284
  #
1030
1285
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1031
1286
  #
1287
+ # @example Basic example
1288
+ # require "google/cloud/service_management/v1"
1289
+ #
1290
+ # # Create a client object. The client can be reused for multiple calls.
1291
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
1292
+ #
1293
+ # # Create a request. To set request fields, pass in keyword arguments.
1294
+ # request = Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new
1295
+ #
1296
+ # # Call the create_service_rollout method.
1297
+ # result = client.create_service_rollout request
1298
+ #
1299
+ # # The returned object is of type Gapic::Operation. You can use this
1300
+ # # object to check the status of an operation, cancel it, or wait
1301
+ # # for results. Here is how to block until completion:
1302
+ # result.wait_until_done! timeout: 60
1303
+ # if result.response?
1304
+ # p result.response
1305
+ # else
1306
+ # puts "Error!"
1307
+ # end
1308
+ #
1032
1309
  def create_service_rollout request, options = nil
1033
1310
  raise ::ArgumentError, "request must be provided" if request.nil?
1034
1311
 
@@ -1046,16 +1323,20 @@ module Google
1046
1323
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
1047
1324
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1048
1325
 
1049
- header_params = {
1050
- "service_name" => request.service_name
1051
- }
1326
+ header_params = {}
1327
+ if request.service_name
1328
+ header_params["service_name"] = request.service_name
1329
+ end
1330
+
1052
1331
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1053
1332
  metadata[:"x-goog-request-params"] ||= request_params_header
1054
1333
 
1055
1334
  options.apply_defaults timeout: @config.rpcs.create_service_rollout.timeout,
1056
1335
  metadata: metadata,
1057
1336
  retry_policy: @config.rpcs.create_service_rollout.retry_policy
1058
- options.apply_defaults metadata: @config.metadata,
1337
+
1338
+ options.apply_defaults timeout: @config.timeout,
1339
+ metadata: @config.metadata,
1059
1340
  retry_policy: @config.retry_policy
1060
1341
 
1061
1342
  @service_manager_stub.call_rpc :create_service_rollout, request, options: options do |response, operation|
@@ -1116,92 +1397,31 @@ module Google
1116
1397
  #
1117
1398
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1118
1399
  #
1119
- def generate_config_report request, options = nil
1120
- raise ::ArgumentError, "request must be provided" if request.nil?
1121
-
1122
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest
1123
-
1124
- # Converts hash and nil to an options object
1125
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1126
-
1127
- # Customize the options with defaults
1128
- metadata = @config.rpcs.generate_config_report.metadata.to_h
1129
-
1130
- # Set x-goog-api-client and x-goog-user-project headers
1131
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1132
- lib_name: @config.lib_name, lib_version: @config.lib_version,
1133
- gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
1134
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1135
-
1136
- options.apply_defaults timeout: @config.rpcs.generate_config_report.timeout,
1137
- metadata: metadata,
1138
- retry_policy: @config.rpcs.generate_config_report.retry_policy
1139
- options.apply_defaults metadata: @config.metadata,
1140
- retry_policy: @config.retry_policy
1141
-
1142
- @service_manager_stub.call_rpc :generate_config_report, request, options: options do |response, operation|
1143
- yield response, operation if block_given?
1144
- return response
1145
- end
1146
- rescue ::GRPC::BadStatus => e
1147
- raise ::Google::Cloud::Error.from_error(e)
1148
- end
1149
-
1150
- ##
1151
- # Enables a {::Google::Cloud::ServiceManagement::V1::ManagedService service} for a project, so it can be used
1152
- # for the project. See
1153
- # [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for
1154
- # more information.
1155
- #
1156
- # Operation<response: EnableServiceResponse>
1157
- #
1158
- # @overload enable_service(request, options = nil)
1159
- # Pass arguments to `enable_service` via a request object, either of type
1160
- # {::Google::Cloud::ServiceManagement::V1::EnableServiceRequest} or an equivalent Hash.
1161
- #
1162
- # @param request [::Google::Cloud::ServiceManagement::V1::EnableServiceRequest, ::Hash]
1163
- # A request object representing the call parameters. Required. To specify no
1164
- # parameters, or to keep all the default parameter values, pass an empty Hash.
1165
- # @param options [::Gapic::CallOptions, ::Hash]
1166
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1167
- #
1168
- # @overload enable_service(service_name: nil, consumer_id: nil)
1169
- # Pass arguments to `enable_service` via keyword arguments. Note that at
1170
- # least one keyword argument is required. To specify no parameters, or to keep all
1171
- # the default parameter values, pass an empty Hash as a request object (see above).
1172
- #
1173
- # @param service_name [::String]
1174
- # Required. Name of the service to enable. Specifying an unknown service name will
1175
- # cause the request to fail.
1176
- # @param consumer_id [::String]
1177
- # Required. The identity of consumer resource which service enablement will be
1178
- # applied to.
1179
- #
1180
- # The Google Service Management implementation accepts the following
1181
- # forms:
1182
- # - "project:<project_id>"
1400
+ # @example Basic example
1401
+ # require "google/cloud/service_management/v1"
1183
1402
  #
1184
- # Note: this is made compatible with
1185
- # google.api.servicecontrol.v1.Operation.consumer_id.
1403
+ # # Create a client object. The client can be reused for multiple calls.
1404
+ # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
1186
1405
  #
1187
- # @yield [response, operation] Access the result along with the RPC operation
1188
- # @yieldparam response [::Gapic::Operation]
1189
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
1406
+ # # Create a request. To set request fields, pass in keyword arguments.
1407
+ # request = Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new
1190
1408
  #
1191
- # @return [::Gapic::Operation]
1409
+ # # Call the generate_config_report method.
1410
+ # result = client.generate_config_report request
1192
1411
  #
1193
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
1412
+ # # The returned object is of type Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse.
1413
+ # p result
1194
1414
  #
1195
- def enable_service request, options = nil
1415
+ def generate_config_report request, options = nil
1196
1416
  raise ::ArgumentError, "request must be provided" if request.nil?
1197
1417
 
1198
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::EnableServiceRequest
1418
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest
1199
1419
 
1200
1420
  # Converts hash and nil to an options object
1201
1421
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1202
1422
 
1203
1423
  # Customize the options with defaults
1204
- metadata = @config.rpcs.enable_service.metadata.to_h
1424
+ metadata = @config.rpcs.generate_config_report.metadata.to_h
1205
1425
 
1206
1426
  # Set x-goog-api-client and x-goog-user-project headers
1207
1427
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1209,102 +1429,15 @@ module Google
1209
1429
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
1210
1430
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1211
1431
 
1212
- header_params = {
1213
- "service_name" => request.service_name
1214
- }
1215
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1216
- metadata[:"x-goog-request-params"] ||= request_params_header
1217
-
1218
- options.apply_defaults timeout: @config.rpcs.enable_service.timeout,
1432
+ options.apply_defaults timeout: @config.rpcs.generate_config_report.timeout,
1219
1433
  metadata: metadata,
1220
- retry_policy: @config.rpcs.enable_service.retry_policy
1221
- options.apply_defaults metadata: @config.metadata,
1222
- retry_policy: @config.retry_policy
1223
-
1224
- @service_manager_stub.call_rpc :enable_service, request, options: options do |response, operation|
1225
- response = ::Gapic::Operation.new response, @operations_client, options: options
1226
- yield response, operation if block_given?
1227
- return response
1228
- end
1229
- rescue ::GRPC::BadStatus => e
1230
- raise ::Google::Cloud::Error.from_error(e)
1231
- end
1232
-
1233
- ##
1234
- # Disables a {::Google::Cloud::ServiceManagement::V1::ManagedService service} for a project, so it can no longer be
1235
- # be used for the project. It prevents accidental usage that may cause
1236
- # unexpected billing charges or security leaks.
1237
- #
1238
- # Operation<response: DisableServiceResponse>
1239
- #
1240
- # @overload disable_service(request, options = nil)
1241
- # Pass arguments to `disable_service` via a request object, either of type
1242
- # {::Google::Cloud::ServiceManagement::V1::DisableServiceRequest} or an equivalent Hash.
1243
- #
1244
- # @param request [::Google::Cloud::ServiceManagement::V1::DisableServiceRequest, ::Hash]
1245
- # A request object representing the call parameters. Required. To specify no
1246
- # parameters, or to keep all the default parameter values, pass an empty Hash.
1247
- # @param options [::Gapic::CallOptions, ::Hash]
1248
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1249
- #
1250
- # @overload disable_service(service_name: nil, consumer_id: nil)
1251
- # Pass arguments to `disable_service` via keyword arguments. Note that at
1252
- # least one keyword argument is required. To specify no parameters, or to keep all
1253
- # the default parameter values, pass an empty Hash as a request object (see above).
1254
- #
1255
- # @param service_name [::String]
1256
- # Required. Name of the service to disable. Specifying an unknown service name
1257
- # will cause the request to fail.
1258
- # @param consumer_id [::String]
1259
- # Required. The identity of consumer resource which service disablement will be
1260
- # applied to.
1261
- #
1262
- # The Google Service Management implementation accepts the following
1263
- # forms:
1264
- # - "project:<project_id>"
1265
- #
1266
- # Note: this is made compatible with
1267
- # google.api.servicecontrol.v1.Operation.consumer_id.
1268
- #
1269
- # @yield [response, operation] Access the result along with the RPC operation
1270
- # @yieldparam response [::Gapic::Operation]
1271
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
1272
- #
1273
- # @return [::Gapic::Operation]
1274
- #
1275
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
1276
- #
1277
- def disable_service request, options = nil
1278
- raise ::ArgumentError, "request must be provided" if request.nil?
1279
-
1280
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::DisableServiceRequest
1281
-
1282
- # Converts hash and nil to an options object
1283
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1284
-
1285
- # Customize the options with defaults
1286
- metadata = @config.rpcs.disable_service.metadata.to_h
1287
-
1288
- # Set x-goog-api-client and x-goog-user-project headers
1289
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1290
- lib_name: @config.lib_name, lib_version: @config.lib_version,
1291
- gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
1292
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1293
-
1294
- header_params = {
1295
- "service_name" => request.service_name
1296
- }
1297
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1298
- metadata[:"x-goog-request-params"] ||= request_params_header
1434
+ retry_policy: @config.rpcs.generate_config_report.retry_policy
1299
1435
 
1300
- options.apply_defaults timeout: @config.rpcs.disable_service.timeout,
1301
- metadata: metadata,
1302
- retry_policy: @config.rpcs.disable_service.retry_policy
1303
- options.apply_defaults metadata: @config.metadata,
1436
+ options.apply_defaults timeout: @config.timeout,
1437
+ metadata: @config.metadata,
1304
1438
  retry_policy: @config.retry_policy
1305
1439
 
1306
- @service_manager_stub.call_rpc :disable_service, request, options: options do |response, operation|
1307
- response = ::Gapic::Operation.new response, @operations_client, options: options
1440
+ @service_manager_stub.call_rpc :generate_config_report, request, options: options do |response, operation|
1308
1441
  yield response, operation if block_given?
1309
1442
  return response
1310
1443
  end
@@ -1325,22 +1458,21 @@ module Google
1325
1458
  # Configuration can be applied globally to all clients, or to a single client
1326
1459
  # on construction.
1327
1460
  #
1328
- # # Examples
1329
- #
1330
- # To modify the global config, setting the timeout for list_services
1331
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1461
+ # @example
1332
1462
  #
1333
- # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config|
1334
- # config.timeout = 10.0
1335
- # config.rpcs.list_services.timeout = 20.0
1336
- # end
1463
+ # # Modify the global config, setting the timeout for
1464
+ # # list_services to 20 seconds,
1465
+ # # and all remaining timeouts to 10 seconds.
1466
+ # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config|
1467
+ # config.timeout = 10.0
1468
+ # config.rpcs.list_services.timeout = 20.0
1469
+ # end
1337
1470
  #
1338
- # To apply the above configuration only to a new client:
1339
- #
1340
- # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config|
1341
- # config.timeout = 10.0
1342
- # config.rpcs.list_services.timeout = 20.0
1343
- # end
1471
+ # # Apply the above configuration only to a new client.
1472
+ # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config|
1473
+ # config.timeout = 10.0
1474
+ # config.rpcs.list_services.timeout = 20.0
1475
+ # end
1344
1476
  #
1345
1477
  # @!attribute [rw] endpoint
1346
1478
  # The hostname or hostname:port of the service endpoint.
@@ -1513,16 +1645,6 @@ module Google
1513
1645
  # @return [::Gapic::Config::Method]
1514
1646
  #
1515
1647
  attr_reader :generate_config_report
1516
- ##
1517
- # RPC-specific configuration for `enable_service`
1518
- # @return [::Gapic::Config::Method]
1519
- #
1520
- attr_reader :enable_service
1521
- ##
1522
- # RPC-specific configuration for `disable_service`
1523
- # @return [::Gapic::Config::Method]
1524
- #
1525
- attr_reader :disable_service
1526
1648
 
1527
1649
  # @private
1528
1650
  def initialize parent_rpcs = nil
@@ -1552,10 +1674,6 @@ module Google
1552
1674
  @create_service_rollout = ::Gapic::Config::Method.new create_service_rollout_config
1553
1675
  generate_config_report_config = parent_rpcs.generate_config_report if parent_rpcs.respond_to? :generate_config_report
1554
1676
  @generate_config_report = ::Gapic::Config::Method.new generate_config_report_config
1555
- enable_service_config = parent_rpcs.enable_service if parent_rpcs.respond_to? :enable_service
1556
- @enable_service = ::Gapic::Config::Method.new enable_service_config
1557
- disable_service_config = parent_rpcs.disable_service if parent_rpcs.respond_to? :disable_service
1558
- @disable_service = ::Gapic::Config::Method.new disable_service_config
1559
1677
 
1560
1678
  yield self if block_given?
1561
1679
  end