google-cloud-container-v1 0.6.0 → 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.
@@ -39,13 +39,12 @@ module Google
39
39
  # See {::Google::Cloud::Container::V1::ClusterManager::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 ClusterManager clients:
45
- #
46
- # ::Google::Cloud::Container::V1::ClusterManager::Client.configure do |config|
47
- # config.timeout = 10.0
48
- # end
44
+ # # Modify the configuration for all ClusterManager clients
45
+ # ::Google::Cloud::Container::V1::ClusterManager::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]
@@ -65,18 +64,12 @@ module Google
65
64
 
66
65
  default_config.rpcs.list_clusters.timeout = 20.0
67
66
  default_config.rpcs.list_clusters.retry_policy = {
68
- initial_delay: 0.1,
69
- max_delay: 60.0,
70
- multiplier: 1.3,
71
- retry_codes: [14, 4]
67
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
72
68
  }
73
69
 
74
70
  default_config.rpcs.get_cluster.timeout = 20.0
75
71
  default_config.rpcs.get_cluster.retry_policy = {
76
- initial_delay: 0.1,
77
- max_delay: 60.0,
78
- multiplier: 1.3,
79
- retry_codes: [14, 4]
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
80
73
  }
81
74
 
82
75
  default_config.rpcs.create_cluster.timeout = 45.0
@@ -101,62 +94,41 @@ module Google
101
94
 
102
95
  default_config.rpcs.delete_cluster.timeout = 20.0
103
96
  default_config.rpcs.delete_cluster.retry_policy = {
104
- initial_delay: 0.1,
105
- max_delay: 60.0,
106
- multiplier: 1.3,
107
- retry_codes: [14, 4]
97
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
108
98
  }
109
99
 
110
100
  default_config.rpcs.list_operations.timeout = 20.0
111
101
  default_config.rpcs.list_operations.retry_policy = {
112
- initial_delay: 0.1,
113
- max_delay: 60.0,
114
- multiplier: 1.3,
115
- retry_codes: [14, 4]
102
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
116
103
  }
117
104
 
118
105
  default_config.rpcs.get_operation.timeout = 20.0
119
106
  default_config.rpcs.get_operation.retry_policy = {
120
- initial_delay: 0.1,
121
- max_delay: 60.0,
122
- multiplier: 1.3,
123
- retry_codes: [14, 4]
107
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
124
108
  }
125
109
 
126
110
  default_config.rpcs.cancel_operation.timeout = 45.0
127
111
 
128
112
  default_config.rpcs.get_server_config.timeout = 20.0
129
113
  default_config.rpcs.get_server_config.retry_policy = {
130
- initial_delay: 0.1,
131
- max_delay: 60.0,
132
- multiplier: 1.3,
133
- retry_codes: [14, 4]
114
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
134
115
  }
135
116
 
136
117
  default_config.rpcs.list_node_pools.timeout = 20.0
137
118
  default_config.rpcs.list_node_pools.retry_policy = {
138
- initial_delay: 0.1,
139
- max_delay: 60.0,
140
- multiplier: 1.3,
141
- retry_codes: [14, 4]
119
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
142
120
  }
143
121
 
144
122
  default_config.rpcs.get_node_pool.timeout = 20.0
145
123
  default_config.rpcs.get_node_pool.retry_policy = {
146
- initial_delay: 0.1,
147
- max_delay: 60.0,
148
- multiplier: 1.3,
149
- retry_codes: [14, 4]
124
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
150
125
  }
151
126
 
152
127
  default_config.rpcs.create_node_pool.timeout = 45.0
153
128
 
154
129
  default_config.rpcs.delete_node_pool.timeout = 20.0
155
130
  default_config.rpcs.delete_node_pool.retry_policy = {
156
- initial_delay: 0.1,
157
- max_delay: 60.0,
158
- multiplier: 1.3,
159
- retry_codes: [14, 4]
131
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
160
132
  }
161
133
 
162
134
  default_config.rpcs.rollback_node_pool_upgrade.timeout = 45.0
@@ -206,19 +178,15 @@ module Google
206
178
  ##
207
179
  # Create a new ClusterManager client object.
208
180
  #
209
- # ## Examples
210
- #
211
- # To create a new ClusterManager client with the default
212
- # configuration:
213
- #
214
- # client = ::Google::Cloud::Container::V1::ClusterManager::Client.new
181
+ # @example
215
182
  #
216
- # To create a new ClusterManager client with a custom
217
- # configuration:
183
+ # # Create a client using the default configuration
184
+ # client = ::Google::Cloud::Container::V1::ClusterManager::Client.new
218
185
  #
219
- # client = ::Google::Cloud::Container::V1::ClusterManager::Client.new do |config|
220
- # config.timeout = 10.0
221
- # end
186
+ # # Create a client using a custom configuration
187
+ # client = ::Google::Cloud::Container::V1::ClusterManager::Client.new do |config|
188
+ # config.timeout = 10.0
189
+ # end
222
190
  #
223
191
  # @yield [config] Configure the ClusterManager client.
224
192
  # @yieldparam config [Client::Configuration]
@@ -238,14 +206,13 @@ module Google
238
206
 
239
207
  # Create credentials
240
208
  credentials = @config.credentials
241
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
209
+ # Use self-signed JWT if the endpoint is unchanged from default,
242
210
  # but only if the default endpoint does not have a region prefix.
243
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
244
- @config.endpoint == Client.configure.endpoint &&
211
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
245
212
  !@config.endpoint.split(".").first.include?("-")
246
213
  credentials ||= Credentials.default scope: @config.scope,
247
214
  enable_self_signed_jwt: enable_self_signed_jwt
248
- if credentials.is_a?(String) || credentials.is_a?(Hash)
215
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
249
216
  credentials = Credentials.new credentials, scope: @config.scope
250
217
  end
251
218
  @quota_project_id = @config.quota_project
@@ -303,6 +270,21 @@ module Google
303
270
  #
304
271
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
305
272
  #
273
+ # @example Basic example
274
+ # require "google/cloud/container/v1"
275
+ #
276
+ # # Create a client object. The client can be reused for multiple calls.
277
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
278
+ #
279
+ # # Create a request. To set request fields, pass in keyword arguments.
280
+ # request = Google::Cloud::Container::V1::ListClustersRequest.new
281
+ #
282
+ # # Call the list_clusters method.
283
+ # result = client.list_clusters request
284
+ #
285
+ # # The returned object is of type Google::Cloud::Container::V1::ListClustersResponse.
286
+ # p result
287
+ #
306
288
  def list_clusters request, options = nil
307
289
  raise ::ArgumentError, "request must be provided" if request.nil?
308
290
 
@@ -320,16 +302,20 @@ module Google
320
302
  gapic_version: ::Google::Cloud::Container::V1::VERSION
321
303
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
322
304
 
323
- header_params = {
324
- "parent" => request.parent
325
- }
305
+ header_params = {}
306
+ if request.parent
307
+ header_params["parent"] = request.parent
308
+ end
309
+
326
310
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
327
311
  metadata[:"x-goog-request-params"] ||= request_params_header
328
312
 
329
313
  options.apply_defaults timeout: @config.rpcs.list_clusters.timeout,
330
314
  metadata: metadata,
331
315
  retry_policy: @config.rpcs.list_clusters.retry_policy
332
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
333
319
  retry_policy: @config.retry_policy
334
320
 
335
321
  @cluster_manager_stub.call_rpc :list_clusters, request, options: options do |response, operation|
@@ -382,6 +368,21 @@ module Google
382
368
  #
383
369
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
384
370
  #
371
+ # @example Basic example
372
+ # require "google/cloud/container/v1"
373
+ #
374
+ # # Create a client object. The client can be reused for multiple calls.
375
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
376
+ #
377
+ # # Create a request. To set request fields, pass in keyword arguments.
378
+ # request = Google::Cloud::Container::V1::GetClusterRequest.new
379
+ #
380
+ # # Call the get_cluster method.
381
+ # result = client.get_cluster request
382
+ #
383
+ # # The returned object is of type Google::Cloud::Container::V1::Cluster.
384
+ # p result
385
+ #
385
386
  def get_cluster request, options = nil
386
387
  raise ::ArgumentError, "request must be provided" if request.nil?
387
388
 
