google-cloud-container-v1beta1 0.6.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Container::V1beta1::ClusterManager::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all ClusterManager clients:
47
- #
48
- # ::Google::Cloud::Container::V1beta1::ClusterManager::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all ClusterManager clients
47
+ # ::Google::Cloud::Container::V1beta1::ClusterManager::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -67,18 +66,12 @@ module Google
67
66
 
68
67
  default_config.rpcs.list_clusters.timeout = 20.0
69
68
  default_config.rpcs.list_clusters.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [14, 4]
69
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
74
70
  }
75
71
 
76
72
  default_config.rpcs.get_cluster.timeout = 20.0
77
73
  default_config.rpcs.get_cluster.retry_policy = {
78
- initial_delay: 0.1,
79
- max_delay: 60.0,
80
- multiplier: 1.3,
81
- retry_codes: [14, 4]
74
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
82
75
  }
83
76
 
84
77
  default_config.rpcs.create_cluster.timeout = 45.0
@@ -103,62 +96,41 @@ module Google
103
96
 
104
97
  default_config.rpcs.delete_cluster.timeout = 20.0
105
98
  default_config.rpcs.delete_cluster.retry_policy = {
106
- initial_delay: 0.1,
107
- max_delay: 60.0,
108
- multiplier: 1.3,
109
- retry_codes: [14, 4]
99
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
110
100
  }
111
101
 
112
102
  default_config.rpcs.list_operations.timeout = 20.0
113
103
  default_config.rpcs.list_operations.retry_policy = {
114
- initial_delay: 0.1,
115
- max_delay: 60.0,
116
- multiplier: 1.3,
117
- retry_codes: [14, 4]
104
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
118
105
  }
119
106
 
120
107
  default_config.rpcs.get_operation.timeout = 20.0
121
108
  default_config.rpcs.get_operation.retry_policy = {
122
- initial_delay: 0.1,
123
- max_delay: 60.0,
124
- multiplier: 1.3,
125
- retry_codes: [14, 4]
109
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
126
110
  }
127
111
 
128
112
  default_config.rpcs.cancel_operation.timeout = 45.0
129
113
 
130
114
  default_config.rpcs.get_server_config.timeout = 20.0
131
115
  default_config.rpcs.get_server_config.retry_policy = {
132
- initial_delay: 0.1,
133
- max_delay: 60.0,
134
- multiplier: 1.3,
135
- retry_codes: [14, 4]
116
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
136
117
  }
137
118
 
138
119
  default_config.rpcs.list_node_pools.timeout = 20.0
139
120
  default_config.rpcs.list_node_pools.retry_policy = {
140
- initial_delay: 0.1,
141
- max_delay: 60.0,
142
- multiplier: 1.3,
143
- retry_codes: [14, 4]
121
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
144
122
  }
145
123
 
146
124
  default_config.rpcs.get_node_pool.timeout = 20.0
147
125
  default_config.rpcs.get_node_pool.retry_policy = {
148
- initial_delay: 0.1,
149
- max_delay: 60.0,
150
- multiplier: 1.3,
151
- retry_codes: [14, 4]
126
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
152
127
  }
153
128
 
154
129
  default_config.rpcs.create_node_pool.timeout = 45.0
155
130
 
156
131
  default_config.rpcs.delete_node_pool.timeout = 20.0
157
132
  default_config.rpcs.delete_node_pool.retry_policy = {
158
- initial_delay: 0.1,
159
- max_delay: 60.0,
160
- multiplier: 1.3,
161
- retry_codes: [14, 4]
133
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
162
134
  }
163
135
 
164
136
  default_config.rpcs.rollback_node_pool_upgrade.timeout = 45.0
@@ -181,18 +153,12 @@ module Google
181
153
 
182
154
  default_config.rpcs.list_usable_subnetworks.timeout = 20.0
183
155
  default_config.rpcs.list_usable_subnetworks.retry_policy = {
184
- initial_delay: 0.1,
185
- max_delay: 60.0,
186
- multiplier: 1.3,
187
- retry_codes: [14, 4]
156
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
188
157
  }
189
158
 
190
159
  default_config.rpcs.list_locations.timeout = 20.0
191
160
  default_config.rpcs.list_locations.retry_policy = {
192
- initial_delay: 0.1,
193
- max_delay: 60.0,
194
- multiplier: 1.3,
195
- retry_codes: [14, 4]
161
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
196
162
  }
197
163
 
198
164
  default_config
@@ -224,19 +190,15 @@ module Google
224
190
  ##
225
191
  # Create a new ClusterManager client object.
226
192
  #
227
- # ## Examples
228
- #
229
- # To create a new ClusterManager client with the default
230
- # configuration:
231
- #
232
- # client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new
193
+ # @example
233
194
  #
234
- # To create a new ClusterManager client with a custom
235
- # configuration:
195
+ # # Create a client using the default configuration
196
+ # client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new
236
197
  #
237
- # client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config|
238
- # config.timeout = 10.0
239
- # end
198
+ # # Create a client using a custom configuration
199
+ # client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config|
200
+ # config.timeout = 10.0
201
+ # end
240
202
  #
241
203
  # @yield [config] Configure the ClusterManager client.
242
204
  # @yieldparam config [Client::Configuration]
@@ -256,14 +218,13 @@ module Google
256
218
 
257
219
  # Create credentials
258
220
  credentials = @config.credentials
259
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
221
+ # Use self-signed JWT if the endpoint is unchanged from default,
260
222
  # but only if the default endpoint does not have a region prefix.
261
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
262
- @config.endpoint == Client.configure.endpoint &&
223
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
263
224
  !@config.endpoint.split(".").first.include?("-")
264
225
  credentials ||= Credentials.default scope: @config.scope,
265
226
  enable_self_signed_jwt: enable_self_signed_jwt
266
- if credentials.is_a?(String) || credentials.is_a?(Hash)
227
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
267
228
  credentials = Credentials.new credentials, scope: @config.scope
268
229
  end
269
230
  @quota_project_id = @config.quota_project
@@ -321,6 +282,21 @@ module Google
321
282
  #
322
283
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
323
284
  #
285
+ # @example Basic example
286
+ # require "google/cloud/container/v1beta1"
287
+ #
288
+ # # Create a client object. The client can be reused for multiple calls.
289
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
290
+ #
291
+ # # Create a request. To set request fields, pass in keyword arguments.
292
+ # request = Google::Cloud::Container::V1beta1::ListClustersRequest.new
293
+ #
294
+ # # Call the list_clusters method.
295
+ # result = client.list_clusters request
296
+ #
297
+ # # The returned object is of type Google::Cloud::Container::V1beta1::ListClustersResponse.
298
+ # p result
299
+ #
324
300
  def list_clusters request, options = nil
325
301
  raise ::ArgumentError, "request must be provided" if request.nil?
326
302
 
@@ -338,16 +314,20 @@ module Google
338
314
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
339
315
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
316
 
341
- header_params = {
342
- "parent" => request.parent
343
- }
317
+ header_params = {}
318
+ if request.parent
319
+ header_params["parent"] = request.parent
320
+ end
321
+
344
322
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
345
323
  metadata[:"x-goog-request-params"] ||= request_params_header
346
324
 
347
325
  options.apply_defaults timeout: @config.rpcs.list_clusters.timeout,
348
326
  metadata: metadata,
349
327
  retry_policy: @config.rpcs.list_clusters.retry_policy
350
- options.apply_defaults metadata: @config.metadata,
328
+
329
+ options.apply_defaults timeout: @config.timeout,
330
+ metadata: @config.metadata,
351
331
  retry_policy: @config.retry_policy
352
332
 
353
333
  @cluster_manager_stub.call_rpc :list_clusters, request, options: options do |response, operation|
@@ -400,6 +380,21 @@ module Google
400
380
  #
401
381
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
402
382
  #
383
+ # @example Basic example
384
+ # require "google/cloud/container/v1beta1"
385
+ #
386
+ # # Create a client object. The client can be reused for multiple calls.
387
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
388
+ #
389
+ # # Create a request. To set request fields, pass in keyword arguments.
390
+ # request = Google::Cloud::Container::V1beta1::GetClusterRequest.new
391
+ #
392
+ # # Call the get_cluster method.
393
+ # result = client.get_cluster request
394
+ #
395
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Cluster.
396
+ # p result
397
+ #
403
398
  def get_cluster request, options = nil
404
399
  raise ::ArgumentError, "request must be provided" if request.nil?
405
400
 
@@ -417,16 +412,20 @@ module Google
417
412
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
418
413
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
419
414
 
420
- header_params = {
421
- "name" => request.name
422
- }
415
+ header_params = {}
416
+ if request.name
417
+ header_params["name"] = request.name
418
+ end
419
+
423
420
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
424
421
  metadata[:"x-goog-request-params"] ||= request_params_header
425
422
 
426
423
  options.apply_defaults timeout: @config.rpcs.get_cluster.timeout,
427
424
  metadata: metadata,
428
425
  retry_policy: @config.rpcs.get_cluster.retry_policy
