google-cloud-tasks-v2beta2 0.1.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.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +71 -0
  6. data/lib/google-cloud-tasks-v2beta2.rb +21 -0
  7. data/lib/google/cloud/common_resources_pb.rb +15 -0
  8. data/lib/google/cloud/tasks/v2beta2.rb +35 -0
  9. data/lib/google/cloud/tasks/v2beta2/cloud_tasks.rb +50 -0
  10. data/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb +2324 -0
  11. data/lib/google/cloud/tasks/v2beta2/cloud_tasks/credentials.rb +51 -0
  12. data/lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.rb +90 -0
  13. data/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb +134 -0
  14. data/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb +257 -0
  15. data/lib/google/cloud/tasks/v2beta2/queue_pb.rb +59 -0
  16. data/lib/google/cloud/tasks/v2beta2/target_pb.rb +55 -0
  17. data/lib/google/cloud/tasks/v2beta2/task_pb.rb +55 -0
  18. data/lib/google/cloud/tasks/v2beta2/version.rb +28 -0
  19. data/proto_docs/README.md +4 -0
  20. data/proto_docs/google/api/field_behavior.rb +59 -0
  21. data/proto_docs/google/api/resource.rb +247 -0
  22. data/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb +547 -0
  23. data/proto_docs/google/cloud/tasks/v2beta2/queue.rb +349 -0
  24. data/proto_docs/google/cloud/tasks/v2beta2/target.rb +405 -0
  25. data/proto_docs/google/cloud/tasks/v2beta2/task.rb +179 -0
  26. data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
  27. data/proto_docs/google/iam/v1/options.rb +40 -0
  28. data/proto_docs/google/iam/v1/policy.rb +248 -0
  29. data/proto_docs/google/protobuf/any.rb +138 -0
  30. data/proto_docs/google/protobuf/duration.rb +98 -0
  31. data/proto_docs/google/protobuf/empty.rb +36 -0
  32. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  33. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  34. data/proto_docs/google/rpc/status.rb +46 -0
  35. data/proto_docs/google/type/expr.rb +52 -0
  36. metadata +211 -0
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Tasks
24
+ module V2beta2
25
+ module CloudTasks
26
+ # Credentials for the CloudTasks API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "TASKS_CREDENTIALS",
33
+ "TASKS_KEYFILE",
34
+ "GOOGLE_CLOUD_CREDENTIALS",
35
+ "GOOGLE_CLOUD_KEYFILE",
36
+ "GCLOUD_KEYFILE",
37
+ "TASKS_CREDENTIALS_JSON",
38
+ "TASKS_KEYFILE_JSON",
39
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
40
+ "GOOGLE_CLOUD_KEYFILE_JSON",
41
+ "GCLOUD_KEYFILE_JSON"
42
+ ]
43
+ self.paths = [
44
+ "~/.config/google_cloud/application_default_credentials.json"
45
+ ]
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Tasks
23
+ module V2beta2
24
+ module CloudTasks
25
+ # Path helper methods for the CloudTasks API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Location resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ #
37
+ # @return [::String]
38
+ def location_path project:, location:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/locations/#{location}"
42
+ end
43
+
44
+ ##
45
+ # Create a fully-qualified Queue resource string.
46
+ #
47
+ # The resource will be in the following format:
48
+ #
49
+ # `projects/{project}/locations/{location}/queues/{queue}`
50
+ #
51
+ # @param project [String]
52
+ # @param location [String]
53
+ # @param queue [String]
54
+ #
55
+ # @return [::String]
56
+ def queue_path project:, location:, queue:
57
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
58
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
59
+
60
+ "projects/#{project}/locations/#{location}/queues/#{queue}"
61
+ end
62
+
63
+ ##
64
+ # Create a fully-qualified Task resource string.
65
+ #
66
+ # The resource will be in the following format:
67
+ #
68
+ # `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`
69
+ #
70
+ # @param project [String]
71
+ # @param location [String]
72
+ # @param queue [String]
73
+ # @param task [String]
74
+ #
75
+ # @return [::String]
76
+ def task_path project:, location:, queue:, task:
77
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
78
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
79
+ raise ::ArgumentError, "queue cannot contain /" if queue.to_s.include? "/"
80
+
81
+ "projects/#{project}/locations/#{location}/queues/#{queue}/tasks/#{task}"
82
+ end
83
+
84
+ extend self
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,134 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/tasks/v2beta2/cloudtasks.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/cloud/tasks/v2beta2/queue_pb'
11
+ require 'google/cloud/tasks/v2beta2/task_pb'
12
+ require 'google/iam/v1/iam_policy_pb'
13
+ require 'google/iam/v1/policy_pb'
14
+ require 'google/protobuf/duration_pb'
15
+ require 'google/protobuf/empty_pb'
16
+ require 'google/protobuf/field_mask_pb'
17
+ require 'google/protobuf/timestamp_pb'
18
+ Google::Protobuf::DescriptorPool.generated_pool.build do
19
+ add_file("google/cloud/tasks/v2beta2/cloudtasks.proto", :syntax => :proto3) do
20
+ add_message "google.cloud.tasks.v2beta2.ListQueuesRequest" do
21
+ optional :parent, :string, 1
22
+ optional :filter, :string, 2
23
+ optional :page_size, :int32, 3
24
+ optional :page_token, :string, 4
25
+ end
26
+ add_message "google.cloud.tasks.v2beta2.ListQueuesResponse" do
27
+ repeated :queues, :message, 1, "google.cloud.tasks.v2beta2.Queue"
28
+ optional :next_page_token, :string, 2
29
+ end
30
+ add_message "google.cloud.tasks.v2beta2.GetQueueRequest" do
31
+ optional :name, :string, 1
32
+ end
33
+ add_message "google.cloud.tasks.v2beta2.CreateQueueRequest" do
34
+ optional :parent, :string, 1
35
+ optional :queue, :message, 2, "google.cloud.tasks.v2beta2.Queue"
36
+ end
37
+ add_message "google.cloud.tasks.v2beta2.UpdateQueueRequest" do
38
+ optional :queue, :message, 1, "google.cloud.tasks.v2beta2.Queue"
39
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
40
+ end
41
+ add_message "google.cloud.tasks.v2beta2.DeleteQueueRequest" do
42
+ optional :name, :string, 1
43
+ end
44
+ add_message "google.cloud.tasks.v2beta2.PurgeQueueRequest" do
45
+ optional :name, :string, 1
46
+ end
47
+ add_message "google.cloud.tasks.v2beta2.PauseQueueRequest" do
48
+ optional :name, :string, 1
49
+ end
50
+ add_message "google.cloud.tasks.v2beta2.ResumeQueueRequest" do
51
+ optional :name, :string, 1
52
+ end
53
+ add_message "google.cloud.tasks.v2beta2.ListTasksRequest" do
54
+ optional :parent, :string, 1
55
+ optional :response_view, :enum, 2, "google.cloud.tasks.v2beta2.Task.View"
56
+ optional :page_size, :int32, 4
57
+ optional :page_token, :string, 5
58
+ end
59
+ add_message "google.cloud.tasks.v2beta2.ListTasksResponse" do
60
+ repeated :tasks, :message, 1, "google.cloud.tasks.v2beta2.Task"
61
+ optional :next_page_token, :string, 2
62
+ end
63
+ add_message "google.cloud.tasks.v2beta2.GetTaskRequest" do
64
+ optional :name, :string, 1
65
+ optional :response_view, :enum, 2, "google.cloud.tasks.v2beta2.Task.View"
66
+ end
67
+ add_message "google.cloud.tasks.v2beta2.CreateTaskRequest" do
68
+ optional :parent, :string, 1
69
+ optional :task, :message, 2, "google.cloud.tasks.v2beta2.Task"
70
+ optional :response_view, :enum, 3, "google.cloud.tasks.v2beta2.Task.View"
71
+ end
72
+ add_message "google.cloud.tasks.v2beta2.DeleteTaskRequest" do
73
+ optional :name, :string, 1
74
+ end
75
+ add_message "google.cloud.tasks.v2beta2.LeaseTasksRequest" do
76
+ optional :parent, :string, 1
77
+ optional :max_tasks, :int32, 2
78
+ optional :lease_duration, :message, 3, "google.protobuf.Duration"
79
+ optional :response_view, :enum, 4, "google.cloud.tasks.v2beta2.Task.View"
80
+ optional :filter, :string, 5
81
+ end
82
+ add_message "google.cloud.tasks.v2beta2.LeaseTasksResponse" do
83
+ repeated :tasks, :message, 1, "google.cloud.tasks.v2beta2.Task"
84
+ end
85
+ add_message "google.cloud.tasks.v2beta2.AcknowledgeTaskRequest" do
86
+ optional :name, :string, 1
87
+ optional :schedule_time, :message, 2, "google.protobuf.Timestamp"
88
+ end
89
+ add_message "google.cloud.tasks.v2beta2.RenewLeaseRequest" do
90
+ optional :name, :string, 1
91
+ optional :schedule_time, :message, 2, "google.protobuf.Timestamp"
92
+ optional :lease_duration, :message, 3, "google.protobuf.Duration"
93
+ optional :response_view, :enum, 4, "google.cloud.tasks.v2beta2.Task.View"
94
+ end
95
+ add_message "google.cloud.tasks.v2beta2.CancelLeaseRequest" do
96
+ optional :name, :string, 1
97
+ optional :schedule_time, :message, 2, "google.protobuf.Timestamp"
98
+ optional :response_view, :enum, 3, "google.cloud.tasks.v2beta2.Task.View"
99
+ end
100
+ add_message "google.cloud.tasks.v2beta2.RunTaskRequest" do
101
+ optional :name, :string, 1
102
+ optional :response_view, :enum, 2, "google.cloud.tasks.v2beta2.Task.View"
103
+ end
104
+ end
105
+ end
106
+
107
+ module Google
108
+ module Cloud
109
+ module Tasks
110
+ module V2beta2
111
+ ListQueuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListQueuesRequest").msgclass
112
+ ListQueuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListQueuesResponse").msgclass
113
+ GetQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.GetQueueRequest").msgclass
114
+ CreateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CreateQueueRequest").msgclass
115
+ UpdateQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UpdateQueueRequest").msgclass
116
+ DeleteQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.DeleteQueueRequest").msgclass
117
+ PurgeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PurgeQueueRequest").msgclass
118
+ PauseQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PauseQueueRequest").msgclass
119
+ ResumeQueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ResumeQueueRequest").msgclass
120
+ ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListTasksRequest").msgclass
121
+ ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListTasksResponse").msgclass
122
+ GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.GetTaskRequest").msgclass
123
+ CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CreateTaskRequest").msgclass
124
+ DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.DeleteTaskRequest").msgclass
125
+ LeaseTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.LeaseTasksRequest").msgclass
126
+ LeaseTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.LeaseTasksResponse").msgclass
127
+ AcknowledgeTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AcknowledgeTaskRequest").msgclass
128
+ RenewLeaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RenewLeaseRequest").msgclass
129
+ CancelLeaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CancelLeaseRequest").msgclass
130
+ RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RunTaskRequest").msgclass
131
+ end
132
+ end
133
+ end
134
+ end
@@ -0,0 +1,257 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/tasks/v2beta2/cloudtasks.proto for package 'google.cloud.tasks.v2beta2'
3
+ # Original file comments:
4
+ # Copyright 2019 Google LLC.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ #
19
+
20
+ require 'grpc'
21
+ require 'google/cloud/tasks/v2beta2/cloudtasks_pb'
22
+
23
+ module Google
24
+ module Cloud
25
+ module Tasks
26
+ module V2beta2
27
+ module CloudTasks
28
+ # Cloud Tasks allows developers to manage the execution of background
29
+ # work in their applications.
30
+ class Service
31
+
32
+ include GRPC::GenericService
33
+
34
+ self.marshal_class_method = :encode
35
+ self.unmarshal_class_method = :decode
36
+ self.service_name = 'google.cloud.tasks.v2beta2.CloudTasks'
37
+
38
+ # Lists queues.
39
+ #
40
+ # Queues are returned in lexicographical order.
41
+ rpc :ListQueues, ListQueuesRequest, ListQueuesResponse
42
+ # Gets a queue.
43
+ rpc :GetQueue, GetQueueRequest, Queue
44
+ # Creates a queue.
45
+ #
46
+ # Queues created with this method allow tasks to live for a maximum of 31
47
+ # days. After a task is 31 days old, the task will be deleted regardless of whether
48
+ # it was dispatched or not.
49
+ #
50
+ # WARNING: Using this method may have unintended side effects if you are
51
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
52
+ # Read
53
+ # [Overview of Queue Management and
54
+ # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
55
+ # this method.
56
+ rpc :CreateQueue, CreateQueueRequest, Queue
57
+ # Updates a queue.
58
+ #
59
+ # This method creates the queue if it does not exist and updates
60
+ # the queue if it does exist.
61
+ #
62
+ # Queues created with this method allow tasks to live for a maximum of 31
63
+ # days. After a task is 31 days old, the task will be deleted regardless of whether
64
+ # it was dispatched or not.
65
+ #
66
+ # WARNING: Using this method may have unintended side effects if you are
67
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
68
+ # Read
69
+ # [Overview of Queue Management and
70
+ # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
71
+ # this method.
72
+ rpc :UpdateQueue, UpdateQueueRequest, Queue
73
+ # Deletes a queue.
74
+ #
75
+ # This command will delete the queue even if it has tasks in it.
76
+ #
77
+ # Note: If you delete a queue, a queue with the same name can't be created
78
+ # for 7 days.
79
+ #
80
+ # WARNING: Using this method may have unintended side effects if you are
81
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
82
+ # Read
83
+ # [Overview of Queue Management and
84
+ # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
85
+ # this method.
86
+ rpc :DeleteQueue, DeleteQueueRequest, Google::Protobuf::Empty
87
+ # Purges a queue by deleting all of its tasks.
88
+ #
89
+ # All tasks created before this method is called are permanently deleted.
90
+ #
91
+ # Purge operations can take up to one minute to take effect. Tasks
92
+ # might be dispatched before the purge takes effect. A purge is irreversible.
93
+ rpc :PurgeQueue, PurgeQueueRequest, Queue
94
+ # Pauses the queue.
95
+ #
96
+ # If a queue is paused then the system will stop dispatching tasks
97
+ # until the queue is resumed via
98
+ # [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
99
+ # when the queue is paused. A queue is paused if its
100
+ # [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
101
+ rpc :PauseQueue, PauseQueueRequest, Queue
102
+ # Resume a queue.
103
+ #
104
+ # This method resumes a queue after it has been
105
+ # [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or
106
+ # [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored
107
+ # in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it
108
+ # will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
109
+ #
110
+ # WARNING: Resuming many high-QPS queues at the same time can
111
+ # lead to target overloading. If you are resuming high-QPS
112
+ # queues, follow the 500/50/5 pattern described in
113
+ # [Managing Cloud Tasks Scaling
114
+ # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
115
+ rpc :ResumeQueue, ResumeQueueRequest, Queue
116
+ # Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
117
+ # Returns an empty policy if the resource exists and does not have a policy
118
+ # set.
119
+ #
120
+ # Authorization requires the following
121
+ # [Google IAM](https://cloud.google.com/iam) permission on the specified
122
+ # resource parent:
123
+ #
124
+ # * `cloudtasks.queues.getIamPolicy`
125
+ rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
126
+ # Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
127
+ # policy.
128
+ #
129
+ # Note: The Cloud Console does not check queue-level IAM permissions yet.
130
+ # Project-level permissions are required to use the Cloud Console.
131
+ #
132
+ # Authorization requires the following
133
+ # [Google IAM](https://cloud.google.com/iam) permission on the specified
134
+ # resource parent:
135
+ #
136
+ # * `cloudtasks.queues.setIamPolicy`
137
+ rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
138
+ # Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
139
+ # If the resource does not exist, this will return an empty set of
140
+ # permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
141
+ #
142
+ # Note: This operation is designed to be used for building permission-aware
143
+ # UIs and command-line tools, not for authorization checking. This operation
144
+ # may "fail open" without warning.
145
+ rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
146
+ # Lists the tasks in a queue.
147
+ #
148
+ # By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
149
+ # due to performance considerations;
150
+ # [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the
151
+ # subset of information which is returned.
152
+ #
153
+ # The tasks may be returned in any order. The ordering may change at any
154
+ # time.
155
+ rpc :ListTasks, ListTasksRequest, ListTasksResponse
156
+ # Gets a task.
157
+ rpc :GetTask, GetTaskRequest, Task
158
+ # Creates a task and adds it to a queue.
159
+ #
160
+ # Tasks cannot be updated after creation; there is no UpdateTask command.
161
+ #
162
+ # * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is
163
+ # 100KB.
164
+ # * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB.
165
+ rpc :CreateTask, CreateTaskRequest, Task
166
+ # Deletes a task.
167
+ #
168
+ # A task can be deleted if it is scheduled or dispatched. A task
169
+ # cannot be deleted if it has completed successfully or permanently
170
+ # failed.
171
+ rpc :DeleteTask, DeleteTaskRequest, Google::Protobuf::Empty
172
+ # Leases tasks from a pull queue for
173
+ # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
174
+ #
175
+ # This method is invoked by the worker to obtain a lease. The
176
+ # worker must acknowledge the task via
177
+ # [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have
178
+ # performed the work associated with the task.
179
+ #
180
+ # The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that
181
+ # the worker needs to perform the work associated with the task. To
182
+ # return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
183
+ # [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to
184
+ # [FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
185
+ #
186
+ # A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
187
+ # requests are allowed per
188
+ # queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
189
+ # is returned when this limit is
190
+ # exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
191
+ # is also returned when
192
+ # [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
193
+ # is exceeded.
194
+ rpc :LeaseTasks, LeaseTasksRequest, LeaseTasksResponse
195
+ # Acknowledges a pull task.
196
+ #
197
+ # The worker, that is, the entity that
198
+ # [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method
199
+ # to indicate that the work associated with the task has finished.
200
+ #
201
+ # The worker must acknowledge a task within the
202
+ # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease
203
+ # will expire and the task will become available to be leased
204
+ # again. After the task is acknowledged, it will not be returned
205
+ # by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
206
+ # [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
207
+ # [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
208
+ rpc :AcknowledgeTask, AcknowledgeTaskRequest, Google::Protobuf::Empty
209
+ # Renew the current lease of a pull task.
210
+ #
211
+ # The worker can use this method to extend the lease by a new
212
+ # duration, starting from now. The new task lease will be
213
+ # returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
214
+ rpc :RenewLease, RenewLeaseRequest, Task
215
+ # Cancel a pull task's lease.
216
+ #
217
+ # The worker can use this method to cancel a task's lease by
218
+ # setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
219
+ # make the task available to be leased to the next caller of
220
+ # [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
221
+ rpc :CancelLease, CancelLeaseRequest, Task
222
+ # Forces a task to run now.
223
+ #
224
+ # When this method is called, Cloud Tasks will dispatch the task, even if
225
+ # the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or
226
+ # is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
227
+ #
228
+ # This command is meant to be used for manual debugging. For
229
+ # example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed
230
+ # task after a fix has been made or to manually force a task to be
231
+ # dispatched now.
232
+ #
233
+ # The dispatched task is returned. That is, the task that is returned
234
+ # contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but
235
+ # before the task is received by its target.
236
+ #
237
+ # If Cloud Tasks receives a successful response from the task's
238
+ # target, then the task will be deleted; otherwise the task's
239
+ # [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that
240
+ # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified
241
+ # in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
242
+ #
243
+ # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns
244
+ # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
245
+ # task that has already succeeded or permanently failed.
246
+ #
247
+ # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
248
+ # [pull task][google.cloud.tasks.v2beta2.PullMessage].
249
+ rpc :RunTask, RunTaskRequest, Task
250
+ end
251
+
252
+ Stub = Service.rpc_stub_class
253
+ end
254
+ end
255
+ end
256
+ end
257
+ end