@@ -399,16 +400,20 @@ module Google
399
400
  gapic_version: ::Google::Cloud::Container::V1::VERSION
400
401
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
401
402
 
402
- header_params = {
403
- "name" => request.name
404
- }
403
+ header_params = {}
404
+ if request.name
405
+ header_params["name"] = request.name
406
+ end
407
+
405
408
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
406
409
  metadata[:"x-goog-request-params"] ||= request_params_header
407
410
 
408
411
  options.apply_defaults timeout: @config.rpcs.get_cluster.timeout,
409
412
  metadata: metadata,
410
413
  retry_policy: @config.rpcs.get_cluster.retry_policy
411
- options.apply_defaults metadata: @config.metadata,
414
+
415
+ options.apply_defaults timeout: @config.timeout,
416
+ metadata: @config.metadata,
412
417
  retry_policy: @config.retry_policy
413
418
 
414
419
  @cluster_manager_stub.call_rpc :get_cluster, request, options: options do |response, operation|
@@ -474,6 +479,21 @@ module Google
474
479
  #
475
480
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
476
481
  #
482
+ # @example Basic example
483
+ # require "google/cloud/container/v1"
484
+ #
485
+ # # Create a client object. The client can be reused for multiple calls.
486
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
487
+ #
488
+ # # Create a request. To set request fields, pass in keyword arguments.
489
+ # request = Google::Cloud::Container::V1::CreateClusterRequest.new
490
+ #
491
+ # # Call the create_cluster method.
492
+ # result = client.create_cluster request
493
+ #
494
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
495
+ # p result
496
+ #
477
497
  def create_cluster request, options = nil
478
498
  raise ::ArgumentError, "request must be provided" if request.nil?
479
499
 
@@ -491,16 +511,20 @@ module Google
491
511
  gapic_version: ::Google::Cloud::Container::V1::VERSION
492
512
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
493
513
 
494
- header_params = {
495
- "parent" => request.parent
496
- }
514
+ header_params = {}
515
+ if request.parent
516
+ header_params["parent"] = request.parent
517
+ end
518
+
497
519
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
498
520
  metadata[:"x-goog-request-params"] ||= request_params_header
499
521
 
500
522
  options.apply_defaults timeout: @config.rpcs.create_cluster.timeout,
501
523
  metadata: metadata,
502
524
  retry_policy: @config.rpcs.create_cluster.retry_policy
503
- options.apply_defaults metadata: @config.metadata,
525
+
526
+ options.apply_defaults timeout: @config.timeout,
527
+ metadata: @config.metadata,
504
528
  retry_policy: @config.retry_policy
505
529
 
506
530
  @cluster_manager_stub.call_rpc :create_cluster, request, options: options do |response, operation|
@@ -555,6 +579,21 @@ module Google
555
579
  #
556
580
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
557
581
  #
582
+ # @example Basic example
583
+ # require "google/cloud/container/v1"
584
+ #
585
+ # # Create a client object. The client can be reused for multiple calls.
586
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
587
+ #
588
+ # # Create a request. To set request fields, pass in keyword arguments.
589
+ # request = Google::Cloud::Container::V1::UpdateClusterRequest.new
590
+ #
591
+ # # Call the update_cluster method.
592
+ # result = client.update_cluster request
593
+ #
594
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
595
+ # p result
596
+ #
558
597
  def update_cluster request, options = nil
559
598
  raise ::ArgumentError, "request must be provided" if request.nil?
560
599
 
@@ -572,16 +611,20 @@ module Google
572
611
  gapic_version: ::Google::Cloud::Container::V1::VERSION
573
612
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
574
613
 
575
- header_params = {
576
- "name" => request.name
577
- }
614
+ header_params = {}
615
+ if request.name
616
+ header_params["name"] = request.name
617
+ end
618
+
578
619
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
579
620
  metadata[:"x-goog-request-params"] ||= request_params_header
580
621
 
581
622
  options.apply_defaults timeout: @config.rpcs.update_cluster.timeout,
582
623
  metadata: metadata,
583
624
  retry_policy: @config.rpcs.update_cluster.retry_policy
584
- options.apply_defaults metadata: @config.metadata,
625
+
626
+ options.apply_defaults timeout: @config.timeout,
627
+ metadata: @config.metadata,
585
628
  retry_policy: @config.retry_policy
586
629
 
587
630
  @cluster_manager_stub.call_rpc :update_cluster, request, options: options do |response, operation|
@@ -662,6 +705,21 @@ module Google
662
705
  #
663
706
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
664
707
  #
708
+ # @example Basic example
709
+ # require "google/cloud/container/v1"
710
+ #
711
+ # # Create a client object. The client can be reused for multiple calls.
712
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
713
+ #
714
+ # # Create a request. To set request fields, pass in keyword arguments.
715
+ # request = Google::Cloud::Container::V1::UpdateNodePoolRequest.new
716
+ #
717
+ # # Call the update_node_pool method.
718
+ # result = client.update_node_pool request
719
+ #
720
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
721
+ # p result
722
+ #
665
723
  def update_node_pool request, options = nil
666
724
  raise ::ArgumentError, "request must be provided" if request.nil?
667
725
 
@@ -679,16 +737,20 @@ module Google
679
737
  gapic_version: ::Google::Cloud::Container::V1::VERSION
680
738
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
681
739
 
682
- header_params = {
683
- "name" => request.name
684
- }
740
+ header_params = {}
741
+ if request.name
742
+ header_params["name"] = request.name
743
+ end
744
+
685
745
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
686
746
  metadata[:"x-goog-request-params"] ||= request_params_header
687
747
 
688
748
  options.apply_defaults timeout: @config.rpcs.update_node_pool.timeout,
689
749
  metadata: metadata,
690
750
  retry_policy: @config.rpcs.update_node_pool.retry_policy
691
- options.apply_defaults metadata: @config.metadata,
751
+
752
+ options.apply_defaults timeout: @config.timeout,
753
+ metadata: @config.metadata,
692
754
  retry_policy: @config.retry_policy
693
755
 
694
756
  @cluster_manager_stub.call_rpc :update_node_pool, request, options: options do |response, operation|
@@ -747,6 +809,21 @@ module Google
747
809
  #
748
810
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
749
811
  #
812
+ # @example Basic example
813
+ # require "google/cloud/container/v1"
814
+ #
815
+ # # Create a client object. The client can be reused for multiple calls.
816
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
817
+ #
818
+ # # Create a request. To set request fields, pass in keyword arguments.
819
+ # request = Google::Cloud::Container::V1::SetNodePoolAutoscalingRequest.new
820
+ #
821
+ # # Call the set_node_pool_autoscaling method.
822
+ # result = client.set_node_pool_autoscaling request
823
+ #
824
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
825
+ # p result
826
+ #
750
827
  def set_node_pool_autoscaling request, options = nil
751
828
  raise ::ArgumentError, "request must be provided" if request.nil?
752
829
 
@@ -764,16 +841,20 @@ module Google
764
841
  gapic_version: ::Google::Cloud::Container::V1::VERSION
765
842
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
766
843
 
767
- header_params = {
768
- "name" => request.name
769
- }
844
+ header_params = {}
845
+ if request.name
846
+ header_params["name"] = request.name
847
+ end
848
+
770
849
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
771
850
  metadata[:"x-goog-request-params"] ||= request_params_header
772
851
 
773
852
  options.apply_defaults timeout: @config.rpcs.set_node_pool_autoscaling.timeout,
774
853
  metadata: metadata,
775
854
  retry_policy: @config.rpcs.set_node_pool_autoscaling.retry_policy
776
- options.apply_defaults metadata: @config.metadata,
855
+
856
+ options.apply_defaults timeout: @config.timeout,
857
+ metadata: @config.metadata,
777
858
  retry_policy: @config.retry_policy
778
859
 
779
860
  @cluster_manager_stub.call_rpc :set_node_pool_autoscaling, request, options: options do |response, operation|
@@ -838,6 +919,21 @@ module Google
838
919
  #
839
920
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
840
921
  #
922
+ # @example Basic example
923
+ # require "google/cloud/container/v1"
924
+ #
925
+ # # Create a client object. The client can be reused for multiple calls.
926
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
927
+ #
928
+ # # Create a request. To set request fields, pass in keyword arguments.
929
+ # request = Google::Cloud::Container::V1::SetLoggingServiceRequest.new
930
+ #
931
+ # # Call the set_logging_service method.
932
+ # result = client.set_logging_service request
933
+ #
934
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
935
+ # p result
936
+ #
841
937
  def set_logging_service request, options = nil
