google-cloud-tasks-v2 0.4.1 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c5579e7e8efc0a7537e322e1fa443c639fa570dff4e7a60de4397d0f0c28281
4
- data.tar.gz: 6eecc6045edd9d867a5b299cffda2b1af60155fb191649a23678d56e6987431a
3
+ metadata.gz: ce0331d0b337ac1e542113b2aa08b410a34930b7c76542355c4ab3ba9afc11ab
4
+ data.tar.gz: d390182c9b264a16237e7a9586355b8d219572db941a3517cee313b1311116cb
5
5
  SHA512:
6
- metadata.gz: 4d01acdc74bf4a683d8b8587dedf6fa58b9ed2a0b8962bb485c8e2a098210434bee0f98bca9ddaa499834258690eb1d6d10ca9989498ab0cd6f3363ae007dcfe
7
- data.tar.gz: 32dd42958ffb76f68129b8434fe4201f2ff1e39264977834037666b734f9648d7378b92d55542fabe80ed18f7e960ace8a30e8e79f8ab8d7f3ac6b8a68e4f01c
6
+ metadata.gz: e776e422e3e2adb1f8b82e07feb7b8b837cba73d86e6d444fa397d2def2bec6152dcba6c1bc929e2ce9e322b6989a64f5153a5c0e207d4babdd1997925461c24
7
+ data.tar.gz: 892731d1682a2ca139a02a8a1349f2cf53387d3d7e0f4057053e0928baedd3fa175c0361873debdb2c04a9796e44ca523c6bdef5091fd4611c5e83ee5041abfd
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-tasks-v2
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Tasks::V2::CloudTasks::Credentials}):
68
68
 
69
- 1. `TASKS_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `TASKS_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `TASKS_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `TASKS_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/tasks/v2"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/tasks/v2"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/tasks/v2"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/tasks/v2"
34
34
 
35
35
  client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Tasks::V2::ListQueuesRequest.new # (request fields as keyword arguments...)
37
37
  response = client.list_queues request
