google-cloud-app_engine-v1 0.3.2 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +1 -1
  5. data/lib/google/appengine/v1/app_yaml_pb.rb +1 -2
  6. data/lib/google/appengine/v1/appengine_pb.rb +2 -2
  7. data/lib/google/appengine/v1/appengine_services_pb.rb +8 -8
  8. data/lib/google/appengine/v1/application_pb.rb +1 -2
  9. data/lib/google/appengine/v1/audit_data_pb.rb +1 -2
  10. data/lib/google/appengine/v1/certificate_pb.rb +1 -2
  11. data/lib/google/appengine/v1/deploy_pb.rb +1 -2
  12. data/lib/google/appengine/v1/deployed_files_pb.rb +0 -1
  13. data/lib/google/appengine/v1/domain_mapping_pb.rb +0 -1
  14. data/lib/google/appengine/v1/domain_pb.rb +0 -1
  15. data/lib/google/appengine/v1/firewall_pb.rb +0 -1
  16. data/lib/google/appengine/v1/instance_pb.rb +2 -3
  17. data/lib/google/appengine/v1/location_pb.rb +1 -2
  18. data/lib/google/appengine/v1/network_settings_pb.rb +0 -1
  19. data/lib/google/appengine/v1/operation_pb.rb +1 -3
  20. data/lib/google/appengine/v1/service_pb.rb +1 -2
  21. data/lib/google/appengine/v1/version_pb.rb +2 -4
  22. data/lib/google/cloud/app_engine/v1/applications/client.rb +138 -49
  23. data/lib/google/cloud/app_engine/v1/applications/operations.rb +145 -33
  24. data/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb +150 -56
  25. data/lib/google/cloud/app_engine/v1/authorized_domains/client.rb +58 -40
  26. data/lib/google/cloud/app_engine/v1/domain_mappings/client.rb +172 -56
  27. data/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb +145 -33
  28. data/lib/google/cloud/app_engine/v1/firewall/client.rb +173 -60
  29. data/lib/google/cloud/app_engine/v1/instances/client.rb +142 -52
  30. data/lib/google/cloud/app_engine/v1/instances/operations.rb +145 -33
  31. data/lib/google/cloud/app_engine/v1/services/client.rb +142 -52
  32. data/lib/google/cloud/app_engine/v1/services/operations.rb +145 -33
  33. data/lib/google/cloud/app_engine/v1/version.rb +1 -1
  34. data/lib/google/cloud/app_engine/v1/versions/client.rb +172 -56
  35. data/lib/google/cloud/app_engine/v1/versions/operations.rb +145 -33
  36. data/proto_docs/google/api/resource.rb +10 -71
  37. metadata +5 -5
@@ -48,13 +48,12 @@ module Google
48
48
  # See {::Google::Cloud::AppEngine::V1::Firewall::Client::Configuration}
49
49
  # for a description of the configuration fields.
50
50
  #
51
- # ## Example
51
+ # @example
52
52
  #
53
- # To modify the configuration for all Firewall clients:
54
- #
55
- # ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config|
56
- # config.timeout = 10.0
57
- # end
53
+ # # Modify the configuration for all Firewall clients
54
+ # ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
58
57
  #
59
58
  # @yield [config] Configure the Client client.
60
59
  # @yieldparam config [Client::Configuration]
@@ -101,19 +100,15 @@ module Google
101
100
  ##
102
101
  # Create a new Firewall client object.
103
102
  #
104
- # ## Examples
105
- #
106
- # To create a new Firewall client with the default
107
- # configuration:
103
+ # @example
108
104
  #
109
- # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new
105
+ # # Create a client using the default configuration
106
+ # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new
110
107
  #
111
- # To create a new Firewall client with a custom
112
- # configuration:
113
- #
114
- # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config|
115
- # config.timeout = 10.0
116
- # end
108
+ # # Create a client using a custom configuration
109
+ # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config|
110
+ # config.timeout = 10.0
111
+ # end
117
112
  #
118
113
  # @yield [config] Configure the Firewall client.
119
114
  # @yieldparam config [Client::Configuration]
@@ -133,10 +128,9 @@ module Google
133
128
 
134
129
  # Create credentials
135
130
  credentials = @config.credentials
136
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
131
+ # Use self-signed JWT if the endpoint is unchanged from default,
137
132
  # but only if the default endpoint does not have a region prefix.