842
938
  raise ::ArgumentError, "request must be provided" if request.nil?
843
939
 
@@ -855,16 +951,20 @@ module Google
855
951
  gapic_version: ::Google::Cloud::Container::V1::VERSION
856
952
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
857
953
 
858
- header_params = {
859
- "name" => request.name
860
- }
954
+ header_params = {}
955
+ if request.name
956
+ header_params["name"] = request.name
957
+ end
958
+
861
959
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
862
960
  metadata[:"x-goog-request-params"] ||= request_params_header
863
961
 
864
962
  options.apply_defaults timeout: @config.rpcs.set_logging_service.timeout,
865
963
  metadata: metadata,
866
964
  retry_policy: @config.rpcs.set_logging_service.retry_policy
867
- options.apply_defaults metadata: @config.metadata,
965
+
966
+ options.apply_defaults timeout: @config.timeout,
967
+ metadata: @config.metadata,
868
968
  retry_policy: @config.retry_policy
869
969
 
870
970
  @cluster_manager_stub.call_rpc :set_logging_service, request, options: options do |response, operation|
@@ -929,6 +1029,21 @@ module Google
929
1029
  #
930
1030
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
931
1031
  #
1032
+ # @example Basic example
1033
+ # require "google/cloud/container/v1"
1034
+ #
1035
+ # # Create a client object. The client can be reused for multiple calls.
1036
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1037
+ #
1038
+ # # Create a request. To set request fields, pass in keyword arguments.
1039
+ # request = Google::Cloud::Container::V1::SetMonitoringServiceRequest.new
1040
+ #
1041
+ # # Call the set_monitoring_service method.
1042
+ # result = client.set_monitoring_service request
1043
+ #
1044
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
1045
+ # p result
1046
+ #
932
1047
  def set_monitoring_service request, options = nil
933
1048
  raise ::ArgumentError, "request must be provided" if request.nil?
934
1049
 
@@ -946,16 +1061,20 @@ module Google
946
1061
  gapic_version: ::Google::Cloud::Container::V1::VERSION
947
1062
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
948
1063
 
949
- header_params = {
950
- "name" => request.name
951
- }
1064
+ header_params = {}
1065
+ if request.name
1066
+ header_params["name"] = request.name
1067
+ end
1068
+
952
1069
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
953
1070
  metadata[:"x-goog-request-params"] ||= request_params_header
954
1071
 
955
1072
  options.apply_defaults timeout: @config.rpcs.set_monitoring_service.timeout,
956
1073
  metadata: metadata,
957
1074
  retry_policy: @config.rpcs.set_monitoring_service.retry_policy
958
- options.apply_defaults metadata: @config.metadata,
1075
+
1076
+ options.apply_defaults timeout: @config.timeout,
1077
+ metadata: @config.metadata,
959
1078
  retry_policy: @config.retry_policy
960
1079
 
961
1080
  @cluster_manager_stub.call_rpc :set_monitoring_service, request, options: options do |response, operation|
@@ -1011,6 +1130,21 @@ module Google
1011
1130
  #
1012
1131
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1013
1132
  #
1133
+ # @example Basic example
1134
+ # require "google/cloud/container/v1"
1135
+ #
1136
+ # # Create a client object. The client can be reused for multiple calls.
1137
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1138
+ #
1139
+ # # Create a request. To set request fields, pass in keyword arguments.
1140
+ # request = Google::Cloud::Container::V1::SetAddonsConfigRequest.new
1141
+ #
1142
+ # # Call the set_addons_config method.
1143
+ # result = client.set_addons_config request
1144
+ #
1145
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
1146
+ # p result
1147
+ #
1014
1148
  def set_addons_config request, options = nil
1015
1149
  raise ::ArgumentError, "request must be provided" if request.nil?
1016
1150
 
@@ -1028,16 +1162,20 @@ module Google
1028
1162
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1029
1163
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1030
1164
 
1031
- header_params = {
1032
- "name" => request.name
1033
- }
1165
+ header_params = {}
1166
+ if request.name
1167
+ header_params["name"] = request.name
1168
+ end
1169
+
1034
1170
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1035
1171
  metadata[:"x-goog-request-params"] ||= request_params_header
1036
1172
 
1037
1173
  options.apply_defaults timeout: @config.rpcs.set_addons_config.timeout,
1038
1174
  metadata: metadata,
1039
1175
  retry_policy: @config.rpcs.set_addons_config.retry_policy
1040
- options.apply_defaults metadata: @config.metadata,
1176
+
1177
+ options.apply_defaults timeout: @config.timeout,
1178
+ metadata: @config.metadata,
1041
1179
  retry_policy: @config.retry_policy
1042
1180
 
1043
1181
  @cluster_manager_stub.call_rpc :set_addons_config, request, options: options do |response, operation|
@@ -1054,6 +1192,8 @@ module Google
1054
1192
  # [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update)
1055
1193
  # instead.
1056
1194
  #
1195
+ # @deprecated This method is deprecated and may be removed in the next major version update.
1196
+ #
1057
1197
  # @overload set_locations(request, options = nil)
1058
1198
  # Pass arguments to `set_locations` via a request object, either of type
1059
1199
  # {::Google::Cloud::Container::V1::SetLocationsRequest} or an equivalent Hash.
@@ -1101,6 +1241,21 @@ module Google
1101
1241
  #
1102
1242
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1103
1243
  #
1244
+ # @example Basic example
1245
+ # require "google/cloud/container/v1"
1246
+ #
1247
+ # # Create a client object. The client can be reused for multiple calls.
1248
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1249
+ #
1250
+ # # Create a request. To set request fields, pass in keyword arguments.
1251
+ # request = Google::Cloud::Container::V1::SetLocationsRequest.new
1252
+ #
1253
+ # # Call the set_locations method.
1254
+ # result = client.set_locations request
1255
+ #
1256
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
1257
+ # p result
1258
+ #
1104
1259
  def set_locations request, options = nil
1105
1260
  raise ::ArgumentError, "request must be provided" if request.nil?
1106
1261
 
@@ -1118,16 +1273,20 @@ module Google
1118
1273
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1119
1274
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1120
1275
 
1121
- header_params = {
1122
- "name" => request.name
1123
- }
1276
+ header_params = {}
1277
+ if request.name
1278
+ header_params["name"] = request.name
1279
+ end
1280
+
1124
1281
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1125
1282
  metadata[:"x-goog-request-params"] ||= request_params_header
1126
1283
 
1127
1284
  options.apply_defaults timeout: @config.rpcs.set_locations.timeout,
1128
1285
  metadata: metadata,
1129
1286
  retry_policy: @config.rpcs.set_locations.retry_policy
1130
- options.apply_defaults metadata: @config.metadata,
1287
+
1288
+ options.apply_defaults timeout: @config.timeout,
1289
+ metadata: @config.metadata,
1131
1290
  retry_policy: @config.retry_policy
1132
1291
 
1133
1292
  @cluster_manager_stub.call_rpc :set_locations, request, options: options do |response, operation|
@@ -1191,6 +1350,21 @@ module Google
1191
1350
  #
1192
1351
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1193
1352
  #
1353
+ # @example Basic example
1354
+ # require "google/cloud/container/v1"
1355
+ #
1356
+ # # Create a client object. The client can be reused for multiple calls.
1357
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1358
+ #
1359
+ # # Create a request. To set request fields, pass in keyword arguments.
1360
+ # request = Google::Cloud::Container::V1::UpdateMasterRequest.new
1361
+ #
1362
+ # # Call the update_master method.
1363
+ # result = client.update_master request
1364
+ #
1365
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
1366
+ # p result
1367
+ #
1194
1368
  def update_master request, options = nil
1195
1369
  raise ::ArgumentError, "request must be provided" if request.nil?
1196
1370
 
@@ -1208,16 +1382,20 @@ module Google
1208
1382
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1209
1383
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1210
1384
 
1211
- header_params = {
1212
- "name" => request.name
1213
- }
1385
+ header_params = {}
1386
+ if request.name
1387
+ header_params["name"] = request.name
1388
+ end
1389
+
1214
1390
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1215
1391
  metadata[:"x-goog-request-params"] ||= request_params_header
