google-cloud-app_engine-v1 0.6.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/appengine/v1/app_yaml_pb.rb +25 -103
  3. data/lib/google/appengine/v1/appengine_pb.rb +33 -186
  4. data/lib/google/appengine/v1/application_pb.rb +25 -45
  5. data/lib/google/appengine/v1/audit_data_pb.rb +25 -13
  6. data/lib/google/appengine/v1/certificate_pb.rb +25 -29
  7. data/lib/google/appengine/v1/deploy_pb.rb +25 -23
  8. data/lib/google/appengine/v1/deployed_files_pb.rb +25 -2
  9. data/lib/google/appengine/v1/domain_mapping_pb.rb +24 -28
  10. data/lib/google/appengine/v1/domain_pb.rb +24 -5
  11. data/lib/google/appengine/v1/firewall_pb.rb +24 -12
  12. data/lib/google/appengine/v1/instance_pb.rb +25 -35
  13. data/lib/google/appengine/v1/location_pb.rb +24 -6
  14. data/lib/google/appengine/v1/network_settings_pb.rb +24 -10
  15. data/lib/google/appengine/v1/operation_pb.rb +25 -16
  16. data/lib/google/appengine/v1/service_pb.rb +25 -18
  17. data/lib/google/appengine/v1/version_pb.rb +28 -153
  18. data/lib/google/cloud/app_engine/v1/applications/client.rb +14 -3
  19. data/lib/google/cloud/app_engine/v1/applications/operations.rb +13 -2
  20. data/lib/google/cloud/app_engine/v1/applications/rest/client.rb +89 -2
  21. data/lib/google/cloud/app_engine/v1/applications/rest/operations.rb +82 -5
  22. data/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb +4 -4
  23. data/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb +14 -3
  24. data/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb +88 -2
  25. data/lib/google/cloud/app_engine/v1/authorized_certificates/rest/service_stub.rb +5 -5
  26. data/lib/google/cloud/app_engine/v1/authorized_domains/client.rb +14 -3
  27. data/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.rb +24 -2
  28. data/lib/google/cloud/app_engine/v1/authorized_domains/rest/service_stub.rb +1 -1
  29. data/lib/google/cloud/app_engine/v1/domain_mappings/client.rb +14 -3
  30. data/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb +13 -2
  31. data/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb +109 -2
  32. data/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb +82 -5
  33. data/lib/google/cloud/app_engine/v1/domain_mappings/rest/service_stub.rb +5 -5
  34. data/lib/google/cloud/app_engine/v1/firewall/client.rb +14 -3
  35. data/lib/google/cloud/app_engine/v1/firewall/rest/client.rb +104 -2
  36. data/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb +6 -6
  37. data/lib/google/cloud/app_engine/v1/instances/client.rb +14 -3
  38. data/lib/google/cloud/app_engine/v1/instances/operations.rb +13 -2
  39. data/lib/google/cloud/app_engine/v1/instances/rest/client.rb +86 -2
  40. data/lib/google/cloud/app_engine/v1/instances/rest/operations.rb +82 -5
  41. data/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb +4 -4
  42. data/lib/google/cloud/app_engine/v1/services/client.rb +14 -3
  43. data/lib/google/cloud/app_engine/v1/services/operations.rb +13 -2
  44. data/lib/google/cloud/app_engine/v1/services/rest/client.rb +86 -2
  45. data/lib/google/cloud/app_engine/v1/services/rest/operations.rb +82 -5
  46. data/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb +4 -4
  47. data/lib/google/cloud/app_engine/v1/version.rb +1 -1
  48. data/lib/google/cloud/app_engine/v1/versions/client.rb +14 -3
  49. data/lib/google/cloud/app_engine/v1/versions/operations.rb +13 -2
  50. data/lib/google/cloud/app_engine/v1/versions/rest/client.rb +109 -2
  51. data/lib/google/cloud/app_engine/v1/versions/rest/operations.rb +82 -5
  52. data/lib/google/cloud/app_engine/v1/versions/rest/service_stub.rb +5 -5
  53. data/proto_docs/google/api/client.rb +10 -1
  54. data/proto_docs/google/api/field_behavior.rb +14 -0
  55. data/proto_docs/google/protobuf/any.rb +7 -4
  56. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  57. metadata +5 -5
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -446,7 +521,9 @@ module Google
446
521
  class Configuration