138
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
139
- @config.endpoint == Client.configure.endpoint &&
133
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
140
134
  !@config.endpoint.split(".").first.include?("-")
141
135
  credentials ||= Credentials.default scope: @config.scope,
142
136
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -195,6 +189,27 @@ module Google
195
189
  #
196
190
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
197
191
  #
192
+ # @example Basic example
193
+ # require "google/cloud/app_engine/v1"
194
+ #
195
+ # # Create a client object. The client can be reused for multiple calls.
196
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
197
+ #
198
+ # # Create a request. To set request fields, pass in keyword arguments.
199
+ # request = Google::Cloud::AppEngine::V1::ListIngressRulesRequest.new
200
+ #
201
+ # # Call the list_ingress_rules method.
202
+ # result = client.list_ingress_rules request
203
+ #
204
+ # # The returned object is of type Gapic::PagedEnumerable. You can
205
+ # # iterate over all elements by calling #each, and the enumerable
206
+ # # will lazily make API calls to fetch subsequent pages. Other
207
+ # # methods are also available for managing paging directly.
208
+ # result.each do |response|
209
+ # # Each element is of type ::Google::Cloud::AppEngine::V1::FirewallRule.
210
+ # p response
211
+ # end
212
+ #
198
213
  def list_ingress_rules request, options = nil
199
214
  raise ::ArgumentError, "request must be provided" if request.nil?
200
215
 
@@ -212,16 +227,20 @@ module Google
212
227
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
213
228
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
214
229
 
215
- header_params = {
216
- "parent" => request.parent
217
- }
230
+ header_params = {}
231
+ if request.parent
232
+ header_params["parent"] = request.parent
233
+ end
234
+
218
235
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
219
236
  metadata[:"x-goog-request-params"] ||= request_params_header
220
237
 
221
238
  options.apply_defaults timeout: @config.rpcs.list_ingress_rules.timeout,
222
239
  metadata: metadata,
223
240
  retry_policy: @config.rpcs.list_ingress_rules.retry_policy
224
- options.apply_defaults metadata: @config.metadata,
241
+
242
+ options.apply_defaults timeout: @config.timeout,
243
+ metadata: @config.metadata,
225
244
  retry_policy: @config.retry_policy
226
245
 
227
246
  @firewall_stub.call_rpc :list_ingress_rules, request, options: options do |response, operation|
@@ -269,6 +288,21 @@ module Google
269
288
  #
270
289
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
271
290
  #
291
+ # @example Basic example
292
+ # require "google/cloud/app_engine/v1"
293
+ #
294
+ # # Create a client object. The client can be reused for multiple calls.
295
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
296
+ #
297
+ # # Create a request. To set request fields, pass in keyword arguments.
298
+ # request = Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesRequest.new
299
+ #
300
+ # # Call the batch_update_ingress_rules method.
301
+ # result = client.batch_update_ingress_rules request
302
+ #
303
+ # # The returned object is of type Google::Cloud::AppEngine::V1::BatchUpdateIngressRulesResponse.
304
+ # p result
305
+ #
272
306
  def batch_update_ingress_rules request, options = nil
273
307
  raise ::ArgumentError, "request must be provided" if request.nil?
274
308
 
@@ -286,16 +320,20 @@ module Google
286
320
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
287
321
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
288
322
 
289
- header_params = {
290
- "name" => request.name
291
- }
323
+ header_params = {}
324
+ if request.name
325
+ header_params["name"] = request.name
326
+ end
327
+
292
328
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
293
329
  metadata[:"x-goog-request-params"] ||= request_params_header
294
330
 
295
331
  options.apply_defaults timeout: @config.rpcs.batch_update_ingress_rules.timeout,
296
332
  metadata: metadata,
297
333
  retry_policy: @config.rpcs.batch_update_ingress_rules.retry_policy
298
- options.apply_defaults metadata: @config.metadata,
334
+
335
+ options.apply_defaults timeout: @config.timeout,
336
+ metadata: @config.metadata,
299
337
  retry_policy: @config.retry_policy
300
338
 
301
339
  @firewall_stub.call_rpc :batch_update_ingress_rules, request, options: options do |response, operation|
@@ -347,6 +385,21 @@ module Google
347
385
  #
348
386
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
349
387
  #