1216
1392
 
1217
1393
  options.apply_defaults timeout: @config.rpcs.update_master.timeout,
1218
1394
  metadata: metadata,
1219
1395
  retry_policy: @config.rpcs.update_master.retry_policy
1220
- options.apply_defaults metadata: @config.metadata,
1396
+
1397
+ options.apply_defaults timeout: @config.timeout,
1398
+ metadata: @config.metadata,
1221
1399
  retry_policy: @config.retry_policy
1222
1400
 
1223
1401
  @cluster_manager_stub.call_rpc :update_master, request, options: options do |response, operation|
@@ -1276,6 +1454,21 @@ module Google
1276
1454
  #
1277
1455
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1278
1456
  #
1457
+ # @example Basic example
1458
+ # require "google/cloud/container/v1"
1459
+ #
1460
+ # # Create a client object. The client can be reused for multiple calls.
1461
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1462
+ #
1463
+ # # Create a request. To set request fields, pass in keyword arguments.
1464
+ # request = Google::Cloud::Container::V1::SetMasterAuthRequest.new
1465
+ #
1466
+ # # Call the set_master_auth method.
1467
+ # result = client.set_master_auth request
1468
+ #
1469
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
1470
+ # p result
1471
+ #
1279
1472
  def set_master_auth request, options = nil
1280
1473
  raise ::ArgumentError, "request must be provided" if request.nil?
1281
1474
 
@@ -1293,16 +1486,20 @@ module Google
1293
1486
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1294
1487
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1295
1488
 
1296
- header_params = {
1297
- "name" => request.name
1298
- }
1489
+ header_params = {}
1490
+ if request.name
1491
+ header_params["name"] = request.name
1492
+ end
1493
+
1299
1494
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1300
1495
  metadata[:"x-goog-request-params"] ||= request_params_header
1301
1496
 
1302
1497
  options.apply_defaults timeout: @config.rpcs.set_master_auth.timeout,
1303
1498
  metadata: metadata,
1304
1499
  retry_policy: @config.rpcs.set_master_auth.retry_policy
1305
- options.apply_defaults metadata: @config.metadata,
1500
+
1501
+ options.apply_defaults timeout: @config.timeout,
1502
+ metadata: @config.metadata,
1306
1503
  retry_policy: @config.retry_policy
1307
1504
 
1308
1505
  @cluster_manager_stub.call_rpc :set_master_auth, request, options: options do |response, operation|
@@ -1363,6 +1560,21 @@ module Google
1363
1560
  #
1364
1561
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1365
1562
  #
1563
+ # @example Basic example
1564
+ # require "google/cloud/container/v1"
1565
+ #
1566
+ # # Create a client object. The client can be reused for multiple calls.
1567
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1568
+ #
1569
+ # # Create a request. To set request fields, pass in keyword arguments.
1570
+ # request = Google::Cloud::Container::V1::DeleteClusterRequest.new
1571
+ #
1572
+ # # Call the delete_cluster method.
1573
+ # result = client.delete_cluster request
1574
+ #
1575
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
1576
+ # p result
1577
+ #
1366
1578
  def delete_cluster request, options = nil
1367
1579
  raise ::ArgumentError, "request must be provided" if request.nil?
1368
1580
 
@@ -1380,16 +1592,20 @@ module Google
1380
1592
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1381
1593
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1382
1594
 
1383
- header_params = {
1384
- "name" => request.name
1385
- }
1595
+ header_params = {}
1596
+ if request.name
1597
+ header_params["name"] = request.name
1598
+ end
1599
+
1386
1600
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1387
1601
  metadata[:"x-goog-request-params"] ||= request_params_header
1388
1602
 
1389
1603
  options.apply_defaults timeout: @config.rpcs.delete_cluster.timeout,
1390
1604
  metadata: metadata,
1391
1605
  retry_policy: @config.rpcs.delete_cluster.retry_policy
1392
- options.apply_defaults metadata: @config.metadata,
1606
+
1607
+ options.apply_defaults timeout: @config.timeout,
1608
+ metadata: @config.metadata,
1393
1609
  retry_policy: @config.retry_policy
1394
1610
 
1395
1611
  @cluster_manager_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
@@ -1440,6 +1656,21 @@ module Google
1440
1656
  #
1441
1657
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1442
1658
  #
1659
+ # @example Basic example
1660
+ # require "google/cloud/container/v1"
1661
+ #
1662
+ # # Create a client object. The client can be reused for multiple calls.
1663
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1664
+ #
1665
+ # # Create a request. To set request fields, pass in keyword arguments.
1666
+ # request = Google::Cloud::Container::V1::ListOperationsRequest.new
1667
+ #
1668
+ # # Call the list_operations method.
1669
+ # result = client.list_operations request
1670
+ #
1671
+ # # The returned object is of type Google::Cloud::Container::V1::ListOperationsResponse.
1672
+ # p result
1673
+ #
1443
1674
  def list_operations request, options = nil
1444
1675
  raise ::ArgumentError, "request must be provided" if request.nil?
1445
1676
 
@@ -1457,16 +1688,20 @@ module Google
1457
1688
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1458
1689
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1459
1690
 
1460
- header_params = {
1461
- "parent" => request.parent
1462
- }
1691
+ header_params = {}
1692
+ if request.parent
1693
+ header_params["parent"] = request.parent
1694
+ end
1695
+
1463
1696
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1464
1697
  metadata[:"x-goog-request-params"] ||= request_params_header
1465
1698
 
1466
1699
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
1467
1700
  metadata: metadata,
1468
1701
  retry_policy: @config.rpcs.list_operations.retry_policy
1469
- options.apply_defaults metadata: @config.metadata,
1702
+
1703
+ options.apply_defaults timeout: @config.timeout,
1704
+ metadata: @config.metadata,
1470
1705
  retry_policy: @config.retry_policy
1471
1706
 
1472
1707
  @cluster_manager_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -1519,6 +1754,21 @@ module Google
1519
1754
  #
1520
1755
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1521
1756
  #
1757
+ # @example Basic example
1758
+ # require "google/cloud/container/v1"
1759
+ #
1760
+ # # Create a client object. The client can be reused for multiple calls.
1761
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1762
+ #
1763
+ # # Create a request. To set request fields, pass in keyword arguments.
1764
+ # request = Google::Cloud::Container::V1::GetOperationRequest.new
1765
+ #
1766
+ # # Call the get_operation method.
1767
+ # result = client.get_operation request
1768
+ #
1769
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
1770
+ # p result
1771
+ #
1522
1772
  def get_operation request, options = nil
1523
1773
  raise ::ArgumentError, "request must be provided" if request.nil?
1524
1774
 
@@ -1536,16 +1786,20 @@ module Google
1536
1786
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1537
1787
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1538
1788
 
1539
- header_params = {
1540
- "name" => request.name
1541
- }
1789
+ header_params = {}
1790
+ if request.name
1791
+ header_params["name"] = request.name
1792
+ end
1793
+
1542
1794
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1543
1795
  metadata[:"x-goog-request-params"] ||= request_params_header
1544
1796
 
1545
1797
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
1546
1798
  metadata: metadata,
1547
1799
  retry_policy: @config.rpcs.get_operation.retry_policy
1548
- options.apply_defaults metadata: @config.metadata,
1800
+
1801
+ options.apply_defaults timeout: @config.timeout,
1802
+ metadata: @config.metadata,
1549
1803
  retry_policy: @config.retry_policy
1550
1804
 
1551
1805
  @cluster_manager_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -1598,6 +1852,21 @@ module Google
1598
1852
  #
1599
1853
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1600
1854
  #
1855
+ # @example Basic example
1856
+ # require "google/cloud/container/v1"
1857
+ #
1858
+ # # Create a client object. The client can be reused for multiple calls.
1859
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1860
+ #
1861
+ # # Create a request. To set request fields, pass in keyword arguments.
1862
+ # request = Google::Cloud::Container::V1::CancelOperationRequest.new
1863
+ #
1864
+ # # Call the cancel_operation method.
1865
+ # result = client.cancel_operation request
1866
+ #
1867
+ # # The returned object is of type Google::Protobuf::Empty.
1868
+ # p result
1869
+ #
1601
1870
  def cancel_operation request, options = nil
