google-cloud-tasks-v2beta3 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40f4b21b7fc3350687a47081fa8a1df11391d53234df8cbc82bfb1694b97e8a5
4
- data.tar.gz: dd90d19d6877695d2bf3d22eafe3254a502565c279612507795e90f2c6e802a9
3
+ metadata.gz: 612e8851a66ad8f184ce029e07b0be5fff55afaccf58400a47482eb6992a1e48
4
+ data.tar.gz: 4f378ff8d31bcbcb9383ac4a0f822476a7d3b922c8a7582dfc97f82c4188e740
5
5
  SHA512:
6
- metadata.gz: 8cb5e8f10cc1db862330a2d224b47a0d3a94e849d96bfc4ca218c682fea13761a95cf07c618c7c1addd5396ece8e6326b98daf11470ce4e8af55a184d99a7879
7
- data.tar.gz: 91243a5f50b7221e71fc43b6ade49fc454da6438a8bc0cbca8a8aef1d155df3b38ed9653b395907e8d35e22ee63d12e7ec1fc195f2bafe627cde759e639b7137
6
+ metadata.gz: 284bc82418e0d51dcfa9bad01683c4494416ce50153a3d007f505f3612dfe1bcc658aa433001d84b41735558def958026c8b998108824ed04a51bd293873a8da
7
+ data.tar.gz: d8bea38af1f5b5fab40c30b3d744fd5eb24ddbdf570c04cc45643ee38769653d88e53112759ab32c2d50249e3e7b0e3f8ea4e9d71722446c9717a16fd1c1a4d9
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudtasks.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -33,6 +34,9 @@ response = client.list_queues request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-tasks-v2beta3/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/tasks)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -211,7 +211,8 @@ module Google
211
211
  if credentials.is_a?(String) || credentials.is_a?(Hash)
212
212
  credentials = Credentials.new credentials, scope: @config.scope
213
213
  end
214
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
214
+ @quota_project_id = @config.quota_project
215
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
215
216
 