429
- options.apply_defaults metadata: @config.metadata,
426
+
427
+ options.apply_defaults timeout: @config.timeout,
428
+ metadata: @config.metadata,
430
429
  retry_policy: @config.retry_policy
431
430
 
432
431
  @cluster_manager_stub.call_rpc :get_cluster, request, options: options do |response, operation|
@@ -492,6 +491,21 @@ module Google
492
491
  #
493
492
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
494
493
  #
494
+ # @example Basic example
495
+ # require "google/cloud/container/v1beta1"
496
+ #
497
+ # # Create a client object. The client can be reused for multiple calls.
498
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
499
+ #
500
+ # # Create a request. To set request fields, pass in keyword arguments.
501
+ # request = Google::Cloud::Container::V1beta1::CreateClusterRequest.new
502
+ #
503
+ # # Call the create_cluster method.
504
+ # result = client.create_cluster request
505
+ #
506
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
507
+ # p result
508
+ #
495
509
  def create_cluster request, options = nil
496
510
  raise ::ArgumentError, "request must be provided" if request.nil?
497
511
 
@@ -509,16 +523,20 @@ module Google
509
523
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
510
524
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
511
525
 
512
- header_params = {
513
- "parent" => request.parent
514
- }
526
+ header_params = {}
527
+ if request.parent
528
+ header_params["parent"] = request.parent
529
+ end
530
+
515
531
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
516
532
  metadata[:"x-goog-request-params"] ||= request_params_header
517
533
 
518
534
  options.apply_defaults timeout: @config.rpcs.create_cluster.timeout,
519
535
  metadata: metadata,
520
536
  retry_policy: @config.rpcs.create_cluster.retry_policy
521
- options.apply_defaults metadata: @config.metadata,
537
+
538
+ options.apply_defaults timeout: @config.timeout,
539
+ metadata: @config.metadata,
522
540
  retry_policy: @config.retry_policy
523
541
 
524
542
  @cluster_manager_stub.call_rpc :create_cluster, request, options: options do |response, operation|
@@ -573,6 +591,21 @@ module Google
573
591
  #
574
592
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
575
593
  #
594
+ # @example Basic example
595
+ # require "google/cloud/container/v1beta1"
596
+ #
597
+ # # Create a client object. The client can be reused for multiple calls.
598
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
599
+ #
600
+ # # Create a request. To set request fields, pass in keyword arguments.
601
+ # request = Google::Cloud::Container::V1beta1::UpdateClusterRequest.new
602
+ #
603
+ # # Call the update_cluster method.
604
+ # result = client.update_cluster request
605
+ #
606
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
607
+ # p result
608
+ #
576
609
  def update_cluster request, options = nil
577
610
  raise ::ArgumentError, "request must be provided" if request.nil?
578
611
 
@@ -590,16 +623,20 @@ module Google
590
623
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
591
624
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
592
625
 
593
- header_params = {
594
- "name" => request.name
595
- }
626
+ header_params = {}
627
+ if request.name
628
+ header_params["name"] = request.name
629
+ end
630
+
596
631
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
597
632
  metadata[:"x-goog-request-params"] ||= request_params_header
598
633
 
599
634
  options.apply_defaults timeout: @config.rpcs.update_cluster.timeout,
600
635
  metadata: metadata,
601
636
  retry_policy: @config.rpcs.update_cluster.retry_policy
602
- options.apply_defaults metadata: @config.metadata,
637
+
638
+ options.apply_defaults timeout: @config.timeout,
639
+ metadata: @config.metadata,
603
640
  retry_policy: @config.retry_policy
604
641
 
605
642
  @cluster_manager_stub.call_rpc :update_cluster, request, options: options do |response, operation|
@@ -623,7 +660,7 @@ module Google
623
660
  # @param options [::Gapic::CallOptions, ::Hash]
624
661
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
625
662
  #
626
- # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, linux_node_config: nil, kubelet_config: nil)
663
+ # @overload update_node_pool(project_id: nil, zone: nil, cluster_id: nil, node_pool_id: nil, node_version: nil, image_type: nil, locations: nil, workload_metadata_config: nil, name: nil, upgrade_settings: nil, tags: nil, taints: nil, labels: nil, linux_node_config: nil, kubelet_config: nil, gvnic: nil)
627
664
  # Pass arguments to `update_node_pool` via keyword arguments. Note that at
628
665
  # least one keyword argument is required. To specify no parameters, or to keep all
629
666
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -671,10 +708,24 @@ module Google
671
708
  # `projects/*/locations/*/clusters/*/nodePools/*`.
672
709
  # @param upgrade_settings [::Google::Cloud::Container::V1beta1::NodePool::UpgradeSettings, ::Hash]
673
710
  # Upgrade settings control disruption and speed of the upgrade.
711
+ # @param tags [::Google::Cloud::Container::V1beta1::NetworkTags, ::Hash]
712
+ # The desired network tags to be applied to all nodes in the node pool.
713
+ # If this field is not present, the tags will not be changed. Otherwise,
714
+ # the existing network tags will be *replaced* with the provided tags.
715
+ # @param taints [::Google::Cloud::Container::V1beta1::NodeTaints, ::Hash]
716
+ # The desired node taints to be applied to all nodes in the node pool.
717
+ # If this field is not present, the taints will not be changed. Otherwise,
718
+ # the existing node taints will be *replaced* with the provided taints.
719
+ # @param labels [::Google::Cloud::Container::V1beta1::NodeLabels, ::Hash]
720
+ # The desired node labels to be applied to all nodes in the node pool.
721
+ # If this field is not present, the labels will not be changed. Otherwise,
722
+ # the existing node labels will be *replaced* with the provided labels.
674
723
  # @param linux_node_config [::Google::Cloud::Container::V1beta1::LinuxNodeConfig, ::Hash]
675
724
  # Parameters that can be configured on Linux nodes.
676
725
  # @param kubelet_config [::Google::Cloud::Container::V1beta1::NodeKubeletConfig, ::Hash]
677
726
  # Node kubelet configs.
727
+ # @param gvnic [::Google::Cloud::Container::V1beta1::VirtualNIC, ::Hash]
728
+ # Enable or disable gvnic on the node pool.
678
729
  #
679
730
  # @yield [response, operation] Access the result along with the RPC operation
680
731
  # @yieldparam response [::Google::Cloud::Container::V1beta1::Operation]
@@ -684,6 +735,21 @@ module Google
684
735
  #
685
736
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
686
737
  #
738
+ # @example Basic example
739
+ # require "google/cloud/container/v1beta1"
740
+ #
741
+ # # Create a client object. The client can be reused for multiple calls.
742
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
743
+ #
744
+ # # Create a request. To set request fields, pass in keyword arguments.
745
+ # request = Google::Cloud::Container::V1beta1::UpdateNodePoolRequest.new
746
+ #
747
+ # # Call the update_node_pool method.
748
+ # result = client.update_node_pool request
749
+ #
750
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
751
+ # p result
752
+ #
687
753
  def update_node_pool request, options = nil
688
754
  raise ::ArgumentError, "request must be provided" if request.nil?
689
755
 
@@ -701,16 +767,20 @@ module Google
701
767
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
702
768
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
703
769
 
704
- header_params = {
705
- "name" => request.name
706
- }
770
+ header_params = {}
771
+ if request.name
772
+ header_params["name"] = request.name
773
+ end
774
+
707
775
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
708
776
  metadata[:"x-goog-request-params"] ||= request_params_header
709
777
 
710
778
  options.apply_defaults timeout: @config.rpcs.update_node_pool.timeout,
711
779
  metadata: metadata,
712
780
  retry_policy: @config.rpcs.update_node_pool.retry_policy
713
- options.apply_defaults metadata: @config.metadata,
781
+
782
+ options.apply_defaults timeout: @config.timeout,
783
+ metadata: @config.metadata,
714
784
  retry_policy: @config.retry_policy
715
785
 
716
786
  @cluster_manager_stub.call_rpc :update_node_pool, request, options: options do |response, operation|
@@ -769,6 +839,21 @@ module Google
769
839
  #
770
840
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
771
841
  #
842
+ # @example Basic example
843
+ # require "google/cloud/container/v1beta1"
844
+ #
845
+ # # Create a client object. The client can be reused for multiple calls.
846
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
847
+ #
848
+ # # Create a request. To set request fields, pass in keyword arguments.
849
+ # request = Google::Cloud::Container::V1beta1::SetNodePoolAutoscalingRequest.new
850
+ #
851
+ # # Call the set_node_pool_autoscaling method.
852
+ # result = client.set_node_pool_autoscaling request
853
+ #
854
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
855
+ # p result
856
+ #
772
857
  def set_node_pool_autoscaling request, options = nil
773
858
  raise ::ArgumentError, "request must be provided" if request.nil?
774
859
 
@@ -786,16 +871,20 @@ module Google
786
871
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
787
872
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
788
873
 
789
- header_params = {
790
- "name" => request.name
791
- }
874
+ header_params = {}
875
+ if request.name
876
+ header_params["name"] = request.name
877
+ end
878
+
792
879
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
793
880
  metadata[:"x-goog-request-params"] ||= request_params_header