447
522
  extend ::Gapic::Config
448
523
 
449
- config_attr :endpoint, "appengine.googleapis.com", ::String
524
+ DEFAULT_ENDPOINT = "appengine.googleapis.com"
525
+
526
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
450
527
  config_attr :credentials, nil do |value|
451
528
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
529
  allowed.any? { |klass| klass === value }
@@ -567,7 +644,7 @@ module Google
567
644
 
568
645
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
569
646
  query_string_params = if query_string_params.any?
570
- query_string_params.to_h { |p| p.split("=", 2) }
647
+ query_string_params.to_h { |p| p.split "=", 2 }
571
648
  else
572
649
  {}
573
650
  end
@@ -605,7 +682,7 @@ module Google
605
682
 
606
683
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
607
684
  query_string_params = if query_string_params.any?
608
- query_string_params.to_h { |p| p.split("=", 2) }
685
+ query_string_params.to_h { |p| p.split "=", 2 }
609
686
  else
610
687
  {}
611
688
  end
@@ -643,7 +720,7 @@ module Google
643
720
 
644
721
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
645
722
  query_string_params = if query_string_params.any?
646
- query_string_params.to_h { |p| p.split("=", 2) }
723
+ query_string_params.to_h { |p| p.split "=", 2 }
647
724
  else
648
725
  {}
649
726
  end
@@ -681,7 +758,7 @@ module Google
681
758
 
682
759
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
683
760
  query_string_params = if query_string_params.any?
684
- query_string_params.to_h { |p| p.split("=", 2) }
761
+ query_string_params.to_h { |p| p.split "=", 2 }
685
762
  else
686
763
  {}
687
764
  end
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_list_domain_mappings_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_domain_mapping_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_create_domain_mapping_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_update_domain_mapping_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_domain_mapping_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -130,7 +130,7 @@ module Google
130
130
  credentials = @config.credentials
131
131
  # Use self-signed JWT if the endpoint is unchanged from default,
132
132
  # but only if the default endpoint does not have a region prefix.
133
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
134
134
  !@config.endpoint.split(".").first.include?("-")
135
135
  credentials ||= Credentials.default scope: @config.scope,
136
136
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -145,7 +145,8 @@ module Google
145
145
  credentials: credentials,
146
146
  endpoint: @config.endpoint,
147
147
  channel_args: @config.channel_args,
148
- interceptors: @config.interceptors
148
+ interceptors: @config.interceptors,
149
+ channel_pool_config: @config.channel_pool
149
150
  )
150
151
  end
151
152
 
@@ -783,7 +784,9 @@ module Google
783
784
  class Configuration
784
785
  extend ::Gapic::Config
785
786
 
786
- config_attr :endpoint, "appengine.googleapis.com", ::String
787
+ DEFAULT_ENDPOINT = "appengine.googleapis.com"
788
+
789
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
787
790
  config_attr :credentials, nil do |value|
788
791
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
789
792
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -818,6 +821,14 @@ module Google
818
821
  end
819
822
  end
820
823
 
824
+ ##
825
+ # Configuration for the channel pool
826
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
827
+ #
828
+ def channel_pool
829
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
830
+ end
831
+
821
832
  ##
822
833
  # Configuration RPC class for the Firewall API.
823
834
  #
@@ -126,7 +126,7 @@ module Google
126
126
  credentials = @config.credentials
127
127
  # Use self-signed JWT if the endpoint is unchanged from default,
128
128
  # but only if the default endpoint does not have a region prefix.
129
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
129
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
130
130
  !@config.endpoint.split(".").first.include?("-")
131
131
  credentials ||= Credentials.default scope: @config.scope,
132
132
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -178,6 +178,26 @@ module Google
178
178
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::FirewallRule>]
179
179
  #