216
217
  @cloud_tasks_stub = ::Gapic::ServiceStub.new(
217
218
  ::Google::Cloud::Tasks::V2beta3::CloudTasks::Stub,
@@ -1665,24 +1666,28 @@ module Google
1665
1666
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1666
1667
  # trigger a retry.
1667
1668
  # @return [::Hash]
1669
+ # @!attribute [rw] quota_project
1670
+ # A separate project against which to charge quota.
1671
+ # @return [::String]
1668
1672
  #
1669
1673
  class Configuration
1670
1674
  extend ::Gapic::Config
1671
1675
 
1672
- config_attr :endpoint, "cloudtasks.googleapis.com", String
1673
- config_attr :credentials, nil do |value|
1676
+ config_attr :endpoint, "cloudtasks.googleapis.com", ::String
1677
+ config_attr :credentials, nil do |value|
1674
1678
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1675
1679
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1676
1680
  allowed.any? { |klass| klass === value }
1677
1681
  end
1678
- config_attr :scope, nil, ::String, ::Array, nil
1679
- config_attr :lib_name, nil, ::String, nil
1680
- config_attr :lib_version, nil, ::String, nil
1681
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1682
- config_attr :interceptors, nil, ::Array, nil
1683
- config_attr :timeout, nil, ::Numeric, nil
1684
- config_attr :metadata, nil, ::Hash, nil
1685
- config_attr :retry_policy, nil, ::Hash, Proc, nil
1682
+ config_attr :scope, nil, ::String, ::Array, nil
1683
+ config_attr :lib_name, nil, ::String, nil
1684
+ config_attr :lib_version, nil, ::String, nil
1685
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1686
+ config_attr :interceptors, nil, ::Array, nil
1687
+ config_attr :timeout, nil, ::Numeric, nil
1688
+ config_attr :metadata, nil, ::Hash, nil
1689
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1690
+ config_attr :quota_project, nil, ::String, nil
1686
1691
 
1687
1692
  # @private
1688
1693
  def initialize parent_config = nil
@@ -1698,7 +1703,7 @@ module Google
1698
1703
  def rpcs
1699
1704
  @rpcs ||= begin
1700
1705
  parent_rpcs = nil
1701
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
1706
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
1702
1707
  Rpcs.new parent_rpcs
1703
1708
  end
1704
1709
  end
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/tasks/v2beta3/cloudtasks.proto for package 'google.cloud.tasks.v2beta3'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2020 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- #
19
18
 
20
19
  require 'grpc'
21
20
  require 'google/cloud/tasks/v2beta3/cloudtasks_pb'
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
+ require 'google/api/field_behavior_pb'
6
7
  require 'google/api/resource_pb'
7
8
  require 'google/cloud/tasks/v2beta3/target_pb'
8
9
  require 'google/protobuf/duration_pb'
@@ -17,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
18
  optional :state, :enum, 6, "google.cloud.tasks.v2beta3.Queue.State"
18
19
  optional :purge_time, :message, 7, "google.protobuf.Timestamp"
19
20
  optional :stackdriver_logging_config, :message, 10, "google.cloud.tasks.v2beta3.StackdriverLoggingConfig"
21
+ optional :type, :enum, 11, "google.cloud.tasks.v2beta3.Queue.Type"
20
22
  oneof :queue_type do
21
23
  optional :app_engine_http_queue, :message, 3, "google.cloud.tasks.v2beta3.AppEngineHttpQueue"
22
24
  end
@@ -27,6 +29,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
27
29
  value :PAUSED, 2
28
30
  value :DISABLED, 3
29
31
  end
32
+ add_enum "google.cloud.tasks.v2beta3.Queue.Type" do
33
+ value :TYPE_UNSPECIFIED, 0
34
+ value :PULL, 1
35
+ value :PUSH, 2
36
+ end
30
37
  add_message "google.cloud.tasks.v2beta3.RateLimits" do
31
38
  optional :max_dispatches_per_second, :double, 1
32
39
  optional :max_burst_size, :int32, 2
@@ -51,6 +58,7 @@ module Google
51
58
  module V2beta3
52
59
  Queue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue").msgclass
53
60
  Queue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue.State").enummodule
61
+ Queue::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue.Type").enummodule
54
62
  RateLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RateLimits").msgclass
55
63
  RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RetryConfig").msgclass
56
64
  StackdriverLoggingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.StackdriverLoggingConfig").msgclass
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Tasks
23
23
  module V2beta3
24
- VERSION = "0.1.0"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -115,6 +115,13 @@ module Google
115
115
  # Configuration options for writing logs to
116
116
  # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
117
117
  # field is unset, then no logs are written.
118
+ # @!attribute [rw] type
119
+ # @return [::Google::Cloud::Tasks::V2beta3::Queue::Type]
120
+ # Immutable. The type of a queue (push or pull).
121
+ #
122
+ # `Queue.type` is an immutable property of the queue that is set at the queue
123
+ # creation time. When left unspecified, the default value of `PUSH` is
124
+ # selected.
118
125
  class Queue
119
126
  include ::Google::Protobuf::MessageExts
120
127
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -155,6 +162,18 @@ module Google
155
162
  # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue DeleteQueue}.
156
163
  DISABLED = 3
157
164
  end
165
+
166
+ # The type of the queue.
167
+ module Type
168
+ # Default value.
169
+ TYPE_UNSPECIFIED = 0
170
+
171
+ # A pull queue.
172
+ PULL = 1
173
+
174
+ # A push queue.
175
+ PUSH = 2
176
+ end
158
177
  end
159
178
 
160
179
  # Rate limits.
@@ -314,7 +333,7 @@ module Google
314
333
  # A task's retry interval starts at
315
334
  # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff}, then doubles
316
335
  # `max_doublings` times, then increases linearly, and finally
317
- # retries retries at intervals of
336
+ # retries at intervals of
318
337
  # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} up to
319
338
  # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times.
320
339
  #
@@ -188,10 +188,10 @@ module Google
188
188
  # delivered to can be set at the queue-level or task-level:
189
189
  #
190
190
  # * If set,
191
- # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
192
- # is used for all tasks in the queue, no matter what the setting
193
- # is for the
194
- # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
191
+ # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
192
+ # is used for all tasks in the queue, no matter what the setting
193
+ # is for the
194
+ # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
195
195
  #
196
196
  #
197
197
  # The `url` that the task will be sent to is:
@@ -225,14 +225,11 @@ module Google
225
225
  # The HTTP method to use for the request. The default is POST.
226
226
  #
227
227
  # The app's request handler for the task's target URL must be able to handle
228
- # HTTP requests with this http_method, otherwise the task attempt will fail
229
- # with error code 405 (Method Not Allowed). See
230
- # [Writing a push task request
228
+ # HTTP requests with this http_method, otherwise the task attempt fails with
229
+ # error code 405 (Method Not Allowed). See [Writing a push task request
231
230
  # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
232
- # and the documentation for the request handlers in the language your app is
233
- # written in e.g.
234
- # [Python Request
235
- # Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
231
+ # and the App Engine documentation for your runtime on [How Requests are
232
+ # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
236
233
  # @!attribute [rw] app_engine_routing
237
234
  # @return [::Google::Cloud::Tasks::V2beta3::AppEngineRouting]
238
235
  # Task-level setting for App Engine routing.
@@ -73,8 +73,8 @@ module Google
73
73
  # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
74
74
  # task according to the {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}.
75
75
  #
76
- # Note that when the request is cancelled, Cloud Tasks will stop listing for
77
- # the response, but whether the worker stops processing depends on the
76
+ # Note that when the request is cancelled, Cloud Tasks will stop listening
77
+ # for the response, but whether the worker stops processing depends on the
78
78
  # worker. For example, if the worker is stuck, it may not react to cancelled
79
79
  # requests.
80
80
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-tasks-v2beta3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2020-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: '0.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: '0.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +78,42 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '5.10'
81
+ version: '5.14'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '5.10'
88
+ version: '5.14'
89
+ - !ruby/object:Gem::Dependency
90
+ name: minitest-focus
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.1'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '1.1'
103
+ - !ruby/object:Gem::Dependency
104
+ name: minitest-rg
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '5.2'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '5.2'
89
117
  - !ruby/object:Gem::Dependency
90
118
  name: rake
91
119
  requirement: !ruby/object:Gem::Requirement
@@ -156,7 +184,6 @@ files:
156
184
  - LICENSE.md
157
185
  - README.md
158
186
  - lib/google-cloud-tasks-v2beta3.rb
159
- - lib/google/cloud/common_resources_pb.rb
160
187
  - lib/google/cloud/tasks/v2beta3.rb
161
188
  - lib/google/cloud/tasks/v2beta3/cloud_tasks.rb
162
189
  - lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb
@@ -204,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
231
  - !ruby/object:Gem::Version
205
232
  version: '0'
206
233
  requirements: []
207
- rubygems_version: 3.0.6
234
+ rubygems_version: 3.1.3
208
235
  signing_key:
209
236
  specification_version: 4
210
237
  summary: API Client library for the Cloud Tasks V2beta3 API
@@ -1,15 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/common_resources.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/api/resource_pb'
7
- Google::Protobuf::DescriptorPool.generated_pool.build do
8
- add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
9
- end
10
- end
11
-
12
- module Google
13
- module Cloud
14
- end
15
- end