794
881
 
795
882
  options.apply_defaults timeout: @config.rpcs.set_node_pool_autoscaling.timeout,
796
883
  metadata: metadata,
797
884
  retry_policy: @config.rpcs.set_node_pool_autoscaling.retry_policy
798
- options.apply_defaults metadata: @config.metadata,
885
+
886
+ options.apply_defaults timeout: @config.timeout,
887
+ metadata: @config.metadata,
799
888
  retry_policy: @config.retry_policy
800
889
 
801
890
  @cluster_manager_stub.call_rpc :set_node_pool_autoscaling, request, options: options do |response, operation|
@@ -860,6 +949,21 @@ module Google
860
949
  #
861
950
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
862
951
  #
952
+ # @example Basic example
953
+ # require "google/cloud/container/v1beta1"
954
+ #
955
+ # # Create a client object. The client can be reused for multiple calls.
956
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
957
+ #
958
+ # # Create a request. To set request fields, pass in keyword arguments.
959
+ # request = Google::Cloud::Container::V1beta1::SetLoggingServiceRequest.new
960
+ #
961
+ # # Call the set_logging_service method.
962
+ # result = client.set_logging_service request
963
+ #
964
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
965
+ # p result
966
+ #
863
967
  def set_logging_service request, options = nil
864
968
  raise ::ArgumentError, "request must be provided" if request.nil?
865
969
 
@@ -877,16 +981,20 @@ module Google
877
981
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
878
982
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
879
983
 
880
- header_params = {
881
- "name" => request.name
882
- }
984
+ header_params = {}
985
+ if request.name
986
+ header_params["name"] = request.name
987
+ end
988
+
883
989
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
884
990
  metadata[:"x-goog-request-params"] ||= request_params_header
885
991
 
886
992
  options.apply_defaults timeout: @config.rpcs.set_logging_service.timeout,
887
993
  metadata: metadata,
888
994
  retry_policy: @config.rpcs.set_logging_service.retry_policy
889
- options.apply_defaults metadata: @config.metadata,
995
+
996
+ options.apply_defaults timeout: @config.timeout,
997
+ metadata: @config.metadata,
890
998
  retry_policy: @config.retry_policy
891
999
 
892
1000
  @cluster_manager_stub.call_rpc :set_logging_service, request, options: options do |response, operation|
@@ -951,6 +1059,21 @@ module Google
951
1059
  #
952
1060
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
953
1061
  #
1062
+ # @example Basic example
1063
+ # require "google/cloud/container/v1beta1"
1064
+ #
1065
+ # # Create a client object. The client can be reused for multiple calls.
1066
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1067
+ #
1068
+ # # Create a request. To set request fields, pass in keyword arguments.
1069
+ # request = Google::Cloud::Container::V1beta1::SetMonitoringServiceRequest.new
1070
+ #
1071
+ # # Call the set_monitoring_service method.
1072
+ # result = client.set_monitoring_service request
1073
+ #
1074
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
1075
+ # p result
1076
+ #
954
1077
  def set_monitoring_service request, options = nil
955
1078
  raise ::ArgumentError, "request must be provided" if request.nil?
956
1079
 
@@ -968,16 +1091,20 @@ module Google
968
1091
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
969
1092
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
970
1093
 
971
- header_params = {
972
- "name" => request.name
973
- }
1094
+ header_params = {}
1095
+ if request.name
1096
+ header_params["name"] = request.name
1097
+ end
1098
+
974
1099
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
975
1100
  metadata[:"x-goog-request-params"] ||= request_params_header
976
1101
 
977
1102
  options.apply_defaults timeout: @config.rpcs.set_monitoring_service.timeout,
978
1103
  metadata: metadata,
979
1104
  retry_policy: @config.rpcs.set_monitoring_service.retry_policy
980
- options.apply_defaults metadata: @config.metadata,
1105
+
1106
+ options.apply_defaults timeout: @config.timeout,
1107
+ metadata: @config.metadata,
981
1108
  retry_policy: @config.retry_policy
982
1109
 
983
1110
  @cluster_manager_stub.call_rpc :set_monitoring_service, request, options: options do |response, operation|
@@ -1019,8 +1146,8 @@ module Google
1019
1146
  # Required. Deprecated. The name of the cluster to upgrade.
1020
1147
  # This field has been deprecated and replaced by the name field.
1021
1148
  # @param addons_config [::Google::Cloud::Container::V1beta1::AddonsConfig, ::Hash]
1022
- # Required. The desired configurations for the various addons available to run in the
1023
- # cluster.
1149
+ # Required. The desired configurations for the various addons available to
1150
+ # run in the cluster.
1024
1151
  # @param name [::String]
1025
1152
  # The name (project, location, cluster) of the cluster to set addons.
1026
1153
  # Specified in the format `projects/*/locations/*/clusters/*`.
@@ -1033,6 +1160,21 @@ module Google
1033
1160
  #
1034
1161
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1035
1162
  #
1163
+ # @example Basic example
1164
+ # require "google/cloud/container/v1beta1"
1165
+ #
1166
+ # # Create a client object. The client can be reused for multiple calls.
1167
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1168
+ #
1169
+ # # Create a request. To set request fields, pass in keyword arguments.
1170
+ # request = Google::Cloud::Container::V1beta1::SetAddonsConfigRequest.new
1171
+ #
1172
+ # # Call the set_addons_config method.
1173
+ # result = client.set_addons_config request
1174
+ #
1175
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
1176
+ # p result
1177
+ #
1036
1178
  def set_addons_config request, options = nil
1037
1179
  raise ::ArgumentError, "request must be provided" if request.nil?
1038
1180
 
@@ -1050,16 +1192,20 @@ module Google
1050
1192
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1051
1193
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1052
1194
 
1053
- header_params = {
1054
- "name" => request.name
1055
- }
1195
+ header_params = {}
1196
+ if request.name
1197
+ header_params["name"] = request.name
1198
+ end
1199
+
1056
1200
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1057
1201
  metadata[:"x-goog-request-params"] ||= request_params_header
1058
1202
 
1059
1203
  options.apply_defaults timeout: @config.rpcs.set_addons_config.timeout,
1060
1204
  metadata: metadata,
1061
1205
  retry_policy: @config.rpcs.set_addons_config.retry_policy
1062
- options.apply_defaults metadata: @config.metadata,
1206
+
1207
+ options.apply_defaults timeout: @config.timeout,
1208
+ metadata: @config.metadata,
1063
1209
  retry_policy: @config.retry_policy
1064
1210
 
1065
1211
  @cluster_manager_stub.call_rpc :set_addons_config, request, options: options do |response, operation|
@@ -1076,6 +1222,8 @@ module Google
1076
1222
  # [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters/update)
1077
1223
  # instead.
1078
1224
  #
1225
+ # @deprecated This method is deprecated and may be removed in the next major version update.
1226
+ #
1079
1227
  # @overload set_locations(request, options = nil)
1080
1228
  # Pass arguments to `set_locations` via a request object, either of type
1081
1229
  # {::Google::Cloud::Container::V1beta1::SetLocationsRequest} or an equivalent Hash.
@@ -1123,6 +1271,21 @@ module Google
1123
1271
  #
1124
1272
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1125
1273
  #
1274
+ # @example Basic example
1275
+ # require "google/cloud/container/v1beta1"
1276
+ #
1277
+ # # Create a client object. The client can be reused for multiple calls.
1278
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1279
+ #
1280
+ # # Create a request. To set request fields, pass in keyword arguments.
1281
+ # request = Google::Cloud::Container::V1beta1::SetLocationsRequest.new
1282
+ #
1283
+ # # Call the set_locations method.
1284
+ # result = client.set_locations request
1285
+ #
1286
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
1287
+ # p result
1288
+ #
1126
1289
  def set_locations request, options = nil
1127
1290
  raise ::ArgumentError, "request must be provided" if request.nil?
1128
1291
 
@@ -1140,16 +1303,20 @@ module Google
1140
1303
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1141
1304
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1142
1305
 
1143
- header_params = {
1144
- "name" => request.name
1145
- }
1306
+ header_params = {}
1307
+ if request.name
1308
+ header_params["name"] = request.name
1309
+ end
1310
+
1146
1311
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1147
1312
  metadata[:"x-goog-request-params"] ||= request_params_header
1148
1313
 
1149
1314
  options.apply_defaults timeout: @config.rpcs.set_locations.timeout,
1150
1315
  metadata: metadata,
1151
1316
  retry_policy: @config.rpcs.set_locations.retry_policy
1152
- options.apply_defaults metadata: @config.metadata,
1317
+
1318
+ options.apply_defaults timeout: @config.timeout,
1319
+ metadata: @config.metadata,
1153
1320
  retry_policy: @config.retry_policy
1154
1321
 
1155
1322
  @cluster_manager_stub.call_rpc :set_locations, request, options: options do |response, operation|