1602
1871
  raise ::ArgumentError, "request must be provided" if request.nil?
1603
1872
 
@@ -1615,16 +1884,20 @@ module Google
1615
1884
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1616
1885
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1617
1886
 
1618
- header_params = {
1619
- "name" => request.name
1620
- }
1887
+ header_params = {}
1888
+ if request.name
1889
+ header_params["name"] = request.name
1890
+ end
1891
+
1621
1892
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1622
1893
  metadata[:"x-goog-request-params"] ||= request_params_header
1623
1894
 
1624
1895
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
1625
1896
  metadata: metadata,
1626
1897
  retry_policy: @config.rpcs.cancel_operation.retry_policy
1627
- options.apply_defaults metadata: @config.metadata,
1898
+
1899
+ options.apply_defaults timeout: @config.timeout,
1900
+ metadata: @config.metadata,
1628
1901
  retry_policy: @config.retry_policy
1629
1902
 
1630
1903
  @cluster_manager_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -1674,6 +1947,21 @@ module Google
1674
1947
  #
1675
1948
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1676
1949
  #
1950
+ # @example Basic example
1951
+ # require "google/cloud/container/v1"
1952
+ #
1953
+ # # Create a client object. The client can be reused for multiple calls.
1954
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
1955
+ #
1956
+ # # Create a request. To set request fields, pass in keyword arguments.
1957
+ # request = Google::Cloud::Container::V1::GetServerConfigRequest.new
1958
+ #
1959
+ # # Call the get_server_config method.
1960
+ # result = client.get_server_config request
1961
+ #
1962
+ # # The returned object is of type Google::Cloud::Container::V1::ServerConfig.
1963
+ # p result
1964
+ #
1677
1965
  def get_server_config request, options = nil
1678
1966
  raise ::ArgumentError, "request must be provided" if request.nil?
1679
1967
 
@@ -1691,16 +1979,20 @@ module Google
1691
1979
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1692
1980
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1693
1981
 
1694
- header_params = {
1695
- "name" => request.name
1696
- }
1982
+ header_params = {}
1983
+ if request.name
1984
+ header_params["name"] = request.name
1985
+ end
1986
+
1697
1987
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1698
1988
  metadata[:"x-goog-request-params"] ||= request_params_header
1699
1989
 
1700
1990
  options.apply_defaults timeout: @config.rpcs.get_server_config.timeout,
1701
1991
  metadata: metadata,
1702
1992
  retry_policy: @config.rpcs.get_server_config.retry_policy
1703
- options.apply_defaults metadata: @config.metadata,
1993
+
1994
+ options.apply_defaults timeout: @config.timeout,
1995
+ metadata: @config.metadata,
1704
1996
  retry_policy: @config.retry_policy
1705
1997
 
1706
1998
  @cluster_manager_stub.call_rpc :get_server_config, request, options: options do |response, operation|
@@ -1744,6 +2036,21 @@ module Google
1744
2036
  #
1745
2037
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1746
2038
  #
2039
+ # @example Basic example
2040
+ # require "google/cloud/container/v1"
2041
+ #
2042
+ # # Create a client object. The client can be reused for multiple calls.
2043
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2044
+ #
2045
+ # # Create a request. To set request fields, pass in keyword arguments.
2046
+ # request = Google::Cloud::Container::V1::GetJSONWebKeysRequest.new
2047
+ #
2048
+ # # Call the get_json_web_keys method.
2049
+ # result = client.get_json_web_keys request
2050
+ #
2051
+ # # The returned object is of type Google::Cloud::Container::V1::GetJSONWebKeysResponse.
2052
+ # p result
2053
+ #
1747
2054
  def get_json_web_keys request, options = nil
1748
2055
  raise ::ArgumentError, "request must be provided" if request.nil?
1749
2056
 
@@ -1761,16 +2068,20 @@ module Google
1761
2068
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1762
2069
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1763
2070
 
1764
- header_params = {
1765
- "parent" => request.parent
1766
- }
2071
+ header_params = {}
2072
+ if request.parent
2073
+ header_params["parent"] = request.parent
2074
+ end
2075
+
1767
2076
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1768
2077
  metadata[:"x-goog-request-params"] ||= request_params_header
1769
2078
 
1770
2079
  options.apply_defaults timeout: @config.rpcs.get_json_web_keys.timeout,
1771
2080
  metadata: metadata,
1772
2081
  retry_policy: @config.rpcs.get_json_web_keys.retry_policy
1773
- options.apply_defaults metadata: @config.metadata,
2082
+
2083
+ options.apply_defaults timeout: @config.timeout,
2084
+ metadata: @config.metadata,
1774
2085
  retry_policy: @config.retry_policy
1775
2086
 
1776
2087
  @cluster_manager_stub.call_rpc :get_json_web_keys, request, options: options do |response, operation|
@@ -1823,6 +2134,21 @@ module Google
1823
2134
  #
1824
2135
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1825
2136
  #
2137
+ # @example Basic example
2138
+ # require "google/cloud/container/v1"
2139
+ #
2140
+ # # Create a client object. The client can be reused for multiple calls.
2141
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2142
+ #
2143
+ # # Create a request. To set request fields, pass in keyword arguments.
2144
+ # request = Google::Cloud::Container::V1::ListNodePoolsRequest.new
2145
+ #
2146
+ # # Call the list_node_pools method.
2147
+ # result = client.list_node_pools request
2148
+ #
2149
+ # # The returned object is of type Google::Cloud::Container::V1::ListNodePoolsResponse.
2150
+ # p result
2151
+ #
1826
2152
  def list_node_pools request, options = nil
1827
2153
  raise ::ArgumentError, "request must be provided" if request.nil?
1828
2154
 
@@ -1840,16 +2166,20 @@ module Google
1840
2166
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1841
2167
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1842
2168
 
1843
- header_params = {
1844
- "parent" => request.parent
1845
- }
2169
+ header_params = {}
2170
+ if request.parent
2171
+ header_params["parent"] = request.parent
2172
+ end
2173
+
1846
2174
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1847
2175
  metadata[:"x-goog-request-params"] ||= request_params_header
1848
2176
 
1849
2177
  options.apply_defaults timeout: @config.rpcs.list_node_pools.timeout,
1850
2178
  metadata: metadata,
1851
2179
  retry_policy: @config.rpcs.list_node_pools.retry_policy
1852
- options.apply_defaults metadata: @config.metadata,
2180
+
2181
+ options.apply_defaults timeout: @config.timeout,
2182
+ metadata: @config.metadata,
1853
2183
  retry_policy: @config.retry_policy
1854
2184
 
1855
2185
  @cluster_manager_stub.call_rpc :list_node_pools, request, options: options do |response, operation|
@@ -1906,6 +2236,21 @@ module Google
1906
2236
  #
1907
2237
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1908
2238
  #
2239
+ # @example Basic example
2240
+ # require "google/cloud/container/v1"
2241
+ #
2242
+ # # Create a client object. The client can be reused for multiple calls.
2243
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2244
+ #
2245
+ # # Create a request. To set request fields, pass in keyword arguments.
2246
+ # request = Google::Cloud::Container::V1::GetNodePoolRequest.new
2247
+ #
2248
+ # # Call the get_node_pool method.
2249
+ # result = client.get_node_pool request
2250
+ #
2251
+ # # The returned object is of type Google::Cloud::Container::V1::NodePool.
2252
+ # p result
2253
+ #
1909
2254
  def get_node_pool request, options = nil
1910
2255
  raise ::ArgumentError, "request must be provided" if request.nil?
1911
2256
 
@@ -1923,16 +2268,20 @@ module Google
1923
2268
  gapic_version: ::Google::Cloud::Container::V1::VERSION
1924
2269
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1925
2270
 
1926
- header_params = {
1927
- "name" => request.name
1928
- }
2271
+ header_params = {}
2272
+ if request.name
2273
+ header_params["name"] = request.name
2274
+ end
2275
+
1929
2276
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1930
2277
  metadata[:"x-goog-request-params"] ||= request_params_header
1931
2278
 
1932
2279
  options.apply_defaults timeout: @config.rpcs.get_node_pool.timeout,
1933
2280
  metadata: metadata,