388
+ # @example Basic example
389
+ # require "google/cloud/app_engine/v1"
390
+ #
391
+ # # Create a client object. The client can be reused for multiple calls.
392
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
393
+ #
394
+ # # Create a request. To set request fields, pass in keyword arguments.
395
+ # request = Google::Cloud::AppEngine::V1::CreateIngressRuleRequest.new
396
+ #
397
+ # # Call the create_ingress_rule method.
398
+ # result = client.create_ingress_rule request
399
+ #
400
+ # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule.
401
+ # p result
402
+ #
350
403
  def create_ingress_rule request, options = nil
351
404
  raise ::ArgumentError, "request must be provided" if request.nil?
352
405
 
@@ -364,16 +417,20 @@ module Google
364
417
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
365
418
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
366
419
 
367
- header_params = {
368
- "parent" => request.parent
369
- }
420
+ header_params = {}
421
+ if request.parent
422
+ header_params["parent"] = request.parent
423
+ end
424
+
370
425
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
371
426
  metadata[:"x-goog-request-params"] ||= request_params_header
372
427
 
373
428
  options.apply_defaults timeout: @config.rpcs.create_ingress_rule.timeout,
374
429
  metadata: metadata,
375
430
  retry_policy: @config.rpcs.create_ingress_rule.retry_policy
376
- options.apply_defaults metadata: @config.metadata,
431
+
432
+ options.apply_defaults timeout: @config.timeout,
433
+ metadata: @config.metadata,
377
434
  retry_policy: @config.retry_policy
378
435
 
379
436
  @firewall_stub.call_rpc :create_ingress_rule, request, options: options do |response, operation|
@@ -414,6 +471,21 @@ module Google
414
471
  #
415
472
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
416
473
  #
474
+ # @example Basic example
475
+ # require "google/cloud/app_engine/v1"
476
+ #
477
+ # # Create a client object. The client can be reused for multiple calls.
478
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
479
+ #
480
+ # # Create a request. To set request fields, pass in keyword arguments.
481
+ # request = Google::Cloud::AppEngine::V1::GetIngressRuleRequest.new
482
+ #
483
+ # # Call the get_ingress_rule method.
484
+ # result = client.get_ingress_rule request
485
+ #
486
+ # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule.
487
+ # p result
488
+ #
417
489
  def get_ingress_rule request, options = nil
418
490
  raise ::ArgumentError, "request must be provided" if request.nil?
419
491
 
@@ -431,16 +503,20 @@ module Google
431
503
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
432
504
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
433
505
 
434
- header_params = {
435
- "name" => request.name
436
- }
506
+ header_params = {}
507
+ if request.name
508
+ header_params["name"] = request.name
509
+ end
510
+
437
511
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
438
512
  metadata[:"x-goog-request-params"] ||= request_params_header
439
513
 
440
514
  options.apply_defaults timeout: @config.rpcs.get_ingress_rule.timeout,
441
515
  metadata: metadata,
442
516
  retry_policy: @config.rpcs.get_ingress_rule.retry_policy
443
- options.apply_defaults metadata: @config.metadata,
517
+
518
+ options.apply_defaults timeout: @config.timeout,
519
+ metadata: @config.metadata,
444
520
  retry_policy: @config.retry_policy
445
521
 
446
522
  @firewall_stub.call_rpc :get_ingress_rule, request, options: options do |response, operation|
@@ -485,6 +561,21 @@ module Google
485
561
  #
486
562
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
487
563
  #
564
+ # @example Basic example
565
+ # require "google/cloud/app_engine/v1"
566
+ #
567
+ # # Create a client object. The client can be reused for multiple calls.
568
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
569
+ #
570
+ # # Create a request. To set request fields, pass in keyword arguments.
571
+ # request = Google::Cloud::AppEngine::V1::UpdateIngressRuleRequest.new
572
+ #
573
+ # # Call the update_ingress_rule method.
574
+ # result = client.update_ingress_rule request
575
+ #
576
+ # # The returned object is of type Google::Cloud::AppEngine::V1::FirewallRule.
577
+ # p result
578
+ #
488
579
  def update_ingress_rule request, options = nil
489
580
  raise ::ArgumentError, "request must be provided" if request.nil?
490
581
 
@@ -502,16 +593,20 @@ module Google
502
593
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
503
594
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
504
595
 