180
180
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
181
+ #
182
+ # @example Basic example
183
+ # require "google/cloud/app_engine/v1"
184
+ #
185
+ # # Create a client object. The client can be reused for multiple calls.
186
+ # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new
187
+ #
188
+ # # Create a request. To set request fields, pass in keyword arguments.
189
+ # request = Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new
190
+ #
191
+ # # Call the list_ingress_rules method.
192
+ # result = client.list_ingress_rules request
193
+ #
194
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
195
+ # # over elements, and API calls will be issued to fetch pages as needed.
196
+ # result.each do |item|
197
+ # # Each element is of type ::Google::Cloud::AppEngine::V1::FirewallRule.
198
+ # p item
199
+ # end
200
+ #
181
201
  def list_ingress_rules request, options = nil
182
202
  raise ::ArgumentError, "request must be provided" if request.nil?
183
203
 
@@ -248,6 +268,22 @@ module Google
248
268
  # @return [::Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse]
249
269
  #
250
270
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
271
+ #
272
+ # @example Basic example
273
+ # require "google/cloud/app_engine/v1"
274
+ #
275
+ # # Create a client object. The client can be reused for multiple calls.
276
+ # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new
277
+ #
278
+ # # Create a request. To set request fields, pass in keyword arguments.
279
+ # request = Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new
280
+ #
281
+ # # Call the batch_update_ingress_rules method.
282
+ # result = client.batch_update_ingress_rules request
283
+ #
284
+ # # The returned object is of type Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse.
285
+ # p result
286
+ #
251
287
  def batch_update_ingress_rules request, options = nil
252
288
  raise ::ArgumentError, "request must be provided" if request.nil?
253
289
 
@@ -322,6 +358,22 @@ module Google
322
358
  # @return [::Google::Cloud::AppEngine::V1::FirewallRule]
323
359
  #
324
360
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
361
+ #
362
+ # @example Basic example
363
+ # require "google/cloud/app_engine/v1"
364
+ #
365
+ # # Create a client object. The client can be reused for multiple calls.
366
+ # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new
367
+ #
368
+ # # Create a request. To set request fields, pass in keyword arguments.
369
+ # request = Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new
370
+ #
371
+ # # Call the create_ingress_rule method.
372
+ # result = client.create_ingress_rule request
373
+ #
374
+ # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule.
375
+ # p result
376
+ #
325
377
  def create_ingress_rule request, options = nil
326
378
  raise ::ArgumentError, "request must be provided" if request.nil?
327
379
 
@@ -385,6 +437,22 @@ module Google
385
437
  # @return [::Google::Cloud::AppEngine::V1::FirewallRule]
386
438
  #
387
439
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
440
+ #
441
+ # @example Basic example
442
+ # require "google/cloud/app_engine/v1"
443
+ #
444
+ # # Create a client object. The client can be reused for multiple calls.
445
+ # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new
446
+ #
447
+ # # Create a request. To set request fields, pass in keyword arguments.
448
+ # request = Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new
449
+ #
450
+ # # Call the get_ingress_rule method.
451
+ # result = client.get_ingress_rule request
452
+ #
453
+ # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule.
454
+ # p result
455
+ #
388
456
  def get_ingress_rule request, options = nil
389
457
  raise ::ArgumentError, "request must be provided" if request.nil?
390
458
 
@@ -452,6 +520,22 @@ module Google
452
520
  # @return [::Google::Cloud::AppEngine::V1::FirewallRule]
453
521
  #
454
522
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
523
+ #
524
+ # @example Basic example
525
+ # require "google/cloud/app_engine/v1"
526
+ #
527
+ # # Create a client object. The client can be reused for multiple calls.
528
+ # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new
529
+ #
530
+ # # Create a request. To set request fields, pass in keyword arguments.
531
+ # request = Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new
532
+ #
533
+ # # Call the update_ingress_rule method.
534
+ # result = client.update_ingress_rule request
535
+ #
536
+ # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule.
537
+ # p result
538
+ #
455
539
  def update_ingress_rule request, options = nil
456
540
  raise ::ArgumentError, "request must be provided" if request.nil?
457
541
 
@@ -515,6 +599,22 @@ module Google
515
599
  # @return [::Google::Protobuf::Empty]
516
600
  #