@@ -1213,6 +1380,21 @@ module Google
1213
1380
  #
1214
1381
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1215
1382
  #
1383
+ # @example Basic example
1384
+ # require "google/cloud/container/v1beta1"
1385
+ #
1386
+ # # Create a client object. The client can be reused for multiple calls.
1387
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1388
+ #
1389
+ # # Create a request. To set request fields, pass in keyword arguments.
1390
+ # request = Google::Cloud::Container::V1beta1::UpdateMasterRequest.new
1391
+ #
1392
+ # # Call the update_master method.
1393
+ # result = client.update_master request
1394
+ #
1395
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
1396
+ # p result
1397
+ #
1216
1398
  def update_master request, options = nil
1217
1399
  raise ::ArgumentError, "request must be provided" if request.nil?
1218
1400
 
@@ -1230,16 +1412,20 @@ module Google
1230
1412
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1231
1413
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1232
1414
 
1233
- header_params = {
1234
- "name" => request.name
1235
- }
1415
+ header_params = {}
1416
+ if request.name
1417
+ header_params["name"] = request.name
1418
+ end
1419
+
1236
1420
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1237
1421
  metadata[:"x-goog-request-params"] ||= request_params_header
1238
1422
 
1239
1423
  options.apply_defaults timeout: @config.rpcs.update_master.timeout,
1240
1424
  metadata: metadata,
1241
1425
  retry_policy: @config.rpcs.update_master.retry_policy
1242
- options.apply_defaults metadata: @config.metadata,
1426
+
1427
+ options.apply_defaults timeout: @config.timeout,
1428
+ metadata: @config.metadata,
1243
1429
  retry_policy: @config.retry_policy
1244
1430
 
1245
1431
  @cluster_manager_stub.call_rpc :update_master, request, options: options do |response, operation|
@@ -1298,6 +1484,21 @@ module Google
1298
1484
  #
1299
1485
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1300
1486
  #
1487
+ # @example Basic example
1488
+ # require "google/cloud/container/v1beta1"
1489
+ #
1490
+ # # Create a client object. The client can be reused for multiple calls.
1491
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1492
+ #
1493
+ # # Create a request. To set request fields, pass in keyword arguments.
1494
+ # request = Google::Cloud::Container::V1beta1::SetMasterAuthRequest.new
1495
+ #
1496
+ # # Call the set_master_auth method.
1497
+ # result = client.set_master_auth request
1498
+ #
1499
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
1500
+ # p result
1501
+ #
1301
1502
  def set_master_auth request, options = nil
1302
1503
  raise ::ArgumentError, "request must be provided" if request.nil?
1303
1504
 
@@ -1315,16 +1516,20 @@ module Google
1315
1516
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1316
1517
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1317
1518
 
1318
- header_params = {
1319
- "name" => request.name
1320
- }
1519
+ header_params = {}
1520
+ if request.name
1521
+ header_params["name"] = request.name
1522
+ end
1523
+
1321
1524
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1322
1525
  metadata[:"x-goog-request-params"] ||= request_params_header
1323
1526
 
1324
1527
  options.apply_defaults timeout: @config.rpcs.set_master_auth.timeout,
1325
1528
  metadata: metadata,
1326
1529
  retry_policy: @config.rpcs.set_master_auth.retry_policy
1327
- options.apply_defaults metadata: @config.metadata,
1530
+
1531
+ options.apply_defaults timeout: @config.timeout,
1532
+ metadata: @config.metadata,
1328
1533
  retry_policy: @config.retry_policy
1329
1534
 
1330
1535
  @cluster_manager_stub.call_rpc :set_master_auth, request, options: options do |response, operation|
@@ -1385,6 +1590,21 @@ module Google
1385
1590
  #
1386
1591
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1387
1592
  #
1593
+ # @example Basic example
1594
+ # require "google/cloud/container/v1beta1"
1595
+ #
1596
+ # # Create a client object. The client can be reused for multiple calls.
1597
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1598
+ #
1599
+ # # Create a request. To set request fields, pass in keyword arguments.
1600
+ # request = Google::Cloud::Container::V1beta1::DeleteClusterRequest.new
1601
+ #
1602
+ # # Call the delete_cluster method.
1603
+ # result = client.delete_cluster request
1604
+ #
1605
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
1606
+ # p result
1607
+ #
1388
1608
  def delete_cluster request, options = nil
1389
1609
  raise ::ArgumentError, "request must be provided" if request.nil?
1390
1610
 
@@ -1402,16 +1622,20 @@ module Google
1402
1622
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1403
1623
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1404
1624
 
1405
- header_params = {
1406
- "name" => request.name
1407
- }
1625
+ header_params = {}
1626
+ if request.name
1627
+ header_params["name"] = request.name
1628
+ end
1629
+
1408
1630
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1409
1631
  metadata[:"x-goog-request-params"] ||= request_params_header
1410
1632
 
1411
1633
  options.apply_defaults timeout: @config.rpcs.delete_cluster.timeout,
1412
1634
  metadata: metadata,
1413
1635
  retry_policy: @config.rpcs.delete_cluster.retry_policy
1414
- options.apply_defaults metadata: @config.metadata,
1636
+
1637
+ options.apply_defaults timeout: @config.timeout,
1638
+ metadata: @config.metadata,
1415
1639
  retry_policy: @config.retry_policy
1416
1640
 
1417
1641
  @cluster_manager_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
@@ -1462,6 +1686,21 @@ module Google
1462
1686
  #
1463
1687
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1464
1688
  #
1689
+ # @example Basic example
1690
+ # require "google/cloud/container/v1beta1"
1691
+ #
1692
+ # # Create a client object. The client can be reused for multiple calls.
1693
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1694
+ #
1695
+ # # Create a request. To set request fields, pass in keyword arguments.
1696
+ # request = Google::Cloud::Container::V1beta1::ListOperationsRequest.new
1697
+ #
1698
+ # # Call the list_operations method.
1699
+ # result = client.list_operations request
1700
+ #
1701
+ # # The returned object is of type Google::Cloud::Container::V1beta1::ListOperationsResponse.
1702
+ # p result
1703
+ #
1465
1704
  def list_operations request, options = nil
1466
1705
  raise ::ArgumentError, "request must be provided" if request.nil?
1467
1706
 
@@ -1479,16 +1718,20 @@ module Google
1479
1718
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1480
1719
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1481
1720
 
1482
- header_params = {
1483
- "parent" => request.parent
1484
- }
1721
+ header_params = {}
1722
+ if request.parent
1723
+ header_params["parent"] = request.parent
1724
+ end
1725
+
1485
1726
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1486
1727
  metadata[:"x-goog-request-params"] ||= request_params_header
1487
1728
 
1488
1729
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
1489
1730
  metadata: metadata,
1490
1731
  retry_policy: @config.rpcs.list_operations.retry_policy
1491
- options.apply_defaults metadata: @config.metadata,
1732
+
1733
+ options.apply_defaults timeout: @config.timeout,
1734
+ metadata: @config.metadata,
1492
1735
  retry_policy: @config.retry_policy
1493
1736
 
1494
1737
  @cluster_manager_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -1541,6 +1784,21 @@ module Google
1541
1784
  #
1542
1785
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1543
1786
  #
1787
+ # @example Basic example
1788
+ # require "google/cloud/container/v1beta1"
1789
+ #
1790
+ # # Create a client object. The client can be reused for multiple calls.
1791
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1792
+ #
1793
+ # # Create a request. To set request fields, pass in keyword arguments.
1794
+ # request = Google::Cloud::Container::V1beta1::GetOperationRequest.new
1795
+ #
1796
+ # # Call the get_operation method.
1797
+ # result = client.get_operation request
1798
+ #
1799
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
1800
+ # p result
1801
+ #
1544
1802
  def get_operation request, options = nil
1545
1803
  raise ::ArgumentError, "request must be provided" if request.nil?
1546
1804
 
@@ -1558,16 +1816,20 @@ module Google
1558
1816
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1559
1817
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1560
1818
 
1561
- header_params = {
1562
- "name" => request.name
1563
- }
1819
+ header_params = {}
1820
+ if request.name
1821
+ header_params["name"] = request.name
1822
+ end
1823
+
1564
1824
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1565
1825
  metadata[:"x-goog-request-params"] ||= request_params_header
1566
1826
 
1567
1827
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
1568
1828
  metadata: metadata,
1569
1829
  retry_policy: @config.rpcs.get_operation.retry_policy
1570
- options.apply_defaults metadata: @config.metadata,
1830
+
1831
+ options.apply_defaults timeout: @config.timeout,
1832
+ metadata: @config.metadata,
1571
1833
  retry_policy: @config.retry_policy
1572
1834
 
1573
1835
  @cluster_manager_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -1620,6 +1882,21 @@ module Google
1620
1882
  #
1621
1883
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1622
1884
  #