1934
2281
  retry_policy: @config.rpcs.get_node_pool.retry_policy
1935
- options.apply_defaults metadata: @config.metadata,
2282
+
2283
+ options.apply_defaults timeout: @config.timeout,
2284
+ metadata: @config.metadata,
1936
2285
  retry_policy: @config.retry_policy
1937
2286
 
1938
2287
  @cluster_manager_stub.call_rpc :get_node_pool, request, options: options do |response, operation|
@@ -1988,6 +2337,21 @@ module Google
1988
2337
  #
1989
2338
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1990
2339
  #
2340
+ # @example Basic example
2341
+ # require "google/cloud/container/v1"
2342
+ #
2343
+ # # Create a client object. The client can be reused for multiple calls.
2344
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2345
+ #
2346
+ # # Create a request. To set request fields, pass in keyword arguments.
2347
+ # request = Google::Cloud::Container::V1::CreateNodePoolRequest.new
2348
+ #
2349
+ # # Call the create_node_pool method.
2350
+ # result = client.create_node_pool request
2351
+ #
2352
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
2353
+ # p result
2354
+ #
1991
2355
  def create_node_pool request, options = nil
1992
2356
  raise ::ArgumentError, "request must be provided" if request.nil?
1993
2357
 
@@ -2005,16 +2369,20 @@ module Google
2005
2369
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2006
2370
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2007
2371
 
2008
- header_params = {
2009
- "parent" => request.parent
2010
- }
2372
+ header_params = {}
2373
+ if request.parent
2374
+ header_params["parent"] = request.parent
2375
+ end
2376
+
2011
2377
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2012
2378
  metadata[:"x-goog-request-params"] ||= request_params_header
2013
2379
 
2014
2380
  options.apply_defaults timeout: @config.rpcs.create_node_pool.timeout,
2015
2381
  metadata: metadata,
2016
2382
  retry_policy: @config.rpcs.create_node_pool.retry_policy
2017
- options.apply_defaults metadata: @config.metadata,
2383
+
2384
+ options.apply_defaults timeout: @config.timeout,
2385
+ metadata: @config.metadata,
2018
2386
  retry_policy: @config.retry_policy
2019
2387
 
2020
2388
  @cluster_manager_stub.call_rpc :create_node_pool, request, options: options do |response, operation|
@@ -2071,6 +2439,21 @@ module Google
2071
2439
  #
2072
2440
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2073
2441
  #
2442
+ # @example Basic example
2443
+ # require "google/cloud/container/v1"
2444
+ #
2445
+ # # Create a client object. The client can be reused for multiple calls.
2446
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2447
+ #
2448
+ # # Create a request. To set request fields, pass in keyword arguments.
2449
+ # request = Google::Cloud::Container::V1::DeleteNodePoolRequest.new
2450
+ #
2451
+ # # Call the delete_node_pool method.
2452
+ # result = client.delete_node_pool request
2453
+ #
2454
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
2455
+ # p result
2456
+ #
2074
2457
  def delete_node_pool request, options = nil
2075
2458
  raise ::ArgumentError, "request must be provided" if request.nil?
2076
2459
 
@@ -2088,16 +2471,20 @@ module Google
2088
2471
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2089
2472
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2090
2473
 
2091
- header_params = {
2092
- "name" => request.name
2093
- }
2474
+ header_params = {}
2475
+ if request.name
2476
+ header_params["name"] = request.name
2477
+ end
2478
+
2094
2479
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2095
2480
  metadata[:"x-goog-request-params"] ||= request_params_header
2096
2481
 
2097
2482
  options.apply_defaults timeout: @config.rpcs.delete_node_pool.timeout,
2098
2483
  metadata: metadata,
2099
2484
  retry_policy: @config.rpcs.delete_node_pool.retry_policy
2100
- options.apply_defaults metadata: @config.metadata,
2485
+
2486
+ options.apply_defaults timeout: @config.timeout,
2487
+ metadata: @config.metadata,
2101
2488
  retry_policy: @config.retry_policy
2102
2489
 
2103
2490
  @cluster_manager_stub.call_rpc :delete_node_pool, request, options: options do |response, operation|
@@ -2155,6 +2542,21 @@ module Google
2155
2542
  #
2156
2543
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2157
2544
  #
2545
+ # @example Basic example
2546
+ # require "google/cloud/container/v1"
2547
+ #
2548
+ # # Create a client object. The client can be reused for multiple calls.
2549
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2550
+ #
2551
+ # # Create a request. To set request fields, pass in keyword arguments.
2552
+ # request = Google::Cloud::Container::V1::RollbackNodePoolUpgradeRequest.new
2553
+ #
2554
+ # # Call the rollback_node_pool_upgrade method.
2555
+ # result = client.rollback_node_pool_upgrade request
2556
+ #
2557
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
2558
+ # p result
2559
+ #
2158
2560
  def rollback_node_pool_upgrade request, options = nil
2159
2561
  raise ::ArgumentError, "request must be provided" if request.nil?
2160
2562
 
@@ -2172,16 +2574,20 @@ module Google
2172
2574
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2173
2575
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2174
2576
 
2175
- header_params = {
2176
- "name" => request.name
2177
- }
2577
+ header_params = {}
2578
+ if request.name
2579
+ header_params["name"] = request.name
2580
+ end
2581
+
2178
2582
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2179
2583
  metadata[:"x-goog-request-params"] ||= request_params_header
2180
2584
 
2181
2585
  options.apply_defaults timeout: @config.rpcs.rollback_node_pool_upgrade.timeout,
2182
2586
  metadata: metadata,
2183
2587
  retry_policy: @config.rpcs.rollback_node_pool_upgrade.retry_policy
2184
- options.apply_defaults metadata: @config.metadata,
2588
+
2589
+ options.apply_defaults timeout: @config.timeout,
2590
+ metadata: @config.metadata,
2185
2591
  retry_policy: @config.retry_policy
2186
2592
 
2187
2593
  @cluster_manager_stub.call_rpc :rollback_node_pool_upgrade, request, options: options do |response, operation|
@@ -2240,6 +2646,21 @@ module Google
2240
2646
  #
2241
2647
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2242
2648
  #
2649
+ # @example Basic example
2650
+ # require "google/cloud/container/v1"
2651
+ #
2652
+ # # Create a client object. The client can be reused for multiple calls.
2653
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2654
+ #
2655
+ # # Create a request. To set request fields, pass in keyword arguments.
2656
+ # request = Google::Cloud::Container::V1::SetNodePoolManagementRequest.new
2657
+ #
2658
+ # # Call the set_node_pool_management method.
2659
+ # result = client.set_node_pool_management request
2660
+ #
2661
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
2662
+ # p result
2663
+ #
2243
2664
  def set_node_pool_management request, options = nil
2244
2665
  raise ::ArgumentError, "request must be provided" if request.nil?
2245
2666
 
@@ -2257,16 +2678,20 @@ module Google
2257
2678
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2258
2679
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2259
2680
 
2260
- header_params = {
2261
- "name" => request.name
2262
- }
2681
+ header_params = {}
2682
+ if request.name
2683
+ header_params["name"] = request.name
2684
+ end
2685
+
2263
2686
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2264
2687
  metadata[:"x-goog-request-params"] ||= request_params_header
2265
2688
 
2266
2689
  options.apply_defaults timeout: @config.rpcs.set_node_pool_management.timeout,
2267
2690
  metadata: metadata,
2268
2691
  retry_policy: @config.rpcs.set_node_pool_management.retry_policy
2269
- options.apply_defaults metadata: @config.metadata,
2692
+
2693
+ options.apply_defaults timeout: @config.timeout,
2694
+ metadata: @config.metadata,
2270
2695
  retry_policy: @config.retry_policy
2271
2696
 
2272
2697
  @cluster_manager_stub.call_rpc :set_node_pool_management, request, options: options do |response, operation|
@@ -2328,6 +2753,21 @@ module Google
2328
2753
  #
2329
2754
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2330
2755
  #
2756
+ # @example Basic example
2757
+ # require "google/cloud/container/v1"
2758
+ #
2759
+ # # Create a client object. The client can be reused for multiple calls.
2760
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2761
+ #
2762
+ # # Create a request. To set request fields, pass in keyword arguments.
2763
+ # request = Google::Cloud::Container::V1::SetLabelsRequest.new
2764
+ #
2765
+ # # Call the set_labels method.
2766
+ # result = client.set_labels request
2767
+ #
2768
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
2769
+ # p result
2770
+ #
2331
2771
  def set_labels request, options = nil