517
601
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
602
+ #
603
+ # @example Basic example
604
+ # require "google/cloud/app_engine/v1"
605
+ #
606
+ # # Create a client object. The client can be reused for multiple calls.
607
+ # client = Google::Cloud::AppEngine::V1::Firewall::Rest::Client.new
608
+ #
609
+ # # Create a request. To set request fields, pass in keyword arguments.
610
+ # request = Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new
611
+ #
612
+ # # Call the delete_ingress_rule method.
613
+ # result = client.delete_ingress_rule request
614
+ #
615
+ # # The returned object is of type Google::Protobuf::Empty.
616
+ # p result
617
+ #
518
618
  def delete_ingress_rule request, options = nil
519
619
  raise ::ArgumentError, "request must be provided" if request.nil?
520
620
 
@@ -623,7 +723,9 @@ module Google
623
723
  class Configuration
624
724
  extend ::Gapic::Config
625
725
 
626
- config_attr :endpoint, "appengine.googleapis.com", ::String
726
+ DEFAULT_ENDPOINT = "appengine.googleapis.com"
727
+
728
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
627
729
  config_attr :credentials, nil do |value|
628
730
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
629
731
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_list_ingress_rules_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_batch_update_ingress_rules_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_create_ingress_rule_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_get_ingress_rule_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_update_ingress_rule_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -249,7 +249,7 @@ module Google
249
249
 
250
250
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_ingress_rule_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
253
  else
254
254
  {}
255
255
  end
@@ -121,7 +121,7 @@ module Google
121
121
  credentials = @config.credentials
122
122
  # Use self-signed JWT if the endpoint is unchanged from default,
123
123
  # but only if the default endpoint does not have a region prefix.
124
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
124
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
125
125
  !@config.endpoint.split(".").first.include?("-")
126
126
  credentials ||= Credentials.default scope: @config.scope,
127
127
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -142,7 +142,8 @@ module Google
142
142
  credentials: credentials,
143
143
  endpoint: @config.endpoint,
144
144
  channel_args: @config.channel_args,
145
- interceptors: @config.interceptors
145
+ interceptors: @config.interceptors,
146
+ channel_pool_config: @config.channel_pool
146
147
  )
147
148
  end
148
149
 
@@ -635,7 +636,9 @@ module Google
635
636
  class Configuration
636
637
  extend ::Gapic::Config
637
638
 
638
- config_attr :endpoint, "appengine.googleapis.com", ::String
639
+ DEFAULT_ENDPOINT = "appengine.googleapis.com"
640
+
641
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
639
642
  config_attr :credentials, nil do |value|
640
643
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
641
644
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -670,6 +673,14 @@ module Google
670
673
  end
671
674
  end
672
675
 
676
+ ##
677
+ # Configuration for the channel pool
678
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
679
+ #
680
+ def channel_pool
681
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
682
+ end
683
+
673
684
  ##
674
685
  # Configuration RPC class for the Instances API.
675
686
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -664,7 +665,9 @@ module Google
664
665
  class Configuration
665
666
  extend ::Gapic::Config
666
667
 
667
- config_attr :endpoint, "appengine.googleapis.com", ::String
668
+ DEFAULT_ENDPOINT = "appengine.googleapis.com"
669
+
670
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
668
671
  config_attr :credentials, nil do |value|
669
672
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
670
673
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -699,6 +702,14 @@ module Google
699
702
  end
700
703
  end
701
704
 
705
+ ##
706
+ # Configuration for the channel pool
707
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
708
+ #
709
+ def channel_pool
710
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
711
+ end
712
+
702
713
  ##
703
714
  # Configuration RPC class for the Operations API.
704
715
  #
@@ -117,7 +117,7 @@ module Google
117
117
  credentials = @config.credentials
118
118
  # Use self-signed JWT if the endpoint is unchanged from default,
119
119
  # but only if the default endpoint does not have a region prefix.
120
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
120
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
121
121
  !@config.endpoint.split(".").first.include?("-")
122
122
  credentials ||= Credentials.default scope: @config.scope,
123
123
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -181,6 +181,26 @@ module Google
181
181
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Instance>]
182
182
  #