1885
+ # @example Basic example
1886
+ # require "google/cloud/container/v1beta1"
1887
+ #
1888
+ # # Create a client object. The client can be reused for multiple calls.
1889
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1890
+ #
1891
+ # # Create a request. To set request fields, pass in keyword arguments.
1892
+ # request = Google::Cloud::Container::V1beta1::CancelOperationRequest.new
1893
+ #
1894
+ # # Call the cancel_operation method.
1895
+ # result = client.cancel_operation request
1896
+ #
1897
+ # # The returned object is of type Google::Protobuf::Empty.
1898
+ # p result
1899
+ #
1623
1900
  def cancel_operation request, options = nil
1624
1901
  raise ::ArgumentError, "request must be provided" if request.nil?
1625
1902
 
@@ -1637,16 +1914,20 @@ module Google
1637
1914
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1638
1915
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1639
1916
 
1640
- header_params = {
1641
- "name" => request.name
1642
- }
1917
+ header_params = {}
1918
+ if request.name
1919
+ header_params["name"] = request.name
1920
+ end
1921
+
1643
1922
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1644
1923
  metadata[:"x-goog-request-params"] ||= request_params_header
1645
1924
 
1646
1925
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
1647
1926
  metadata: metadata,
1648
1927
  retry_policy: @config.rpcs.cancel_operation.retry_policy
1649
- options.apply_defaults metadata: @config.metadata,
1928
+
1929
+ options.apply_defaults timeout: @config.timeout,
1930
+ metadata: @config.metadata,
1650
1931
  retry_policy: @config.retry_policy
1651
1932
 
1652
1933
  @cluster_manager_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -1696,6 +1977,21 @@ module Google
1696
1977
  #
1697
1978
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1698
1979
  #
1980
+ # @example Basic example
1981
+ # require "google/cloud/container/v1beta1"
1982
+ #
1983
+ # # Create a client object. The client can be reused for multiple calls.
1984
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
1985
+ #
1986
+ # # Create a request. To set request fields, pass in keyword arguments.
1987
+ # request = Google::Cloud::Container::V1beta1::GetServerConfigRequest.new
1988
+ #
1989
+ # # Call the get_server_config method.
1990
+ # result = client.get_server_config request
1991
+ #
1992
+ # # The returned object is of type Google::Cloud::Container::V1beta1::ServerConfig.
1993
+ # p result
1994
+ #
1699
1995
  def get_server_config request, options = nil
1700
1996
  raise ::ArgumentError, "request must be provided" if request.nil?
1701
1997
 
@@ -1713,16 +2009,20 @@ module Google
1713
2009
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1714
2010
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1715
2011
 
1716
- header_params = {
1717
- "name" => request.name
1718
- }
2012
+ header_params = {}
2013
+ if request.name
2014
+ header_params["name"] = request.name
2015
+ end
2016
+
1719
2017
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1720
2018
  metadata[:"x-goog-request-params"] ||= request_params_header
1721
2019
 
1722
2020
  options.apply_defaults timeout: @config.rpcs.get_server_config.timeout,
1723
2021
  metadata: metadata,
1724
2022
  retry_policy: @config.rpcs.get_server_config.retry_policy
1725
- options.apply_defaults metadata: @config.metadata,
2023
+
2024
+ options.apply_defaults timeout: @config.timeout,
2025
+ metadata: @config.metadata,
1726
2026
  retry_policy: @config.retry_policy
1727
2027
 
1728
2028
  @cluster_manager_stub.call_rpc :get_server_config, request, options: options do |response, operation|
@@ -1775,6 +2075,21 @@ module Google
1775
2075
  #
1776
2076
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1777
2077
  #
2078
+ # @example Basic example
2079
+ # require "google/cloud/container/v1beta1"
2080
+ #
2081
+ # # Create a client object. The client can be reused for multiple calls.
2082
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2083
+ #
2084
+ # # Create a request. To set request fields, pass in keyword arguments.
2085
+ # request = Google::Cloud::Container::V1beta1::ListNodePoolsRequest.new
2086
+ #
2087
+ # # Call the list_node_pools method.
2088
+ # result = client.list_node_pools request
2089
+ #
2090
+ # # The returned object is of type Google::Cloud::Container::V1beta1::ListNodePoolsResponse.
2091
+ # p result
2092
+ #
1778
2093
  def list_node_pools request, options = nil
1779
2094
  raise ::ArgumentError, "request must be provided" if request.nil?
1780
2095
 
@@ -1792,16 +2107,20 @@ module Google
1792
2107
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1793
2108
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1794
2109
 
1795
- header_params = {
1796
- "parent" => request.parent
1797
- }
2110
+ header_params = {}
2111
+ if request.parent
2112
+ header_params["parent"] = request.parent
2113
+ end
2114
+
1798
2115
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1799
2116
  metadata[:"x-goog-request-params"] ||= request_params_header
1800
2117
 
1801
2118
  options.apply_defaults timeout: @config.rpcs.list_node_pools.timeout,
1802
2119
  metadata: metadata,
1803
2120
  retry_policy: @config.rpcs.list_node_pools.retry_policy
1804
- options.apply_defaults metadata: @config.metadata,
2121
+
2122
+ options.apply_defaults timeout: @config.timeout,
2123
+ metadata: @config.metadata,
1805
2124
  retry_policy: @config.retry_policy
1806
2125
 
1807
2126
  @cluster_manager_stub.call_rpc :list_node_pools, request, options: options do |response, operation|
@@ -1845,6 +2164,21 @@ module Google
1845
2164
  #
1846
2165
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1847
2166
  #
2167
+ # @example Basic example
2168
+ # require "google/cloud/container/v1beta1"
2169
+ #
2170
+ # # Create a client object. The client can be reused for multiple calls.
2171
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2172
+ #
2173
+ # # Create a request. To set request fields, pass in keyword arguments.
2174
+ # request = Google::Cloud::Container::V1beta1::GetJSONWebKeysRequest.new
2175
+ #
2176
+ # # Call the get_json_web_keys method.
2177
+ # result = client.get_json_web_keys request
2178
+ #
2179
+ # # The returned object is of type Google::Cloud::Container::V1beta1::GetJSONWebKeysResponse.
2180
+ # p result
2181
+ #
1848
2182
  def get_json_web_keys request, options = nil
1849
2183
  raise ::ArgumentError, "request must be provided" if request.nil?
1850
2184
 
@@ -1862,16 +2196,20 @@ module Google
1862
2196
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1863
2197
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1864
2198
 
1865
- header_params = {
1866
- "parent" => request.parent
1867
- }
2199
+ header_params = {}
2200
+ if request.parent
2201
+ header_params["parent"] = request.parent
2202
+ end
2203
+
1868
2204
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1869
2205
  metadata[:"x-goog-request-params"] ||= request_params_header
1870
2206
 
1871
2207
  options.apply_defaults timeout: @config.rpcs.get_json_web_keys.timeout,
1872
2208
  metadata: metadata,
1873
2209
  retry_policy: @config.rpcs.get_json_web_keys.retry_policy
1874
- options.apply_defaults metadata: @config.metadata,
2210
+
2211
+ options.apply_defaults timeout: @config.timeout,
2212
+ metadata: @config.metadata,
1875
2213
  retry_policy: @config.retry_policy
1876
2214
 
1877
2215
  @cluster_manager_stub.call_rpc :get_json_web_keys, request, options: options do |response, operation|
@@ -1928,6 +2266,21 @@ module Google
1928
2266
  #
1929
2267
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1930
2268
  #
2269
+ # @example Basic example
2270
+ # require "google/cloud/container/v1beta1"
2271
+ #
2272
+ # # Create a client object. The client can be reused for multiple calls.
2273
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2274
+ #
2275
+ # # Create a request. To set request fields, pass in keyword arguments.
2276
+ # request = Google::Cloud::Container::V1beta1::GetNodePoolRequest.new
2277
+ #
2278
+ # # Call the get_node_pool method.
2279
+ # result = client.get_node_pool request
2280
+ #
2281
+ # # The returned object is of type Google::Cloud::Container::V1beta1::NodePool.
2282
+ # p result
2283
+ #
1931
2284
  def get_node_pool request, options = nil
1932
2285
  raise ::ArgumentError, "request must be provided" if request.nil?
1933
2286
 
@@ -1945,16 +2298,20 @@ module Google
1945
2298
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
1946
2299
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1947
2300
 
1948
- header_params = {
1949
- "name" => request.name
1950
- }
2301
+ header_params = {}
2302
+ if request.name
2303
+ header_params["name"] = request.name
2304
+ end
2305
+
1951
2306
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1952
2307
  metadata[:"x-goog-request-params"] ||= request_params_header
1953
2308
 
1954
2309
  options.apply_defaults timeout: @config.rpcs.get_node_pool.timeout,
1955
2310
  metadata: metadata,
1956
2311
  retry_policy: @config.rpcs.get_node_pool.retry_policy
1957
- options.apply_defaults metadata: @config.metadata,
2312
+
2313
+ options.apply_defaults timeout: @config.timeout,
2314
+ metadata: @config.metadata,
1958
2315
  retry_policy: @config.retry_policy
1959
2316
 
1960
2317
  @cluster_manager_stub.call_rpc :get_node_pool, request, options: options do |response, operation|