505
- header_params = {
506
- "name" => request.name
507
- }
596
+ header_params = {}
597
+ if request.name
598
+ header_params["name"] = request.name
599
+ end
600
+
508
601
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
509
602
  metadata[:"x-goog-request-params"] ||= request_params_header
510
603
 
511
604
  options.apply_defaults timeout: @config.rpcs.update_ingress_rule.timeout,
512
605
  metadata: metadata,
513
606
  retry_policy: @config.rpcs.update_ingress_rule.retry_policy
514
- options.apply_defaults metadata: @config.metadata,
607
+
608
+ options.apply_defaults timeout: @config.timeout,
609
+ metadata: @config.metadata,
515
610
  retry_policy: @config.retry_policy
516
611
 
517
612
  @firewall_stub.call_rpc :update_ingress_rule, request, options: options do |response, operation|
@@ -552,6 +647,21 @@ module Google
552
647
  #
553
648
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
554
649
  #
650
+ # @example Basic example
651
+ # require "google/cloud/app_engine/v1"
652
+ #
653
+ # # Create a client object. The client can be reused for multiple calls.
654
+ # client = Google::Cloud::AppEngine::V1::Firewall::Client.new
655
+ #
656
+ # # Create a request. To set request fields, pass in keyword arguments.
657
+ # request = Google::Cloud::AppEngine::V1::DeleteIngressRuleRequest.new
658
+ #
659
+ # # Call the delete_ingress_rule method.
660
+ # result = client.delete_ingress_rule request
661
+ #
662
+ # # The returned object is of type Google::Protobuf::Empty.
663
+ # p result
664
+ #
555
665
  def delete_ingress_rule request, options = nil
556
666
  raise ::ArgumentError, "request must be provided" if request.nil?
557
667
 
@@ -569,16 +679,20 @@ module Google
569
679
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
570
680
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
571
681
 
572
- header_params = {
573
- "name" => request.name
574
- }
682
+ header_params = {}
683
+ if request.name
684
+ header_params["name"] = request.name
685
+ end
686
+
575
687
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
576
688
  metadata[:"x-goog-request-params"] ||= request_params_header
577
689
 
578
690
  options.apply_defaults timeout: @config.rpcs.delete_ingress_rule.timeout,
579
691
  metadata: metadata,
580
692
  retry_policy: @config.rpcs.delete_ingress_rule.retry_policy
581
- options.apply_defaults metadata: @config.metadata,
693
+
694
+ options.apply_defaults timeout: @config.timeout,
695
+ metadata: @config.metadata,
582
696
  retry_policy: @config.retry_policy
583
697
 
584
698
  @firewall_stub.call_rpc :delete_ingress_rule, request, options: options do |response, operation|
@@ -602,22 +716,21 @@ module Google
602
716
  # Configuration can be applied globally to all clients, or to a single client
603
717
  # on construction.
604
718
  #
605
- # # Examples
606
- #
607
- # To modify the global config, setting the timeout for list_ingress_rules
608
- # to 20 seconds, and all remaining timeouts to 10 seconds:
609
- #
610
- # ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config|
611
- # config.timeout = 10.0
612
- # config.rpcs.list_ingress_rules.timeout = 20.0
613
- # end
614
- #
615
- # To apply the above configuration only to a new client:
616
- #
617
- # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config|
618
- # config.timeout = 10.0
619
- # config.rpcs.list_ingress_rules.timeout = 20.0
620
- # end
719
+ # @example
720
+ #
721
+ # # Modify the global config, setting the timeout for
722
+ # # list_ingress_rules to 20 seconds,
723
+ # # and all remaining timeouts to 10 seconds.
724
+ # ::Google::Cloud::AppEngine::V1::Firewall::Client.configure do |config|
725
+ # config.timeout = 10.0
726
+ # config.rpcs.list_ingress_rules.timeout = 20.0
727
+ # end
728
+ #
729
+ # # Apply the above configuration only to a new client.
730
+ # client = ::Google::Cloud::AppEngine::V1::Firewall::Client.new do |config|
731
+ # config.timeout = 10.0
732
+ # config.rpcs.list_ingress_rules.timeout = 20.0
733
+ # end
621
734
  #
622
735
  # @!attribute [rw] endpoint
623
736
  # The hostname or hostname:port of the service endpoint.