183
183
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
184
+ #
185
+ # @example Basic example
186
+ # require "google/cloud/app_engine/v1"
187
+ #
188
+ # # Create a client object. The client can be reused for multiple calls.
189
+ # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new
190
+ #
191
+ # # Create a request. To set request fields, pass in keyword arguments.
192
+ # request = Google::Cloud::AppEngine::V1::ListInstancesRequest.new
193
+ #
194
+ # # Call the list_instances method.
195
+ # result = client.list_instances request
196
+ #
197
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
198
+ # # over elements, and API calls will be issued to fetch pages as needed.
199
+ # result.each do |item|
200
+ # # Each element is of type ::Google::Cloud::AppEngine::V1::Instance.
201
+ # p item
202
+ # end
203
+ #
184
204
  def list_instances request, options = nil
185
205
  raise ::ArgumentError, "request must be provided" if request.nil?
186
206
 
@@ -245,6 +265,22 @@ module Google
245
265
  # @return [::Google::Cloud::AppEngine::V1::Instance]
246
266
  #
247
267
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
268
+ #
269
+ # @example Basic example
270
+ # require "google/cloud/app_engine/v1"
271
+ #
272
+ # # Create a client object. The client can be reused for multiple calls.
273
+ # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new
274
+ #
275
+ # # Create a request. To set request fields, pass in keyword arguments.
276
+ # request = Google::Cloud::AppEngine::V1::GetInstanceRequest.new
277
+ #
278
+ # # Call the get_instance method.
279
+ # result = client.get_instance request
280
+ #
281
+ # # The returned object is of type Google::Cloud::AppEngine::V1::Instance.
282
+ # p result
283
+ #
248
284
  def get_instance request, options = nil
249
285
  raise ::ArgumentError, "request must be provided" if request.nil?
250
286
 
@@ -319,6 +355,29 @@ module Google
319
355
  # @return [::Gapic::Operation]
320
356
  #
321
357
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
358
+ #
359
+ # @example Basic example
360
+ # require "google/cloud/app_engine/v1"
361
+ #
362
+ # # Create a client object. The client can be reused for multiple calls.
363
+ # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new
364
+ #
365
+ # # Create a request. To set request fields, pass in keyword arguments.
366
+ # request = Google::Cloud::AppEngine::V1::DeleteInstanceRequest.new
367
+ #
368
+ # # Call the delete_instance method.
369
+ # result = client.delete_instance request
370
+ #
371
+ # # The returned object is of type Gapic::Operation. You can use it to
372
+ # # check the status of an operation, cancel it, or wait for results.
373
+ # # Here is how to wait for a response.
374
+ # result.wait_until_done! timeout: 60
375
+ # if result.response?
376
+ # p result.response
377
+ # else
378
+ # puts "No response received."
379
+ # end
380
+ #
322
381
  def delete_instance request, options = nil
323
382
  raise ::ArgumentError, "request must be provided" if request.nil?
324
383
 
@@ -398,6 +457,29 @@ module Google
398
457
  # @return [::Gapic::Operation]
399
458
  #
400
459
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
460
+ #
461
+ # @example Basic example
462
+ # require "google/cloud/app_engine/v1"
463
+ #
464
+ # # Create a client object. The client can be reused for multiple calls.
465
+ # client = Google::Cloud::AppEngine::V1::Instances::Rest::Client.new
466
+ #
467
+ # # Create a request. To set request fields, pass in keyword arguments.
468
+ # request = Google::Cloud::AppEngine::V1::DebugInstanceRequest.new
469
+ #
470
+ # # Call the debug_instance method.
471
+ # result = client.debug_instance request
472
+ #
473
+ # # The returned object is of type Gapic::Operation. You can use it to
474
+ # # check the status of an operation, cancel it, or wait for results.
475
+ # # Here is how to wait for a response.
476
+ # result.wait_until_done! timeout: 60
477
+ # if result.response?
478
+ # p result.response
479
+ # else
480
+ # puts "No response received."
481
+ # end
482
+ #
401
483
  def debug_instance request, options = nil
402
484
  raise ::ArgumentError, "request must be provided" if request.nil?
403
485
 
@@ -507,7 +589,9 @@ module Google
507
589
  class Configuration
508
590
  extend ::Gapic::Config
509
591
 
510
- config_attr :endpoint, "appengine.googleapis.com", ::String
592
+ DEFAULT_ENDPOINT = "appengine.googleapis.com"
593
+
594
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
511
595
  config_attr :credentials, nil do |value|
512
596
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
513
597
  allowed.any? { |klass| klass === value }