@@ -2010,6 +2367,21 @@ module Google
2010
2367
  #
2011
2368
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2012
2369
  #
2370
+ # @example Basic example
2371
+ # require "google/cloud/container/v1beta1"
2372
+ #
2373
+ # # Create a client object. The client can be reused for multiple calls.
2374
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2375
+ #
2376
+ # # Create a request. To set request fields, pass in keyword arguments.
2377
+ # request = Google::Cloud::Container::V1beta1::CreateNodePoolRequest.new
2378
+ #
2379
+ # # Call the create_node_pool method.
2380
+ # result = client.create_node_pool request
2381
+ #
2382
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
2383
+ # p result
2384
+ #
2013
2385
  def create_node_pool request, options = nil
2014
2386
  raise ::ArgumentError, "request must be provided" if request.nil?
2015
2387
 
@@ -2027,16 +2399,20 @@ module Google
2027
2399
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2028
2400
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2029
2401
 
2030
- header_params = {
2031
- "parent" => request.parent
2032
- }
2402
+ header_params = {}
2403
+ if request.parent
2404
+ header_params["parent"] = request.parent
2405
+ end
2406
+
2033
2407
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2034
2408
  metadata[:"x-goog-request-params"] ||= request_params_header
2035
2409
 
2036
2410
  options.apply_defaults timeout: @config.rpcs.create_node_pool.timeout,
2037
2411
  metadata: metadata,
2038
2412
  retry_policy: @config.rpcs.create_node_pool.retry_policy
2039
- options.apply_defaults metadata: @config.metadata,
2413
+
2414
+ options.apply_defaults timeout: @config.timeout,
2415
+ metadata: @config.metadata,
2040
2416
  retry_policy: @config.retry_policy
2041
2417
 
2042
2418
  @cluster_manager_stub.call_rpc :create_node_pool, request, options: options do |response, operation|
@@ -2093,6 +2469,21 @@ module Google
2093
2469
  #
2094
2470
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2095
2471
  #
2472
+ # @example Basic example
2473
+ # require "google/cloud/container/v1beta1"
2474
+ #
2475
+ # # Create a client object. The client can be reused for multiple calls.
2476
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2477
+ #
2478
+ # # Create a request. To set request fields, pass in keyword arguments.
2479
+ # request = Google::Cloud::Container::V1beta1::DeleteNodePoolRequest.new
2480
+ #
2481
+ # # Call the delete_node_pool method.
2482
+ # result = client.delete_node_pool request
2483
+ #
2484
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
2485
+ # p result
2486
+ #
2096
2487
  def delete_node_pool request, options = nil
2097
2488
  raise ::ArgumentError, "request must be provided" if request.nil?
2098
2489
 
@@ -2110,16 +2501,20 @@ module Google
2110
2501
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2111
2502
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2112
2503
 
2113
- header_params = {
2114
- "name" => request.name
2115
- }
2504
+ header_params = {}
2505
+ if request.name
2506
+ header_params["name"] = request.name
2507
+ end
2508
+
2116
2509
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2117
2510
  metadata[:"x-goog-request-params"] ||= request_params_header
2118
2511
 
2119
2512
  options.apply_defaults timeout: @config.rpcs.delete_node_pool.timeout,
2120
2513
  metadata: metadata,
2121
2514
  retry_policy: @config.rpcs.delete_node_pool.retry_policy
2122
- options.apply_defaults metadata: @config.metadata,
2515
+
2516
+ options.apply_defaults timeout: @config.timeout,
2517
+ metadata: @config.metadata,
2123
2518
  retry_policy: @config.retry_policy
2124
2519
 
2125
2520
  @cluster_manager_stub.call_rpc :delete_node_pool, request, options: options do |response, operation|
@@ -2177,6 +2572,21 @@ module Google
2177
2572
  #
2178
2573
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2179
2574
  #
2575
+ # @example Basic example
2576
+ # require "google/cloud/container/v1beta1"
2577
+ #
2578
+ # # Create a client object. The client can be reused for multiple calls.
2579
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2580
+ #
2581
+ # # Create a request. To set request fields, pass in keyword arguments.
2582
+ # request = Google::Cloud::Container::V1beta1::RollbackNodePoolUpgradeRequest.new
2583
+ #
2584
+ # # Call the rollback_node_pool_upgrade method.
2585
+ # result = client.rollback_node_pool_upgrade request
2586
+ #
2587
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
2588
+ # p result
2589
+ #
2180
2590
  def rollback_node_pool_upgrade request, options = nil
2181
2591
  raise ::ArgumentError, "request must be provided" if request.nil?
2182
2592
 
@@ -2194,16 +2604,20 @@ module Google
2194
2604
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2195
2605
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2196
2606
 
2197
- header_params = {
2198
- "name" => request.name
2199
- }
2607
+ header_params = {}
2608
+ if request.name
2609
+ header_params["name"] = request.name
2610
+ end
2611
+
2200
2612
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2201
2613
  metadata[:"x-goog-request-params"] ||= request_params_header
2202
2614
 
2203
2615
  options.apply_defaults timeout: @config.rpcs.rollback_node_pool_upgrade.timeout,
2204
2616
  metadata: metadata,
2205
2617
  retry_policy: @config.rpcs.rollback_node_pool_upgrade.retry_policy
2206
- options.apply_defaults metadata: @config.metadata,
2618
+
2619
+ options.apply_defaults timeout: @config.timeout,
2620
+ metadata: @config.metadata,
2207
2621
  retry_policy: @config.retry_policy
2208
2622
 
2209
2623
  @cluster_manager_stub.call_rpc :rollback_node_pool_upgrade, request, options: options do |response, operation|
@@ -2262,6 +2676,21 @@ module Google
2262
2676
  #
2263
2677
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2264
2678
  #
2679
+ # @example Basic example
2680
+ # require "google/cloud/container/v1beta1"
2681
+ #
2682
+ # # Create a client object. The client can be reused for multiple calls.
2683
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2684
+ #
2685
+ # # Create a request. To set request fields, pass in keyword arguments.
2686
+ # request = Google::Cloud::Container::V1beta1::SetNodePoolManagementRequest.new
2687
+ #
2688
+ # # Call the set_node_pool_management method.
2689
+ # result = client.set_node_pool_management request
2690
+ #
2691
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
2692
+ # p result
2693
+ #
2265
2694
  def set_node_pool_management request, options = nil
2266
2695
  raise ::ArgumentError, "request must be provided" if request.nil?
2267
2696
 
@@ -2279,16 +2708,20 @@ module Google
2279
2708
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2280
2709
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2281
2710
 
2282
- header_params = {
2283
- "name" => request.name
2284
- }
2711
+ header_params = {}
2712
+ if request.name
2713
+ header_params["name"] = request.name
2714
+ end
2715
+
2285
2716
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2286
2717
  metadata[:"x-goog-request-params"] ||= request_params_header
2287
2718
 
2288
2719
  options.apply_defaults timeout: @config.rpcs.set_node_pool_management.timeout,
2289
2720
  metadata: metadata,
2290
2721
  retry_policy: @config.rpcs.set_node_pool_management.retry_policy
2291
- options.apply_defaults metadata: @config.metadata,
2722
+
2723
+ options.apply_defaults timeout: @config.timeout,
2724
+ metadata: @config.metadata,
2292
2725
  retry_policy: @config.retry_policy
2293
2726
 
2294
2727
  @cluster_manager_stub.call_rpc :set_node_pool_management, request, options: options do |response, operation|
@@ -2350,6 +2783,21 @@ module Google
2350
2783
  #
2351
2784
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2352
2785
  #
2786
+ # @example Basic example
2787
+ # require "google/cloud/container/v1beta1"
2788
+ #
2789
+ # # Create a client object. The client can be reused for multiple calls.
2790
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2791
+ #
2792
+ # # Create a request. To set request fields, pass in keyword arguments.
2793
+ # request = Google::Cloud::Container::V1beta1::SetLabelsRequest.new
2794
+ #
2795
+ # # Call the set_labels method.
2796
+ # result = client.set_labels request
2797
+ #
2798
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
2799
+ # p result
2800
+ #
2353
2801
  def set_labels request, options = nil
2354
2802
  raise ::ArgumentError, "request must be provided" if request.nil?
2355
2803
 
@@ -2367,16 +2815,20 @@ module Google
2367
2815
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2368
2816
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2369
2817
 
2370
- header_params = {
2371
- "name" => request.name
2372
- }
2818
+ header_params = {}
2819
+ if request.name
2820
+ header_params["name"] = request.name
2821
+ end
2822
+
2373
2823
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2374
2824
  metadata[:"x-goog-request-params"] ||= request_params_header
2375
2825
 
2376
2826
  options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
2377
2827
  metadata: metadata,
2378
2828
  retry_policy: @config.rpcs.set_labels.retry_policy
2379
- options.apply_defaults metadata: @config.metadata,
2829
+
2830
+ options.apply_defaults timeout: @config.timeout,
2831
+ metadata: @config.metadata,
2380
2832
  retry_policy: @config.retry_policy