38
38
  ```
39
39
 
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::Tasks::V2::CloudTasks::Client::Configuration}
43
43
  # for a description of the configuration fields.
44
44
  #
45
- # ## Example
45
+ # @example
46
46
  #
47
- # To modify the configuration for all CloudTasks clients:
48
- #
49
- # ::Google::Cloud::Tasks::V2::CloudTasks::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all CloudTasks clients
48
+ # ::Google::Cloud::Tasks::V2::CloudTasks::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
52
51
  #
53
52
  # @yield [config] Configure the Client client.
54
53
  # @yieldparam config [Client::Configuration]
@@ -68,18 +67,12 @@ module Google
68
67
 
69
68
  default_config.rpcs.list_queues.timeout = 10.0
70
69
  default_config.rpcs.list_queues.retry_policy = {
71
- initial_delay: 0.1,
72
- max_delay: 10.0,
73
- multiplier: 1.3,
74
- retry_codes: [4, 14]
70
+ initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
75
71
  }
76
72
 
77
73
  default_config.rpcs.get_queue.timeout = 10.0
78
74
  default_config.rpcs.get_queue.retry_policy = {
79
- initial_delay: 0.1,
80
- max_delay: 10.0,
81
- multiplier: 1.3,
82
- retry_codes: [4, 14]
75
+ initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
83
76
  }
84
77
 
85
78
  default_config.rpcs.create_queue.timeout = 10.0
@@ -88,10 +81,7 @@ module Google
88
81
 
89
82
  default_config.rpcs.delete_queue.timeout = 10.0
90
83
  default_config.rpcs.delete_queue.retry_policy = {
91
- initial_delay: 0.1,
92
- max_delay: 10.0,
93
- multiplier: 1.3,
94
- retry_codes: [4, 14]
84
+ initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
95
85
  }
96
86
 
97
87
  default_config.rpcs.purge_queue.timeout = 10.0
@@ -102,46 +92,31 @@ module Google
102
92
 
103
93
  default_config.rpcs.get_iam_policy.timeout = 10.0
104
94
  default_config.rpcs.get_iam_policy.retry_policy = {
105
- initial_delay: 0.1,
106
- max_delay: 10.0,
107
- multiplier: 1.3,
108
- retry_codes: [4, 14]
95
+ initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
109
96
  }
110
97
 
111
98
  default_config.rpcs.set_iam_policy.timeout = 10.0
112
99
 
113
100
  default_config.rpcs.test_iam_permissions.timeout = 10.0
114
101
  default_config.rpcs.test_iam_permissions.retry_policy = {
115
- initial_delay: 0.1,
116
- max_delay: 10.0,
117
- multiplier: 1.3,
118
- retry_codes: [4, 14]
102
+ initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
119
103
  }
120
104
 
121
105
  default_config.rpcs.list_tasks.timeout = 10.0
122
106
  default_config.rpcs.list_tasks.retry_policy = {
123
- initial_delay: 0.1,
124
- max_delay: 10.0,
125
- multiplier: 1.3,
126
- retry_codes: [4, 14]
107
+ initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
127
108
  }
128
109
 
129
110
  default_config.rpcs.get_task.timeout = 10.0
130
111
  default_config.rpcs.get_task.retry_policy = {
131
- initial_delay: 0.1,
132
- max_delay: 10.0,
133
- multiplier: 1.3,
134
- retry_codes: [4, 14]
112
+ initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
135
113
  }
136
114
 
137
115
  default_config.rpcs.create_task.timeout = 10.0
138
116
 
139
117
  default_config.rpcs.delete_task.timeout = 10.0
140
118
  default_config.rpcs.delete_task.retry_policy = {
141
- initial_delay: 0.1,
142
- max_delay: 10.0,
143
- multiplier: 1.3,
144
- retry_codes: [4, 14]
119
+ initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
145
120
  }
146
121
 
147
122
  default_config.rpcs.run_task.timeout = 10.0
@@ -175,19 +150,15 @@ module Google
175
150
  ##
176
151
  # Create a new CloudTasks client object.
177
152
  #
178
- # ## Examples
179
- #
180
- # To create a new CloudTasks client with the default
181
- # configuration:
182
- #
183
- # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new
153
+ # @example
184
154
  #
185
- # To create a new CloudTasks client with a custom
186
- # configuration:
155
+ # # Create a client using the default configuration
156
+ # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new
187
157
  #
188
- # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config|
189
- # config.timeout = 10.0
190
- # end
158
+ # # Create a client using a custom configuration
159
+ # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config|
160
+ # config.timeout = 10.0
161
+ # end
191
162
  #
192
163
  # @yield [config] Configure the CloudTasks client.
193
164
  # @yieldparam config [Client::Configuration]
@@ -207,14 +178,13 @@ module Google
207
178
 
208
179
  # Create credentials
209
180
  credentials = @config.credentials
210
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
181
+ # Use self-signed JWT if the endpoint is unchanged from default,
211
182
  # but only if the default endpoint does not have a region prefix.
212
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
213
- @config.endpoint == Client.configure.endpoint &&
183
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
214
184
  !@config.endpoint.split(".").first.include?("-")
215
185
  credentials ||= Credentials.default scope: @config.scope,
216
186
  enable_self_signed_jwt: enable_self_signed_jwt
217
- if credentials.is_a?(String) || credentials.is_a?(Hash)
187
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
218
188
  credentials = Credentials.new credentials, scope: @config.scope
219
189
  end
220
190
  @quota_project_id = @config.quota_project
@@ -292,6 +262,27 @@ module Google
292
262
  #
293
263
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
294
264
  #
265
+ # @example Basic example
266
+ # require "google/cloud/tasks/v2"
267
+ #
268
+ # # Create a client object. The client can be reused for multiple calls.
269
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
270
+ #
271
+ # # Create a request. To set request fields, pass in keyword arguments.
272
+ # request = Google::Cloud::Tasks::V2::ListQueuesRequest.new
273
+ #
274
+ # # Call the list_queues method.
275
+ # result = client.list_queues request
276
+ #
277
+ # # The returned object is of type Gapic::PagedEnumerable. You can
278
+ # # iterate over all elements by calling #each, and the enumerable
279
+ # # will lazily make API calls to fetch subsequent pages. Other
280
+ # # methods are also available for managing paging directly.
281
+ # result.each do |response|
282
+ # # Each element is of type ::Google::Cloud::Tasks::V2::Queue.
283
+ # p response
284
+ # end
285
+ #
295
286
  def list_queues request, options = nil
296
287
  raise ::ArgumentError, "request must be provided" if request.nil?
297
288
 
@@ -309,16 +300,20 @@ module Google
309
300
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
310
301
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
311
302
 
312
- header_params = {
313
- "parent" => request.parent
314
- }
303
+ header_params = {}
304
+ if request.parent
305
+ header_params["parent"] = request.parent
306
+ end
307
+
315
308
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
316
309
  metadata[:"x-goog-request-params"] ||= request_params_header
317
310
 
318
311
  options.apply_defaults timeout: @config.rpcs.list_queues.timeout,
319
312
  metadata: metadata,
320
313
  retry_policy: @config.rpcs.list_queues.retry_policy
321
- options.apply_defaults metadata: @config.metadata,
314
+
315
+ options.apply_defaults timeout: @config.timeout,
316
+ metadata: @config.metadata,
322
317
  retry_policy: @config.retry_policy
323
318
 
324
319
  @cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation|
@@ -360,6 +355,21 @@ module Google
360
355
  #
361
356
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
362
357
  #
358
+ # @example Basic example
359
+ # require "google/cloud/tasks/v2"
360
+ #
361
+ # # Create a client object. The client can be reused for multiple calls.
362
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
363
+ #
364
+ # # Create a request. To set request fields, pass in keyword arguments.
365
+ # request = Google::Cloud::Tasks::V2::GetQueueRequest.new
366
+ #
367
+ # # Call the get_queue method.
368
+ # result = client.get_queue request
369
+ #
370
+ # # The returned object is of type Google::Cloud::Tasks::V2::Queue.
371
+ # p result
372
+ #
363
373
  def get_queue request, options = nil
364
374
  raise ::ArgumentError, "request must be provided" if request.nil?
365
375
 
@@ -377,16 +387,20 @@ module Google
377
387
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
378
388
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
379
389
 
380
- header_params = {
381
- "name" => request.name
382
- }
390
+ header_params = {}
391
+ if request.name
392
+ header_params["name"] = request.name
393
+ end
394
+
383
395
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
384
396
  metadata[:"x-goog-request-params"] ||= request_params_header
385
397
 
386
398
  options.apply_defaults timeout: @config.rpcs.get_queue.timeout,
387
399
  metadata: metadata,
388
400
  retry_policy: @config.rpcs.get_queue.retry_policy
389
- options.apply_defaults metadata: @config.metadata,
401
+
402
+ options.apply_defaults timeout: @config.timeout,
403
+ metadata: @config.metadata,
390
404
  retry_policy: @config.retry_policy
391
405
 
392
406
  @cloud_tasks_stub.call_rpc :get_queue, request, options: options do |response, operation|
@@ -446,6 +460,21 @@ module Google
446
460
  #
447
461
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
448
462
  #
463
+ # @example Basic example
464
+ # require "google/cloud/tasks/v2"
465
+ #
466
+ # # Create a client object. The client can be reused for multiple calls.
467
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
468
+ #
469
+ # # Create a request. To set request fields, pass in keyword arguments.
470
+ # request = Google::Cloud::Tasks::V2::CreateQueueRequest.new
471
+ #
472
+ # # Call the create_queue method.
473
+ # result = client.create_queue request
474
+ #
475
+ # # The returned object is of type Google::Cloud::Tasks::V2::Queue.
476
+ # p result
477
+ #
449
478
  def create_queue request, options = nil
450
479
  raise ::ArgumentError, "request must be provided" if request.nil?
451
480
 
@@ -463,16 +492,20 @@ module Google
463
492
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
464
493
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
465
494
 
466
- header_params = {
467
- "parent" => request.parent
468
- }
495
+ header_params = {}
496
+ if request.parent
497
+ header_params["parent"] = request.parent
498
+ end
499
+
469
500
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
470
501
  metadata[:"x-goog-request-params"] ||= request_params_header
471
502
 
472
503
  options.apply_defaults timeout: @config.rpcs.create_queue.timeout,
473
504
  metadata: metadata,
474
505
  retry_policy: @config.rpcs.create_queue.retry_policy
475
- options.apply_defaults metadata: @config.metadata,
506
+
507
+ options.apply_defaults timeout: @config.timeout,
508
+ metadata: @config.metadata,
476
509
  retry_policy: @config.retry_policy
477
510
 
478
511
  @cloud_tasks_stub.call_rpc :create_queue, request, options: options do |response, operation|
@@ -536,6 +569,21 @@ module Google
536
569
  #
537
570
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
538
571
  #
572
+ # @example Basic example
573
+ # require "google/cloud/tasks/v2"
574
+ #
575
+ # # Create a client object. The client can be reused for multiple calls.
576
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
577
+ #
578
+ # # Create a request. To set request fields, pass in keyword arguments.
579
+ # request = Google::Cloud::Tasks::V2::UpdateQueueRequest.new
580
+ #
581
+ # # Call the update_queue method.
582
+ # result = client.update_queue request
583
+ #
584
+ # # The returned object is of type Google::Cloud::Tasks::V2::Queue.
585
+ # p result
586
+ #
539
587
  def update_queue request, options = nil
540
588
  raise ::ArgumentError, "request must be provided" if request.nil?
541
589
 
@@ -553,16 +601,20 @@ module Google
553
601
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
554
602
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
555
603
 
556
- header_params = {
557
- "queue.name" => request.queue.name
558
- }
604
+ header_params = {}
605
+ if request.queue&.name
606
+ header_params["queue.name"] = request.queue.name
607
+ end
608
+
559
609
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
560
610
  metadata[:"x-goog-request-params"] ||= request_params_header
561
611
 
562
612
  options.apply_defaults timeout: @config.rpcs.update_queue.timeout,
563
613
  metadata: metadata,
564
614
  retry_policy: @config.rpcs.update_queue.retry_policy
565
- options.apply_defaults metadata: @config.metadata,
615
+
616
+ options.apply_defaults timeout: @config.timeout,
617
+ metadata: @config.metadata,
566
618
  retry_policy: @config.retry_policy
567
619
 
568
620
  @cloud_tasks_stub.call_rpc :update_queue, request, options: options do |response, operation|
@@ -615,6 +667,21 @@ module Google
615
667
  #
616
668
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
617
669
  #
670
+ # @example Basic example
671
+ # require "google/cloud/tasks/v2"
672
+ #
673
+ # # Create a client object. The client can be reused for multiple calls.
674
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
675
+ #
676
+ # # Create a request. To set request fields, pass in keyword arguments.
677
+ # request = Google::Cloud::Tasks::V2::DeleteQueueRequest.new
678
+ #
679
+ # # Call the delete_queue method.
680
+ # result = client.delete_queue request
681
+ #
682
+ # # The returned object is of type Google::Protobuf::Empty.
683
+ # p result
684
+ #
618
685
  def delete_queue request, options = nil
619
686
  raise ::ArgumentError, "request must be provided" if request.nil?
620
687
 
@@ -632,16 +699,20 @@ module Google
632
699
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
633
700
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
634
701
 
635
- header_params = {
636
- "name" => request.name
637
- }
702
+ header_params = {}
703
+ if request.name
704
+ header_params["name"] = request.name
705
+ end
706
+
638
707
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
639
708
  metadata[:"x-goog-request-params"] ||= request_params_header
640
709
 
641
710
  options.apply_defaults timeout: @config.rpcs.delete_queue.timeout,
642
711
  metadata: metadata,
643
712
  retry_policy: @config.rpcs.delete_queue.retry_policy
644
- options.apply_defaults metadata: @config.metadata,
713
+
714
+ options.apply_defaults timeout: @config.timeout,
715
+ metadata: @config.metadata,
645
716
  retry_policy: @config.retry_policy
646
717
 
647
718
  @cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation|
@@ -687,6 +758,21 @@ module Google
687
758
  #
688
759
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
689
760
  #
761
+ # @example Basic example
762
+ # require "google/cloud/tasks/v2"
763
+ #
764
+ # # Create a client object. The client can be reused for multiple calls.
765
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
766
+ #
767
+ # # Create a request. To set request fields, pass in keyword arguments.
768
+ # request = Google::Cloud::Tasks::V2::PurgeQueueRequest.new
769
+ #
770
+ # # Call the purge_queue method.
771
+ # result = client.purge_queue request
772
+ #
773
+ # # The returned object is of type Google::Cloud::Tasks::V2::Queue.
774
+ # p result
775
+ #
690
776
  def purge_queue request, options = nil
691
777
  raise ::ArgumentError, "request must be provided" if request.nil?
692
778
 
@@ -704,16 +790,20 @@ module Google
704
790
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
705
791
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
706
792
 
707
- header_params = {
708
- "name" => request.name
709
- }
793
+ header_params = {}
794
+ if request.name
795
+ header_params["name"] = request.name
796
+ end
797
+
710
798
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
711
799
  metadata[:"x-goog-request-params"] ||= request_params_header
712
800
 
713
801
  options.apply_defaults timeout: @config.rpcs.purge_queue.timeout,
714
802
  metadata: metadata,
715
803
  retry_policy: @config.rpcs.purge_queue.retry_policy
716
- options.apply_defaults metadata: @config.metadata,
804
+
805
+ options.apply_defaults timeout: @config.timeout,
806
+ metadata: @config.metadata,
717
807
  retry_policy: @config.retry_policy
718
808
 
719
809
  @cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation|
@@ -760,6 +850,21 @@ module Google
760
850
  #
761
851
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
762
852
  #
853
+ # @example Basic example
854
+ # require "google/cloud/tasks/v2"
855
+ #
856
+ # # Create a client object. The client can be reused for multiple calls.
857
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
858
+ #
859
+ # # Create a request. To set request fields, pass in keyword arguments.
860
+ # request = Google::Cloud::Tasks::V2::PauseQueueRequest.new
861
+ #
862
+ # # Call the pause_queue method.
863
+ # result = client.pause_queue request
864
+ #
865
+ # # The returned object is of type Google::Cloud::Tasks::V2::Queue.
866
+ # p result
867
+ #
763
868
  def pause_queue request, options = nil
764
869
  raise ::ArgumentError, "request must be provided" if request.nil?
765
870
 
@@ -777,16 +882,20 @@ module Google
777
882
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
778
883
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
779
884
 
780
- header_params = {
781
- "name" => request.name
782
- }
885
+ header_params = {}
886
+ if request.name
887
+ header_params["name"] = request.name
888
+ end
889
+
783
890
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
784
891
  metadata[:"x-goog-request-params"] ||= request_params_header
785
892
 
786
893
  options.apply_defaults timeout: @config.rpcs.pause_queue.timeout,
787
894
  metadata: metadata,
788
895
  retry_policy: @config.rpcs.pause_queue.retry_policy
789
- options.apply_defaults metadata: @config.metadata,
896
+
897
+ options.apply_defaults timeout: @config.timeout,
898
+ metadata: @config.metadata,
790
899
  retry_policy: @config.retry_policy
791
900
 
792
901
  @cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation|
@@ -839,6 +948,21 @@ module Google
839
948
  #
840
949
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
841
950
  #
951
+ # @example Basic example
952
+ # require "google/cloud/tasks/v2"
953
+ #
954
+ # # Create a client object. The client can be reused for multiple calls.
955
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
956
+ #
957
+ # # Create a request. To set request fields, pass in keyword arguments.
958
+ # request = Google::Cloud::Tasks::V2::ResumeQueueRequest.new
959
+ #
960
+ # # Call the resume_queue method.
961
+ # result = client.resume_queue request
962
+ #
963
+ # # The returned object is of type Google::Cloud::Tasks::V2::Queue.
964
+ # p result
965
+ #
842
966
  def resume_queue request, options = nil
843
967
  raise ::ArgumentError, "request must be provided" if request.nil?
844
968
 
@@ -856,16 +980,20 @@ module Google
856
980
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
857
981
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
858
982
 
859
- header_params = {
860
- "name" => request.name
861
- }
983
+ header_params = {}
984
+ if request.name
985
+ header_params["name"] = request.name
986
+ end
987
+
862
988
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
863
989
  metadata[:"x-goog-request-params"] ||= request_params_header
864
990
 
865
991
  options.apply_defaults timeout: @config.rpcs.resume_queue.timeout,
866
992
  metadata: metadata,
867
993
  retry_policy: @config.rpcs.resume_queue.retry_policy
868
- options.apply_defaults metadata: @config.metadata,
994
+
995
+ options.apply_defaults timeout: @config.timeout,
996
+ metadata: @config.metadata,
869
997
  retry_policy: @config.retry_policy
870
998
 
871
999
  @cloud_tasks_stub.call_rpc :resume_queue, request, options: options do |response, operation|
@@ -917,6 +1045,21 @@ module Google
917
1045
  #
918
1046
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
919
1047
  #
1048
+ # @example Basic example
1049
+ # require "google/cloud/tasks/v2"
1050
+ #
1051
+ # # Create a client object. The client can be reused for multiple calls.
1052
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
1053
+ #
1054
+ # # Create a request. To set request fields, pass in keyword arguments.
1055
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
1056
+ #
1057
+ # # Call the get_iam_policy method.
1058
+ # result = client.get_iam_policy request
1059
+ #
1060
+ # # The returned object is of type Google::Iam::V1::Policy.
1061
+ # p result
1062
+ #
920
1063
  def get_iam_policy request, options = nil
921
1064
  raise ::ArgumentError, "request must be provided" if request.nil?
922
1065
 
@@ -934,16 +1077,20 @@ module Google
934
1077
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
935
1078
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
936
1079
 
937
- header_params = {
938
- "resource" => request.resource
939
- }
1080
+ header_params = {}
1081
+ if request.resource
1082
+ header_params["resource"] = request.resource
1083
+ end
1084
+
940
1085
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
941
1086
  metadata[:"x-goog-request-params"] ||= request_params_header
942
1087
 
943
1088
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
944
1089
  metadata: metadata,
945
1090
  retry_policy: @config.rpcs.get_iam_policy.retry_policy
946
- options.apply_defaults metadata: @config.metadata,
1091
+
1092
+ options.apply_defaults timeout: @config.timeout,
1093
+ metadata: @config.metadata,
947
1094
  retry_policy: @config.retry_policy
948
1095
 
949
1096
  @cloud_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
@@ -999,6 +1146,21 @@ module Google
999
1146
  #
1000
1147
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1001
1148
  #
1149
+ # @example Basic example
1150
+ # require "google/cloud/tasks/v2"
1151
+ #
1152
+ # # Create a client object. The client can be reused for multiple calls.
1153
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
1154
+ #
1155
+ # # Create a request. To set request fields, pass in keyword arguments.
1156
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
1157
+ #
1158
+ # # Call the set_iam_policy method.
1159
+ # result = client.set_iam_policy request
1160
+ #
1161
+ # # The returned object is of type Google::Iam::V1::Policy.
1162
+ # p result
1163
+ #
1002
1164
  def set_iam_policy request, options = nil
1003
1165
  raise ::ArgumentError, "request must be provided" if request.nil?
1004
1166
 
@@ -1016,16 +1178,20 @@ module Google
1016
1178
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
1017
1179
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1018
1180
 
1019
- header_params = {
1020
- "resource" => request.resource
1021
- }
1181
+ header_params = {}
1182
+ if request.resource
1183
+ header_params["resource"] = request.resource
1184
+ end
1185
+
1022
1186
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1023
1187
  metadata[:"x-goog-request-params"] ||= request_params_header
1024
1188
 
1025
1189
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1026
1190
  metadata: metadata,
1027
1191
  retry_policy: @config.rpcs.set_iam_policy.retry_policy
1028
- options.apply_defaults metadata: @config.metadata,
1192
+
1193
+ options.apply_defaults timeout: @config.timeout,
1194
+ metadata: @config.metadata,
1029
1195
  retry_policy: @config.retry_policy
1030
1196
 
1031
1197
  @cloud_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
@@ -1077,6 +1243,21 @@ module Google
1077
1243
  #
1078
1244
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1079
1245
  #
1246
+ # @example Basic example
1247
+ # require "google/cloud/tasks/v2"
1248
+ #
1249
+ # # Create a client object. The client can be reused for multiple calls.
1250
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
1251
+ #
1252
+ # # Create a request. To set request fields, pass in keyword arguments.
1253
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
1254
+ #
1255
+ # # Call the test_iam_permissions method.
1256
+ # result = client.test_iam_permissions request
1257
+ #
1258
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
1259
+ # p result
1260
+ #
1080
1261
  def test_iam_permissions request, options = nil
1081
1262
  raise ::ArgumentError, "request must be provided" if request.nil?
1082
1263
 
@@ -1094,16 +1275,20 @@ module Google
1094
1275
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
1095
1276
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1096
1277
 
1097
- header_params = {
1098
- "resource" => request.resource
1099
- }
1278
+ header_params = {}
1279
+ if request.resource
1280
+ header_params["resource"] = request.resource
1281
+ end
1282
+
1100
1283
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1101
1284
  metadata[:"x-goog-request-params"] ||= request_params_header
1102
1285
 
1103
1286
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1104
1287
  metadata: metadata,
1105
1288
  retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1106
- options.apply_defaults metadata: @config.metadata,
1289
+
1290
+ options.apply_defaults timeout: @config.timeout,
1291
+ metadata: @config.metadata,
1107
1292
  retry_policy: @config.retry_policy
1108
1293
 
1109
1294
  @cloud_tasks_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
@@ -1184,6 +1369,27 @@ module Google
1184
1369
  #
1185
1370
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1186
1371
  #
1372
+ # @example Basic example
1373
+ # require "google/cloud/tasks/v2"
1374
+ #
1375
+ # # Create a client object. The client can be reused for multiple calls.
1376
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
1377
+ #
1378
+ # # Create a request. To set request fields, pass in keyword arguments.
1379
+ # request = Google::Cloud::Tasks::V2::ListTasksRequest.new
1380
+ #
1381
+ # # Call the list_tasks method.
1382
+ # result = client.list_tasks request
1383
+ #
1384
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1385
+ # # iterate over all elements by calling #each, and the enumerable
1386
+ # # will lazily make API calls to fetch subsequent pages. Other
1387
+ # # methods are also available for managing paging directly.
1388
+ # result.each do |response|
1389
+ # # Each element is of type ::Google::Cloud::Tasks::V2::Task.
1390
+ # p response
1391
+ # end
1392
+ #
1187
1393
  def list_tasks request, options = nil
1188
1394
  raise ::ArgumentError, "request must be provided" if request.nil?
1189
1395
 
@@ -1201,16 +1407,20 @@ module Google
1201
1407
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
1202
1408
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1203
1409
 
1204
- header_params = {
1205
- "parent" => request.parent
1206
- }
1410
+ header_params = {}
1411
+ if request.parent
1412
+ header_params["parent"] = request.parent
1413
+ end
1414
+
1207
1415
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1208
1416
  metadata[:"x-goog-request-params"] ||= request_params_header
1209
1417
 
1210
1418
  options.apply_defaults timeout: @config.rpcs.list_tasks.timeout,
1211
1419
  metadata: metadata,
1212
1420
  retry_policy: @config.rpcs.list_tasks.retry_policy
1213
- options.apply_defaults metadata: @config.metadata,
1421
+
1422
+ options.apply_defaults timeout: @config.timeout,
1423
+ metadata: @config.metadata,
1214
1424
  retry_policy: @config.retry_policy
1215
1425
 
1216
1426
  @cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation|
@@ -1265,6 +1475,21 @@ module Google
1265
1475
  #
1266
1476
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1267
1477
  #
1478
+ # @example Basic example
1479
+ # require "google/cloud/tasks/v2"
1480
+ #
1481
+ # # Create a client object. The client can be reused for multiple calls.
1482
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
1483
+ #
1484
+ # # Create a request. To set request fields, pass in keyword arguments.
1485
+ # request = Google::Cloud::Tasks::V2::GetTaskRequest.new
1486
+ #
1487
+ # # Call the get_task method.
1488
+ # result = client.get_task request
1489
+ #
1490
+ # # The returned object is of type Google::Cloud::Tasks::V2::Task.
1491
+ # p result
1492
+ #
1268
1493
  def get_task request, options = nil
1269
1494
  raise ::ArgumentError, "request must be provided" if request.nil?
1270
1495
 
@@ -1282,16 +1507,20 @@ module Google
1282
1507
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
1283
1508
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1284
1509
 
1285
- header_params = {
1286
- "name" => request.name
1287
- }
1510
+ header_params = {}
1511
+ if request.name
1512
+ header_params["name"] = request.name
1513
+ end
1514
+
1288
1515
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1289
1516
  metadata[:"x-goog-request-params"] ||= request_params_header
1290
1517
 
1291
1518
  options.apply_defaults timeout: @config.rpcs.get_task.timeout,
1292
1519
  metadata: metadata,
1293
1520
  retry_policy: @config.rpcs.get_task.retry_policy
1294
- options.apply_defaults metadata: @config.metadata,
1521
+
1522
+ options.apply_defaults timeout: @config.timeout,
1523
+ metadata: @config.metadata,
1295
1524
  retry_policy: @config.retry_policy
1296
1525
 
1297
1526
  @cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation|
@@ -1385,6 +1614,21 @@ module Google
1385
1614
  #
1386
1615
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1387
1616
  #
1617
+ # @example Basic example
1618
+ # require "google/cloud/tasks/v2"
1619
+ #
1620
+ # # Create a client object. The client can be reused for multiple calls.
1621
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
1622
+ #
1623
+ # # Create a request. To set request fields, pass in keyword arguments.
1624
+ # request = Google::Cloud::Tasks::V2::CreateTaskRequest.new
1625
+ #
1626
+ # # Call the create_task method.
1627
+ # result = client.create_task request
1628
+ #
1629
+ # # The returned object is of type Google::Cloud::Tasks::V2::Task.
1630
+ # p result
1631
+ #
1388
1632
  def create_task request, options = nil
1389
1633
  raise ::ArgumentError, "request must be provided" if request.nil?
1390
1634
 
@@ -1402,16 +1646,20 @@ module Google
1402
1646
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
1403
1647
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1404
1648
 
1405
- header_params = {
1406
- "parent" => request.parent
1407
- }
1649
+ header_params = {}
1650
+ if request.parent
1651
+ header_params["parent"] = request.parent
1652
+ end
1653
+
1408
1654
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1409
1655
  metadata[:"x-goog-request-params"] ||= request_params_header
1410
1656
 
1411
1657
  options.apply_defaults timeout: @config.rpcs.create_task.timeout,
1412
1658
  metadata: metadata,
1413
1659
  retry_policy: @config.rpcs.create_task.retry_policy
1414
- options.apply_defaults metadata: @config.metadata,
1660
+
1661
+ options.apply_defaults timeout: @config.timeout,
1662
+ metadata: @config.metadata,
1415
1663
  retry_policy: @config.retry_policy
1416
1664
 
1417
1665
  @cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation|
@@ -1456,6 +1704,21 @@ module Google
1456
1704
  #
1457
1705
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1458
1706
  #
1707
+ # @example Basic example
1708
+ # require "google/cloud/tasks/v2"
1709
+ #
1710
+ # # Create a client object. The client can be reused for multiple calls.
1711
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
1712
+ #
1713
+ # # Create a request. To set request fields, pass in keyword arguments.
1714
+ # request = Google::Cloud::Tasks::V2::DeleteTaskRequest.new
1715
+ #
1716
+ # # Call the delete_task method.
1717
+ # result = client.delete_task request
1718
+ #
1719
+ # # The returned object is of type Google::Protobuf::Empty.
1720
+ # p result
1721
+ #
1459
1722
  def delete_task request, options = nil
1460
1723
  raise ::ArgumentError, "request must be provided" if request.nil?
1461
1724
 
@@ -1473,16 +1736,20 @@ module Google
1473
1736
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
1474
1737
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1475
1738
 
1476
- header_params = {
1477
- "name" => request.name
1478
- }
1739
+ header_params = {}
1740
+ if request.name
1741
+ header_params["name"] = request.name
1742
+ end
1743
+
1479
1744
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1480
1745
  metadata[:"x-goog-request-params"] ||= request_params_header
1481
1746
 
1482
1747
  options.apply_defaults timeout: @config.rpcs.delete_task.timeout,
1483
1748
  metadata: metadata,
1484
1749
  retry_policy: @config.rpcs.delete_task.retry_policy
1485
- options.apply_defaults metadata: @config.metadata,
1750
+
1751
+ options.apply_defaults timeout: @config.timeout,
1752
+ metadata: @config.metadata,
1486
1753
  retry_policy: @config.retry_policy
1487
1754
 
1488
1755
  @cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation|
@@ -1559,6 +1826,21 @@ module Google
1559
1826
  #
1560
1827
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1561
1828
  #
1829
+ # @example Basic example
1830
+ # require "google/cloud/tasks/v2"
1831
+ #
1832
+ # # Create a client object. The client can be reused for multiple calls.
1833
+ # client = Google::Cloud::Tasks::V2::CloudTasks::Client.new
1834
+ #
1835
+ # # Create a request. To set request fields, pass in keyword arguments.
1836
+ # request = Google::Cloud::Tasks::V2::RunTaskRequest.new
1837
+ #
1838
+ # # Call the run_task method.
1839
+ # result = client.run_task request
1840
+ #
1841
+ # # The returned object is of type Google::Cloud::Tasks::V2::Task.
1842
+ # p result
1843
+ #
1562
1844
  def run_task request, options = nil
1563
1845
  raise ::ArgumentError, "request must be provided" if request.nil?
1564
1846
 
@@ -1576,16 +1858,20 @@ module Google
1576
1858
  gapic_version: ::Google::Cloud::Tasks::V2::VERSION
1577
1859
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1578
1860
 
1579
- header_params = {
1580
- "name" => request.name
1581
- }
1861
+ header_params = {}
1862
+ if request.name
1863
+ header_params["name"] = request.name
1864
+ end
1865
+
1582
1866
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1583
1867
  metadata[:"x-goog-request-params"] ||= request_params_header
1584
1868
 
1585
1869
  options.apply_defaults timeout: @config.rpcs.run_task.timeout,
1586
1870
  metadata: metadata,
1587
1871
  retry_policy: @config.rpcs.run_task.retry_policy
1588
- options.apply_defaults metadata: @config.metadata,
1872
+
1873
+ options.apply_defaults timeout: @config.timeout,
1874
+ metadata: @config.metadata,
1589
1875
  retry_policy: @config.retry_policy
1590
1876
 
1591
1877
  @cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation|
@@ -1609,22 +1895,21 @@ module Google
1609
1895
  # Configuration can be applied globally to all clients, or to a single client
1610
1896
  # on construction.
1611
1897
  #
1612
- # # Examples
1613
- #
1614
- # To modify the global config, setting the timeout for list_queues
1615
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1616
- #
1617
- # ::Google::Cloud::Tasks::V2::CloudTasks::Client.configure do |config|
1618
- # config.timeout = 10.0
1619
- # config.rpcs.list_queues.timeout = 20.0
1620
- # end
1621
- #
1622
- # To apply the above configuration only to a new client:
1623
- #
1624
- # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config|
1625
- # config.timeout = 10.0
1626
- # config.rpcs.list_queues.timeout = 20.0
1627
- # end
1898
+ # @example
1899
+ #
1900
+ # # Modify the global config, setting the timeout for
1901
+ # # list_queues to 20 seconds,
1902
+ # # and all remaining timeouts to 10 seconds.
1903
+ # ::Google::Cloud::Tasks::V2::CloudTasks::Client.configure do |config|
1904
+ # config.timeout = 10.0
1905
+ # config.rpcs.list_queues.timeout = 20.0
1906
+ # end
1907
+ #
1908
+ # # Apply the above configuration only to a new client.
1909
+ # client = ::Google::Cloud::Tasks::V2::CloudTasks::Client.new do |config|
1910
+ # config.timeout = 10.0
1911
+ # config.rpcs.list_queues.timeout = 20.0
1912
+ # end
1628
1913
  #
1629
1914
  # @!attribute [rw] endpoint
1630
1915
  # The hostname or hostname:port of the service endpoint.
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/tasks/v2/cloudtasks.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -13,6 +11,8 @@ require 'google/iam/v1/iam_policy_pb'
13
11
  require 'google/iam/v1/policy_pb'
14
12
  require 'google/protobuf/empty_pb'
15
13
  require 'google/protobuf/field_mask_pb'
14
+ require 'google/protobuf'
15
+
16
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  add_file("google/cloud/tasks/v2/cloudtasks.proto", :syntax => :proto3) do
18
18
  add_message "google.cloud.tasks.v2.ListQueuesRequest" do
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/tasks/v2/queue.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/cloud/tasks/v2/target_pb'
8
6
  require 'google/protobuf/duration_pb'
9
7
  require 'google/protobuf/timestamp_pb'
10
8
  require 'google/api/annotations_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/cloud/tasks/v2/queue.proto", :syntax => :proto3) do
13
13
  add_message "google.cloud.tasks.v2.Queue" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/tasks/v2/target.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/tasks/v2/target.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.tasks.v2.HttpRequest" do
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/tasks/v2/task.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/cloud/tasks/v2/target_pb'
8
6
  require 'google/protobuf/duration_pb'
9
7
  require 'google/protobuf/timestamp_pb'
10
8
  require 'google/rpc/status_pb'
11
9
  require 'google/api/annotations_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/tasks/v2/task.proto", :syntax => :proto3) do
14
14
  add_message "google.cloud.tasks.v2.Task" do
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Tasks
23
23
  module V2
24
- VERSION = "0.4.1"
24
+ VERSION = "0.4.5"
25
25
  end
26
26
  end
27
27
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -80,8 +80,8 @@ module Google
80
80
  # {::Google::Cloud::Tasks::V2::HttpRequest#url HttpRequest.url}.
81
81
  # * Content-Length: This will be computed by Cloud Tasks.
82
82
  # * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
83
- # * X-Google-*: Google use only.
84
- # * X-AppEngine-*: Google use only.
83
+ # * `X-Google-*`: Google use only.
84
+ # * `X-AppEngine-*`: Google use only.
85
85
  #
86
86
  # `Content-Type` won't be set by Cloud Tasks. You can explicitly set
87
87
  # `Content-Type` to a media type when the
@@ -19,30 +19,53 @@
19
19
 
20
20
  module Google
21
21
  module Type
22
- # Represents an expression text. Example:
22
+ # Represents a textual expression in the Common Expression Language (CEL)
23
+ # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
24
+ # are documented at https://github.com/google/cel-spec.
23
25
  #
24
- # title: "User account presence"
25
- # description: "Determines whether the request has a user account"
26
- # expression: "size(request.user) > 0"
26
+ # Example (Comparison):
27
+ #
28
+ # title: "Summary size limit"
29
+ # description: "Determines if a summary is less than 100 chars"
30
+ # expression: "document.summary.size() < 100"
31
+ #
32
+ # Example (Equality):
33
+ #
34
+ # title: "Requestor is owner"
35
+ # description: "Determines if requestor is the document owner"
36
+ # expression: "document.owner == request.auth.claims.email"
37
+ #
38
+ # Example (Logic):
39
+ #
40
+ # title: "Public documents"
41
+ # description: "Determine whether the document should be publicly visible"
42
+ # expression: "document.type != 'private' && document.type != 'internal'"
43
+ #
44
+ # Example (Data Manipulation):
45
+ #
46
+ # title: "Notification string"
47
+ # description: "Create a notification string with a timestamp."
48
+ # expression: "'New message received at ' + string(document.create_time)"
49
+ #
50
+ # The exact variables and functions that may be referenced within an expression
51
+ # are determined by the service that evaluates it. See the service
52
+ # documentation for additional information.
27
53
  # @!attribute [rw] expression
28
54
  # @return [::String]
29
- # Textual representation of an expression in
30
- # Common Expression Language syntax.
31
- #
32
- # The application context of the containing message determines which
33
- # well-known feature set of CEL is supported.
55
+ # Textual representation of an expression in Common Expression Language
56
+ # syntax.
34
57
  # @!attribute [rw] title
35
58
  # @return [::String]
36
- # An optional title for the expression, i.e. a short string describing
59
+ # Optional. Title for the expression, i.e. a short string describing
37
60
  # its purpose. This can be used e.g. in UIs which allow to enter the
38
61
  # expression.
39
62
  # @!attribute [rw] description
40
63
  # @return [::String]
41
- # An optional description of the expression. This is a longer text which
64
+ # Optional. Description of the expression. This is a longer text which
42
65
  # describes the expression, e.g. when hovered over it in a UI.
43
66
  # @!attribute [rw] location
44
67
  # @return [::String]
45
- # An optional string indicating the location of the expression for error
68
+ # Optional. String indicating the location of the expression for error
46
69
  # reporting, e.g. a file name and a position in the file.
47
70
  class Expr
48
71
  include ::Google::Protobuf::MessageExts
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-tasks-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2021-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a