2332
2772
  raise ::ArgumentError, "request must be provided" if request.nil?
2333
2773
 
@@ -2345,16 +2785,20 @@ module Google
2345
2785
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2346
2786
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2347
2787
 
2348
- header_params = {
2349
- "name" => request.name
2350
- }
2788
+ header_params = {}
2789
+ if request.name
2790
+ header_params["name"] = request.name
2791
+ end
2792
+
2351
2793
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2352
2794
  metadata[:"x-goog-request-params"] ||= request_params_header
2353
2795
 
2354
2796
  options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
2355
2797
  metadata: metadata,
2356
2798
  retry_policy: @config.rpcs.set_labels.retry_policy
2357
- options.apply_defaults metadata: @config.metadata,
2799
+
2800
+ options.apply_defaults timeout: @config.timeout,
2801
+ metadata: @config.metadata,
2358
2802
  retry_policy: @config.retry_policy
2359
2803
 
2360
2804
  @cluster_manager_stub.call_rpc :set_labels, request, options: options do |response, operation|
@@ -2409,6 +2853,21 @@ module Google
2409
2853
  #
2410
2854
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2411
2855
  #
2856
+ # @example Basic example
2857
+ # require "google/cloud/container/v1"
2858
+ #
2859
+ # # Create a client object. The client can be reused for multiple calls.
2860
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2861
+ #
2862
+ # # Create a request. To set request fields, pass in keyword arguments.
2863
+ # request = Google::Cloud::Container::V1::SetLegacyAbacRequest.new
2864
+ #
2865
+ # # Call the set_legacy_abac method.
2866
+ # result = client.set_legacy_abac request
2867
+ #
2868
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
2869
+ # p result
2870
+ #
2412
2871
  def set_legacy_abac request, options = nil
2413
2872
  raise ::ArgumentError, "request must be provided" if request.nil?
2414
2873
 
@@ -2426,16 +2885,20 @@ module Google
2426
2885
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2427
2886
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2428
2887
 
2429
- header_params = {
2430
- "name" => request.name
2431
- }
2888
+ header_params = {}
2889
+ if request.name
2890
+ header_params["name"] = request.name
2891
+ end
2892
+
2432
2893
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2433
2894
  metadata[:"x-goog-request-params"] ||= request_params_header
2434
2895
 
2435
2896
  options.apply_defaults timeout: @config.rpcs.set_legacy_abac.timeout,
2436
2897
  metadata: metadata,
2437
2898
  retry_policy: @config.rpcs.set_legacy_abac.retry_policy
2438
- options.apply_defaults metadata: @config.metadata,
2899
+
2900
+ options.apply_defaults timeout: @config.timeout,
2901
+ metadata: @config.metadata,
2439
2902
  retry_policy: @config.retry_policy
2440
2903
 
2441
2904
  @cluster_manager_stub.call_rpc :set_legacy_abac, request, options: options do |response, operation|
@@ -2490,6 +2953,21 @@ module Google
2490
2953
  #
2491
2954
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2492
2955
  #
2956
+ # @example Basic example
2957
+ # require "google/cloud/container/v1"
2958
+ #
2959
+ # # Create a client object. The client can be reused for multiple calls.
2960
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
2961
+ #
2962
+ # # Create a request. To set request fields, pass in keyword arguments.
2963
+ # request = Google::Cloud::Container::V1::StartIPRotationRequest.new
2964
+ #
2965
+ # # Call the start_ip_rotation method.
2966
+ # result = client.start_ip_rotation request
2967
+ #
2968
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
2969
+ # p result
2970
+ #
2493
2971
  def start_ip_rotation request, options = nil
2494
2972
  raise ::ArgumentError, "request must be provided" if request.nil?
2495
2973
 
@@ -2507,16 +2985,20 @@ module Google
2507
2985
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2508
2986
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2509
2987
 
2510
- header_params = {
2511
- "name" => request.name
2512
- }
2988
+ header_params = {}
2989
+ if request.name
2990
+ header_params["name"] = request.name
2991
+ end
2992
+
2513
2993
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2514
2994
  metadata[:"x-goog-request-params"] ||= request_params_header
2515
2995
 
2516
2996
  options.apply_defaults timeout: @config.rpcs.start_ip_rotation.timeout,
2517
2997
  metadata: metadata,
2518
2998
  retry_policy: @config.rpcs.start_ip_rotation.retry_policy
2519
- options.apply_defaults metadata: @config.metadata,
2999
+
3000
+ options.apply_defaults timeout: @config.timeout,
3001
+ metadata: @config.metadata,
2520
3002
  retry_policy: @config.retry_policy
2521
3003
 
2522
3004
  @cluster_manager_stub.call_rpc :start_ip_rotation, request, options: options do |response, operation|
@@ -2569,6 +3051,21 @@ module Google
2569
3051
  #
2570
3052
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2571
3053
  #
3054
+ # @example Basic example
3055
+ # require "google/cloud/container/v1"
3056
+ #
3057
+ # # Create a client object. The client can be reused for multiple calls.
3058
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
3059
+ #
3060
+ # # Create a request. To set request fields, pass in keyword arguments.
3061
+ # request = Google::Cloud::Container::V1::CompleteIPRotationRequest.new
3062
+ #
3063
+ # # Call the complete_ip_rotation method.
3064
+ # result = client.complete_ip_rotation request
3065
+ #
3066
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
3067
+ # p result
3068
+ #
2572
3069
  def complete_ip_rotation request, options = nil
2573
3070
  raise ::ArgumentError, "request must be provided" if request.nil?
2574
3071
 
@@ -2586,16 +3083,20 @@ module Google
2586
3083
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2587
3084
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2588
3085
 
2589
- header_params = {
2590
- "name" => request.name
2591
- }
3086
+ header_params = {}
3087
+ if request.name
3088
+ header_params["name"] = request.name
3089
+ end
3090
+
2592
3091
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2593
3092
  metadata[:"x-goog-request-params"] ||= request_params_header
2594
3093
 
2595
3094
  options.apply_defaults timeout: @config.rpcs.complete_ip_rotation.timeout,
2596
3095
  metadata: metadata,
2597
3096
  retry_policy: @config.rpcs.complete_ip_rotation.retry_policy
2598
- options.apply_defaults metadata: @config.metadata,
3097
+
3098
+ options.apply_defaults timeout: @config.timeout,
3099
+ metadata: @config.metadata,
2599
3100
  retry_policy: @config.retry_policy
2600
3101
 
2601
3102
  @cluster_manager_stub.call_rpc :complete_ip_rotation, request, options: options do |response, operation|
@@ -2654,6 +3155,21 @@ module Google
2654
3155
  #
2655
3156
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2656
3157
  #
3158
+ # @example Basic example
3159
+ # require "google/cloud/container/v1"
3160
+ #
3161
+ # # Create a client object. The client can be reused for multiple calls.
3162
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
3163
+ #
3164
+ # # Create a request. To set request fields, pass in keyword arguments.
3165
+ # request = Google::Cloud::Container::V1::SetNodePoolSizeRequest.new
3166
+ #
3167
+ # # Call the set_node_pool_size method.
3168
+ # result = client.set_node_pool_size request
3169
+ #
3170
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
3171
+ # p result
3172
+ #
2657
3173
  def set_node_pool_size request, options = nil
2658
3174
  raise ::ArgumentError, "request must be provided" if request.nil?
2659
3175
 
@@ -2671,16 +3187,20 @@ module Google
2671
3187
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2672
3188
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2673
3189
 
2674
- header_params = {
2675
- "name" => request.name
2676
- }
3190
+ header_params = {}
3191
+ if request.name
3192
+ header_params["name"] = request.name
3193
+ end
3194
+
2677
3195
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2678
3196
  metadata[:"x-goog-request-params"] ||= request_params_header
2679
3197
 
2680
3198
  options.apply_defaults timeout: @config.rpcs.set_node_pool_size.timeout,
2681
3199
  metadata: metadata,
2682
3200
  retry_policy: @config.rpcs.set_node_pool_size.retry_policy