2381
2833
 
2382
2834
  @cluster_manager_stub.call_rpc :set_labels, request, options: options do |response, operation|
@@ -2431,6 +2883,21 @@ module Google
2431
2883
  #
2432
2884
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2433
2885
  #
2886
+ # @example Basic example
2887
+ # require "google/cloud/container/v1beta1"
2888
+ #
2889
+ # # Create a client object. The client can be reused for multiple calls.
2890
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2891
+ #
2892
+ # # Create a request. To set request fields, pass in keyword arguments.
2893
+ # request = Google::Cloud::Container::V1beta1::SetLegacyAbacRequest.new
2894
+ #
2895
+ # # Call the set_legacy_abac method.
2896
+ # result = client.set_legacy_abac request
2897
+ #
2898
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
2899
+ # p result
2900
+ #
2434
2901
  def set_legacy_abac request, options = nil
2435
2902
  raise ::ArgumentError, "request must be provided" if request.nil?
2436
2903
 
@@ -2448,16 +2915,20 @@ module Google
2448
2915
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2449
2916
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2450
2917
 
2451
- header_params = {
2452
- "name" => request.name
2453
- }
2918
+ header_params = {}
2919
+ if request.name
2920
+ header_params["name"] = request.name
2921
+ end
2922
+
2454
2923
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2455
2924
  metadata[:"x-goog-request-params"] ||= request_params_header
2456
2925
 
2457
2926
  options.apply_defaults timeout: @config.rpcs.set_legacy_abac.timeout,
2458
2927
  metadata: metadata,
2459
2928
  retry_policy: @config.rpcs.set_legacy_abac.retry_policy
2460
- options.apply_defaults metadata: @config.metadata,
2929
+
2930
+ options.apply_defaults timeout: @config.timeout,
2931
+ metadata: @config.metadata,
2461
2932
  retry_policy: @config.retry_policy
2462
2933
 
2463
2934
  @cluster_manager_stub.call_rpc :set_legacy_abac, request, options: options do |response, operation|
@@ -2512,6 +2983,21 @@ module Google
2512
2983
  #
2513
2984
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2514
2985
  #
2986
+ # @example Basic example
2987
+ # require "google/cloud/container/v1beta1"
2988
+ #
2989
+ # # Create a client object. The client can be reused for multiple calls.
2990
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
2991
+ #
2992
+ # # Create a request. To set request fields, pass in keyword arguments.
2993
+ # request = Google::Cloud::Container::V1beta1::StartIPRotationRequest.new
2994
+ #
2995
+ # # Call the start_ip_rotation method.
2996
+ # result = client.start_ip_rotation request
2997
+ #
2998
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
2999
+ # p result
3000
+ #
2515
3001
  def start_ip_rotation request, options = nil
2516
3002
  raise ::ArgumentError, "request must be provided" if request.nil?
2517
3003
 
@@ -2529,16 +3015,20 @@ module Google
2529
3015
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2530
3016
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2531
3017
 
2532
- header_params = {
2533
- "name" => request.name
2534
- }
3018
+ header_params = {}
3019
+ if request.name
3020
+ header_params["name"] = request.name
3021
+ end
3022
+
2535
3023
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2536
3024
  metadata[:"x-goog-request-params"] ||= request_params_header
2537
3025
 
2538
3026
  options.apply_defaults timeout: @config.rpcs.start_ip_rotation.timeout,
2539
3027
  metadata: metadata,
2540
3028
  retry_policy: @config.rpcs.start_ip_rotation.retry_policy
2541
- options.apply_defaults metadata: @config.metadata,
3029
+
3030
+ options.apply_defaults timeout: @config.timeout,
3031
+ metadata: @config.metadata,
2542
3032
  retry_policy: @config.retry_policy
2543
3033
 
2544
3034
  @cluster_manager_stub.call_rpc :start_ip_rotation, request, options: options do |response, operation|
@@ -2591,6 +3081,21 @@ module Google
2591
3081
  #
2592
3082
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2593
3083
  #
3084
+ # @example Basic example
3085
+ # require "google/cloud/container/v1beta1"
3086
+ #
3087
+ # # Create a client object. The client can be reused for multiple calls.
3088
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
3089
+ #
3090
+ # # Create a request. To set request fields, pass in keyword arguments.
3091
+ # request = Google::Cloud::Container::V1beta1::CompleteIPRotationRequest.new
3092
+ #
3093
+ # # Call the complete_ip_rotation method.
3094
+ # result = client.complete_ip_rotation request
3095
+ #
3096
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
3097
+ # p result
3098
+ #
2594
3099
  def complete_ip_rotation request, options = nil
2595
3100
  raise ::ArgumentError, "request must be provided" if request.nil?
2596
3101
 
@@ -2608,16 +3113,20 @@ module Google
2608
3113
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2609
3114
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2610
3115
 
2611
- header_params = {
2612
- "name" => request.name
2613
- }
3116
+ header_params = {}
3117
+ if request.name
3118
+ header_params["name"] = request.name
3119
+ end
3120
+
2614
3121
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2615
3122
  metadata[:"x-goog-request-params"] ||= request_params_header
2616
3123
 
2617
3124
  options.apply_defaults timeout: @config.rpcs.complete_ip_rotation.timeout,
2618
3125
  metadata: metadata,
2619
3126
  retry_policy: @config.rpcs.complete_ip_rotation.retry_policy
2620
- options.apply_defaults metadata: @config.metadata,
3127
+
3128
+ options.apply_defaults timeout: @config.timeout,
3129
+ metadata: @config.metadata,
2621
3130
  retry_policy: @config.retry_policy
2622
3131
 
2623
3132
  @cluster_manager_stub.call_rpc :complete_ip_rotation, request, options: options do |response, operation|
@@ -2629,7 +3138,9 @@ module Google
2629
3138
  end
2630
3139
 
2631
3140
  ##
2632
- # Sets the size for a specific node pool.
3141
+ # SetNodePoolSizeRequest sets the size of a node pool. The new size will be
3142
+ # used for all replicas, including future replicas created by modifying
3143
+ # {::Google::Cloud::Container::V1beta1::NodePool#locations NodePool.locations}.
2633
3144
  #
2634
3145
  # @overload set_node_pool_size(request, options = nil)
2635
3146
  # Pass arguments to `set_node_pool_size` via a request object, either of type
@@ -2676,6 +3187,21 @@ module Google
2676
3187
  #
2677
3188
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2678
3189
  #
3190
+ # @example Basic example
3191
+ # require "google/cloud/container/v1beta1"
3192
+ #
3193
+ # # Create a client object. The client can be reused for multiple calls.
3194
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
3195
+ #
3196
+ # # Create a request. To set request fields, pass in keyword arguments.
3197
+ # request = Google::Cloud::Container::V1beta1::SetNodePoolSizeRequest.new
3198
+ #
3199
+ # # Call the set_node_pool_size method.
3200
+ # result = client.set_node_pool_size request
3201
+ #
3202
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
3203
+ # p result
3204
+ #
2679
3205
  def set_node_pool_size request, options = nil
2680
3206
  raise ::ArgumentError, "request must be provided" if request.nil?
2681
3207
 
@@ -2693,16 +3219,20 @@ module Google
2693
3219
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2694
3220
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2695
3221
 
2696
- header_params = {
2697
- "name" => request.name
2698
- }
3222
+ header_params = {}
3223
+ if request.name
3224
+ header_params["name"] = request.name
3225
+ end
3226
+
2699
3227
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2700
3228
  metadata[:"x-goog-request-params"] ||= request_params_header
2701
3229
 
2702
3230
  options.apply_defaults timeout: @config.rpcs.set_node_pool_size.timeout,
2703
3231
  metadata: metadata,
2704
3232
  retry_policy: @config.rpcs.set_node_pool_size.retry_policy
2705
- options.apply_defaults metadata: @config.metadata,
3233
+
3234
+ options.apply_defaults timeout: @config.timeout,
3235
+ metadata: @config.metadata,
2706
3236
  retry_policy: @config.retry_policy
2707
3237
 
2708
3238
  @cluster_manager_stub.call_rpc :set_node_pool_size, request, options: options do |response, operation|
@@ -2757,6 +3287,21 @@ module Google
2757
3287
  #
2758
3288
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2759
3289
  #
3290
+ # @example Basic example
3291
+ # require "google/cloud/container/v1beta1"
3292
+ #
3293
+ # # Create a client object. The client can be reused for multiple calls.
3294
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
3295
+ #
3296
+ # # Create a request. To set request fields, pass in keyword arguments.
3297
+ # request = Google::Cloud::Container::V1beta1::SetNetworkPolicyRequest.new
3298
+ #
3299
+ # # Call the set_network_policy method.
3300
+ # result = client.set_network_policy request
3301
+ #
3302
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
3303
+ # p result
3304
+ #
2760
3305
  def set_network_policy request, options = nil
2761
3306
  raise ::ArgumentError, "request must be provided" if request.nil?
2762
3307
 
@@ -2774,16 +3319,20 @@ module Google
2774
3319
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2775
3320
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2776
3321
 
2777
- header_params = {
2778
- "name" => request.name
2779
- }
3322
+ header_params = {}
3323
+ if request.name
3324
+ header_params["name"] = request.name
3325
+ end
3326
+
2780
3327
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2781
3328
  metadata[:"x-goog-request-params"] ||= request_params_header
2782
3329
 
2783
3330
  options.apply_defaults timeout: @config.rpcs.set_network_policy.timeout,
2784
3331
  metadata: metadata,
2785
3332
  retry_policy: @config.rpcs.set_network_policy.retry_policy
2786
- options.apply_defaults metadata: @config.metadata,
3333
+
3334
+ options.apply_defaults timeout: @config.timeout,
3335
+ metadata: @config.metadata,
2787
3336
  retry_policy: @config.retry_policy
2788
3337
 
2789
3338
  @cluster_manager_stub.call_rpc :set_network_policy, request, options: options do |response, operation|
@@ -2837,6 +3386,21 @@ module Google
2837
3386
  #
2838
3387
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2839
3388
  #
3389
+ # @example Basic example
3390
+ # require "google/cloud/container/v1beta1"
3391
+ #
3392
+ # # Create a client object. The client can be reused for multiple calls.
3393
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
3394
+ #
3395
+ # # Create a request. To set request fields, pass in keyword arguments.
3396
+ # request = Google::Cloud::Container::V1beta1::SetMaintenancePolicyRequest.new
3397
+ #
3398
+ # # Call the set_maintenance_policy method.
3399
+ # result = client.set_maintenance_policy request
3400
+ #
3401
+ # # The returned object is of type Google::Cloud::Container::V1beta1::Operation.
3402
+ # p result
3403
+ #
2840
3404
  def set_maintenance_policy request, options = nil
2841
3405
  raise ::ArgumentError, "request must be provided" if request.nil?
2842
3406
 
@@ -2854,16 +3418,20 @@ module Google
2854
3418
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2855
3419
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2856
3420
 
2857
- header_params = {
2858
- "name" => request.name
2859
- }
3421
+ header_params = {}
3422
+ if request.name
3423
+ header_params["name"] = request.name
3424
+ end
3425
+
2860
3426
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2861
3427
  metadata[:"x-goog-request-params"] ||= request_params_header
2862
3428
 
2863
3429
  options.apply_defaults timeout: @config.rpcs.set_maintenance_policy.timeout,
2864
3430
  metadata: metadata,
2865
3431
  retry_policy: @config.rpcs.set_maintenance_policy.retry_policy
2866
- options.apply_defaults metadata: @config.metadata,
3432
+
3433
+ options.apply_defaults timeout: @config.timeout,
3434
+ metadata: @config.metadata,
2867
3435
  retry_policy: @config.retry_policy
2868
3436
 
2869
3437
  @cluster_manager_stub.call_rpc :set_maintenance_policy, request, options: options do |response, operation|
@@ -2917,6 +3485,27 @@ module Google
2917
3485
  #
2918
3486
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2919
3487
  #
3488
+ # @example Basic example
3489
+ # require "google/cloud/container/v1beta1"
3490
+ #
3491
+ # # Create a client object. The client can be reused for multiple calls.
3492
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
3493
+ #
3494
+ # # Create a request. To set request fields, pass in keyword arguments.
3495
+ # request = Google::Cloud::Container::V1beta1::ListUsableSubnetworksRequest.new
3496
+ #
3497
+ # # Call the list_usable_subnetworks method.
3498
+ # result = client.list_usable_subnetworks request
3499
+ #
3500
+ # # The returned object is of type Gapic::PagedEnumerable. You can
3501
+ # # iterate over all elements by calling #each, and the enumerable
3502
+ # # will lazily make API calls to fetch subsequent pages. Other
3503
+ # # methods are also available for managing paging directly.
3504
+ # result.each do |response|
3505
+ # # Each element is of type ::Google::Cloud::Container::V1beta1::UsableSubnetwork.
3506
+ # p response
3507
+ # end
3508
+ #
2920
3509
  def list_usable_subnetworks request, options = nil
2921
3510
  raise ::ArgumentError, "request must be provided" if request.nil?
2922
3511
 
@@ -2934,16 +3523,20 @@ module Google
2934
3523
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
2935
3524
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2936
3525
 
2937
- header_params = {
2938
- "parent" => request.parent
2939
- }
3526
+ header_params = {}
3527
+ if request.parent
3528
+ header_params["parent"] = request.parent
3529
+ end
3530
+
2940
3531
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2941
3532
  metadata[:"x-goog-request-params"] ||= request_params_header
2942
3533
 
2943
3534
  options.apply_defaults timeout: @config.rpcs.list_usable_subnetworks.timeout,
2944
3535
  metadata: metadata,
2945
3536
  retry_policy: @config.rpcs.list_usable_subnetworks.retry_policy
2946
- options.apply_defaults metadata: @config.metadata,
3537
+
3538
+ options.apply_defaults timeout: @config.timeout,
3539
+ metadata: @config.metadata,
2947
3540
  retry_policy: @config.retry_policy
2948
3541
 
2949
3542
  @cluster_manager_stub.call_rpc :list_usable_subnetworks, request, options: options do |response, operation|
@@ -2985,6 +3578,21 @@ module Google
2985
3578
  #
2986
3579
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2987
3580
  #
3581
+ # @example Basic example
3582
+ # require "google/cloud/container/v1beta1"
3583
+ #
3584
+ # # Create a client object. The client can be reused for multiple calls.
3585
+ # client = Google::Cloud::Container::V1beta1::ClusterManager::Client.new
3586
+ #
3587
+ # # Create a request. To set request fields, pass in keyword arguments.
3588
+ # request = Google::Cloud::Container::V1beta1::ListLocationsRequest.new
3589
+ #
3590
+ # # Call the list_locations method.
3591
+ # result = client.list_locations request
3592
+ #
3593
+ # # The returned object is of type Google::Cloud::Container::V1beta1::ListLocationsResponse.
3594
+ # p result
3595
+ #
2988
3596
  def list_locations request, options = nil
2989
3597
  raise ::ArgumentError, "request must be provided" if request.nil?
2990
3598
 
@@ -3002,16 +3610,20 @@ module Google
3002
3610
  gapic_version: ::Google::Cloud::Container::V1beta1::VERSION
3003
3611
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3004
3612
 
3005
- header_params = {
3006
- "parent" => request.parent
3007
- }
3613
+ header_params = {}
3614
+ if request.parent
3615
+ header_params["parent"] = request.parent
3616
+ end
3617
+
3008
3618
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3009
3619
  metadata[:"x-goog-request-params"] ||= request_params_header
3010
3620
 
3011
3621
  options.apply_defaults timeout: @config.rpcs.list_locations.timeout,
3012
3622
  metadata: metadata,
3013
3623
  retry_policy: @config.rpcs.list_locations.retry_policy
3014
- options.apply_defaults metadata: @config.metadata,
3624
+
3625
+ options.apply_defaults timeout: @config.timeout,
3626
+ metadata: @config.metadata,
3015
3627
  retry_policy: @config.retry_policy
3016
3628
 
3017
3629
  @cluster_manager_stub.call_rpc :list_locations, request, options: options do |response, operation|
@@ -3035,22 +3647,21 @@ module Google
3035
3647
  # Configuration can be applied globally to all clients, or to a single client
3036
3648
  # on construction.
3037
3649
  #
3038
- # # Examples
3039
- #
3040
- # To modify the global config, setting the timeout for list_clusters
3041
- # to 20 seconds, and all remaining timeouts to 10 seconds:
3042
- #
3043
- # ::Google::Cloud::Container::V1beta1::ClusterManager::Client.configure do |config|
3044
- # config.timeout = 10.0
3045
- # config.rpcs.list_clusters.timeout = 20.0
3046
- # end
3047
- #
3048
- # To apply the above configuration only to a new client:
3049
- #
3050
- # client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config|
3051
- # config.timeout = 10.0
3052
- # config.rpcs.list_clusters.timeout = 20.0
3053
- # end
3650
+ # @example
3651
+ #
3652
+ # # Modify the global config, setting the timeout for
3653
+ # # list_clusters to 20 seconds,
3654
+ # # and all remaining timeouts to 10 seconds.
3655
+ # ::Google::Cloud::Container::V1beta1::ClusterManager::Client.configure do |config|
3656
+ # config.timeout = 10.0
3657
+ # config.rpcs.list_clusters.timeout = 20.0
3658
+ # end
3659
+ #
3660
+ # # Apply the above configuration only to a new client.
3661
+ # client = ::Google::Cloud::Container::V1beta1::ClusterManager::Client.new do |config|
3662
+ # config.timeout = 10.0
3663
+ # config.rpcs.list_clusters.timeout = 20.0
3664
+ # end
3054
3665
  #
3055
3666
  # @!attribute [rw] endpoint
3056
3667
  # The hostname or hostname:port of the service endpoint.