2683
- options.apply_defaults metadata: @config.metadata,
3201
+
3202
+ options.apply_defaults timeout: @config.timeout,
3203
+ metadata: @config.metadata,
2684
3204
  retry_policy: @config.retry_policy
2685
3205
 
2686
3206
  @cluster_manager_stub.call_rpc :set_node_pool_size, request, options: options do |response, operation|
@@ -2735,6 +3255,21 @@ module Google
2735
3255
  #
2736
3256
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2737
3257
  #
3258
+ # @example Basic example
3259
+ # require "google/cloud/container/v1"
3260
+ #
3261
+ # # Create a client object. The client can be reused for multiple calls.
3262
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
3263
+ #
3264
+ # # Create a request. To set request fields, pass in keyword arguments.
3265
+ # request = Google::Cloud::Container::V1::SetNetworkPolicyRequest.new
3266
+ #
3267
+ # # Call the set_network_policy method.
3268
+ # result = client.set_network_policy request
3269
+ #
3270
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
3271
+ # p result
3272
+ #
2738
3273
  def set_network_policy request, options = nil
2739
3274
  raise ::ArgumentError, "request must be provided" if request.nil?
2740
3275
 
@@ -2752,16 +3287,20 @@ module Google
2752
3287
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2753
3288
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2754
3289
 
2755
- header_params = {
2756
- "name" => request.name
2757
- }
3290
+ header_params = {}
3291
+ if request.name
3292
+ header_params["name"] = request.name
3293
+ end
3294
+
2758
3295
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2759
3296
  metadata[:"x-goog-request-params"] ||= request_params_header
2760
3297
 
2761
3298
  options.apply_defaults timeout: @config.rpcs.set_network_policy.timeout,
2762
3299
  metadata: metadata,
2763
3300
  retry_policy: @config.rpcs.set_network_policy.retry_policy
2764
- options.apply_defaults metadata: @config.metadata,
3301
+
3302
+ options.apply_defaults timeout: @config.timeout,
3303
+ metadata: @config.metadata,
2765
3304
  retry_policy: @config.retry_policy
2766
3305
 
2767
3306
  @cluster_manager_stub.call_rpc :set_network_policy, request, options: options do |response, operation|
@@ -2815,6 +3354,21 @@ module Google
2815
3354
  #
2816
3355
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2817
3356
  #
3357
+ # @example Basic example
3358
+ # require "google/cloud/container/v1"
3359
+ #
3360
+ # # Create a client object. The client can be reused for multiple calls.
3361
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
3362
+ #
3363
+ # # Create a request. To set request fields, pass in keyword arguments.
3364
+ # request = Google::Cloud::Container::V1::SetMaintenancePolicyRequest.new
3365
+ #
3366
+ # # Call the set_maintenance_policy method.
3367
+ # result = client.set_maintenance_policy request
3368
+ #
3369
+ # # The returned object is of type Google::Cloud::Container::V1::Operation.
3370
+ # p result
3371
+ #
2818
3372
  def set_maintenance_policy request, options = nil
2819
3373
  raise ::ArgumentError, "request must be provided" if request.nil?
2820
3374
 
@@ -2832,16 +3386,20 @@ module Google
2832
3386
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2833
3387
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2834
3388
 
2835
- header_params = {
2836
- "name" => request.name
2837
- }
3389
+ header_params = {}
3390
+ if request.name
3391
+ header_params["name"] = request.name
3392
+ end
3393
+
2838
3394
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2839
3395
  metadata[:"x-goog-request-params"] ||= request_params_header
2840
3396
 
2841
3397
  options.apply_defaults timeout: @config.rpcs.set_maintenance_policy.timeout,
2842
3398
  metadata: metadata,
2843
3399
  retry_policy: @config.rpcs.set_maintenance_policy.retry_policy
2844
- options.apply_defaults metadata: @config.metadata,
3400
+
3401
+ options.apply_defaults timeout: @config.timeout,
3402
+ metadata: @config.metadata,
2845
3403
  retry_policy: @config.retry_policy
2846
3404
 
2847
3405
  @cluster_manager_stub.call_rpc :set_maintenance_policy, request, options: options do |response, operation|
@@ -2895,6 +3453,27 @@ module Google
2895
3453
  #
2896
3454
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2897
3455
  #
3456
+ # @example Basic example
3457
+ # require "google/cloud/container/v1"
3458
+ #
3459
+ # # Create a client object. The client can be reused for multiple calls.
3460
+ # client = Google::Cloud::Container::V1::ClusterManager::Client.new
3461
+ #
3462
+ # # Create a request. To set request fields, pass in keyword arguments.
3463
+ # request = Google::Cloud::Container::V1::ListUsableSubnetworksRequest.new
3464
+ #
3465
+ # # Call the list_usable_subnetworks method.
3466
+ # result = client.list_usable_subnetworks request
3467
+ #
3468
+ # # The returned object is of type Gapic::PagedEnumerable. You can
3469
+ # # iterate over all elements by calling #each, and the enumerable
3470
+ # # will lazily make API calls to fetch subsequent pages. Other
3471
+ # # methods are also available for managing paging directly.
3472
+ # result.each do |response|
3473
+ # # Each element is of type ::Google::Cloud::Container::V1::UsableSubnetwork.
3474
+ # p response
3475
+ # end
3476
+ #
2898
3477
  def list_usable_subnetworks request, options = nil
2899
3478
  raise ::ArgumentError, "request must be provided" if request.nil?
2900
3479
 
@@ -2912,16 +3491,20 @@ module Google
2912
3491
  gapic_version: ::Google::Cloud::Container::V1::VERSION
2913
3492
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2914
3493
 
2915
- header_params = {
2916
- "parent" => request.parent
2917
- }
3494
+ header_params = {}
3495
+ if request.parent
3496
+ header_params["parent"] = request.parent
3497
+ end
3498
+
2918
3499
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2919
3500
  metadata[:"x-goog-request-params"] ||= request_params_header
2920
3501
 
2921
3502
  options.apply_defaults timeout: @config.rpcs.list_usable_subnetworks.timeout,
2922
3503
  metadata: metadata,
2923
3504
  retry_policy: @config.rpcs.list_usable_subnetworks.retry_policy
2924
- options.apply_defaults metadata: @config.metadata,
3505
+
3506
+ options.apply_defaults timeout: @config.timeout,
3507
+ metadata: @config.metadata,
2925
3508
  retry_policy: @config.retry_policy
2926
3509
 
2927
3510
  @cluster_manager_stub.call_rpc :list_usable_subnetworks, request, options: options do |response, operation|
@@ -2946,22 +3529,21 @@ module Google
2946
3529
  # Configuration can be applied globally to all clients, or to a single client
2947
3530
  # on construction.
2948
3531
  #
2949
- # # Examples
2950
- #
2951
- # To modify the global config, setting the timeout for list_clusters
2952
- # to 20 seconds, and all remaining timeouts to 10 seconds:
2953
- #
2954
- # ::Google::Cloud::Container::V1::ClusterManager::Client.configure do |config|
2955
- # config.timeout = 10.0
2956
- # config.rpcs.list_clusters.timeout = 20.0
2957
- # end
2958
- #
2959
- # To apply the above configuration only to a new client:
2960
- #
2961
- # client = ::Google::Cloud::Container::V1::ClusterManager::Client.new do |config|
2962
- # config.timeout = 10.0
2963
- # config.rpcs.list_clusters.timeout = 20.0
2964
- # end
3532
+ # @example
3533
+ #
3534
+ # # Modify the global config, setting the timeout for
3535
+ # # list_clusters to 20 seconds,
3536
+ # # and all remaining timeouts to 10 seconds.
3537
+ # ::Google::Cloud::Container::V1::ClusterManager::Client.configure do |config|
3538
+ # config.timeout = 10.0
3539
+ # config.rpcs.list_clusters.timeout = 20.0
3540
+ # end
3541
+ #
3542
+ # # Apply the above configuration only to a new client.
3543
+ # client = ::Google::Cloud::Container::V1::ClusterManager::Client.new do |config|
3544
+ # config.timeout = 10.0
3545
+ # config.rpcs.list_clusters.timeout = 20.0
3546
+ # end
2965
3547
  #
2966
3548
  # @!attribute [rw] endpoint
2967
3549
  # The hostname or hostname:port of the service endpoint.