google-cloud-tasks-v2 0.8.0 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/tasks/v2/cloudtasks_pb"
21
21
  require "google/cloud/tasks/v2/cloud_tasks/rest/service_stub"
22
+ require "google/cloud/location/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -67,61 +68,61 @@ module Google
67
68
  end
68
69
  default_config = Client::Configuration.new parent_config
69
70
 
70
- default_config.rpcs.list_queues.timeout = 10.0
71
+ default_config.rpcs.list_queues.timeout = 20.0
71
72
  default_config.rpcs.list_queues.retry_policy = {
72
73
  initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
73
74
  }
74
75
 
75
- default_config.rpcs.get_queue.timeout = 10.0
76
+ default_config.rpcs.get_queue.timeout = 20.0
76
77
  default_config.rpcs.get_queue.retry_policy = {
77
78
  initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
78
79
  }
79
80
 
80
- default_config.rpcs.create_queue.timeout = 10.0
81
+ default_config.rpcs.create_queue.timeout = 20.0
81
82
 
82
- default_config.rpcs.update_queue.timeout = 10.0
83
+ default_config.rpcs.update_queue.timeout = 20.0
83
84
 
84
- default_config.rpcs.delete_queue.timeout = 10.0
85
+ default_config.rpcs.delete_queue.timeout = 20.0
85
86
  default_config.rpcs.delete_queue.retry_policy = {
86
87
  initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
87
88
  }
88
89
 
89
- default_config.rpcs.purge_queue.timeout = 10.0
90
+ default_config.rpcs.purge_queue.timeout = 20.0
90
91
 
91
- default_config.rpcs.pause_queue.timeout = 10.0
92
+ default_config.rpcs.pause_queue.timeout = 20.0
92
93
 
93
- default_config.rpcs.resume_queue.timeout = 10.0
94
+ default_config.rpcs.resume_queue.timeout = 20.0
94
95
 
95
- default_config.rpcs.get_iam_policy.timeout = 10.0
96
+ default_config.rpcs.get_iam_policy.timeout = 20.0
96
97
  default_config.rpcs.get_iam_policy.retry_policy = {
97
98
  initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
98
99
  }
99
100
 
100
- default_config.rpcs.set_iam_policy.timeout = 10.0
101
+ default_config.rpcs.set_iam_policy.timeout = 20.0
101
102
 
102
- default_config.rpcs.test_iam_permissions.timeout = 10.0
103
+ default_config.rpcs.test_iam_permissions.timeout = 20.0
103
104
  default_config.rpcs.test_iam_permissions.retry_policy = {
104
105
  initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
105
106
  }
106
107
 
107
- default_config.rpcs.list_tasks.timeout = 10.0
108
+ default_config.rpcs.list_tasks.timeout = 20.0
108
109
  default_config.rpcs.list_tasks.retry_policy = {
109
110
  initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
110
111
  }
111
112
 
112
- default_config.rpcs.get_task.timeout = 10.0
113
+ default_config.rpcs.get_task.timeout = 20.0
113
114
  default_config.rpcs.get_task.retry_policy = {
114
115
  initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
115
116
  }
116
117
 
117
- default_config.rpcs.create_task.timeout = 10.0
118
+ default_config.rpcs.create_task.timeout = 20.0
118
119
 
119
- default_config.rpcs.delete_task.timeout = 10.0
120
+ default_config.rpcs.delete_task.timeout = 20.0
120
121
  default_config.rpcs.delete_task.retry_policy = {
121
122
  initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
122
123
  }
123
124
 
124
- default_config.rpcs.run_task.timeout = 10.0
125
+ default_config.rpcs.run_task.timeout = 20.0
125
126
 
126
127
  default_config
127
128
  end
@@ -176,7 +177,7 @@ module Google
176
177
  credentials = @config.credentials
177
178
  # Use self-signed JWT if the endpoint is unchanged from default,
178
179
  # but only if the default endpoint does not have a region prefix.
179
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
180
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
180
181
  !@config.endpoint.split(".").first.include?("-")
181
182
  credentials ||= Credentials.default scope: @config.scope,
182
183
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -187,9 +188,23 @@ module Google
187
188
  @quota_project_id = @config.quota_project
188
189
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
189
190
 
191
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
192
+ config.credentials = credentials
193
+ config.quota_project = @quota_project_id
194
+ config.endpoint = @config.endpoint
195
+ config.bindings_override = @config.bindings_override
196
+ end
197
+
190
198
  @cloud_tasks_stub = ::Google::Cloud::Tasks::V2::CloudTasks::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
191
199
  end
192
200
 
201
+ ##
202
+ # Get the associated client for mix-in of the Locations.
203
+ #
204
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
205
+ #
206
+ attr_reader :location_client
207
+
193
208
  # Service calls
194
209
 
195
210
  ##
@@ -216,11 +231,10 @@ module Google
216
231
  # Required. The location name.
217
232
  # For example: `projects/PROJECT_ID/locations/LOCATION_ID`
218
233
  # @param filter [::String]
219
- # `filter` can be used to specify a subset of queues. Any {::Google::Cloud::Tasks::V2::Queue Queue}
220
- # field can be used as a filter and several operators as supported.
221
- # For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
222
- # described in
223
- # [Stackdriver's Advanced Logs
234
+ # `filter` can be used to specify a subset of queues. Any
235
+ # {::Google::Cloud::Tasks::V2::Queue Queue} field can be used as a filter and
236
+ # several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
237
+ # filter syntax is the same as described in [Stackdriver's Advanced Logs
224
238
  # Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
225
239
  #
226
240
  # Sample filter "state: PAUSED".
@@ -233,17 +247,19 @@ module Google
233
247
  # The maximum page size is 9800. If unspecified, the page size will
234
248
  # be the maximum. Fewer queues than requested might be returned,
235
249
  # even if more queues exist; use the
236
- # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} in the
237
- # response to determine if more queues exist.
250
+ # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token}
251
+ # in the response to determine if more queues exist.
238
252
  # @param page_token [::String]
239
253
  # A token identifying the page of results to return.
240
254
  #
241
255
  # To request the first page results, page_token must be empty. To
242
256
  # request the next page of results, page_token must be the value of
243
- # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token} returned
244
- # from the previous call to {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_queues ListQueues}
245
- # method. It is an error to switch the value of the
246
- # {::Google::Cloud::Tasks::V2::ListQueuesRequest#filter filter} while iterating through pages.
257
+ # {::Google::Cloud::Tasks::V2::ListQueuesResponse#next_page_token next_page_token}
258
+ # returned from the previous call to
259
+ # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_queues ListQueues} method. It is an
260
+ # error to switch the value of the
261
+ # {::Google::Cloud::Tasks::V2::ListQueuesRequest#filter filter} while iterating
262
+ # through pages.
247
263
  # @yield [result, operation] Access the result along with the TransportOperation object
248
264
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Tasks::V2::Queue>]
249
265
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -354,8 +370,8 @@ module Google
354
370
  # Creates a queue.
355
371
  #
356
372
  # Queues created with this method allow tasks to live for a maximum of 31
357
- # days. After a task is 31 days old, the task will be deleted regardless of whether
358
- # it was dispatched or not.
373
+ # days. After a task is 31 days old, the task will be deleted regardless of
374
+ # whether it was dispatched or not.
359
375
  #
360
376
  # WARNING: Using this method may have unintended side effects if you are
361
377
  # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
@@ -385,11 +401,12 @@ module Google
385
401
  #
386
402
  # The list of allowed locations can be obtained by calling Cloud
387
403
  # Tasks' implementation of
388
- # [ListLocations][google.cloud.location.Locations.ListLocations].
404
+ # `::Google::Cloud::Location::Locations::Rest::Client#list_locations`.
389
405
  # @param queue [::Google::Cloud::Tasks::V2::Queue, ::Hash]
390
406
  # Required. The queue to create.
391
407
  #
392
- # [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
408
+ # [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
409
+ # existing queue.
393
410
  # @yield [result, operation] Access the result along with the TransportOperation object
394
411
  # @yieldparam result [::Google::Cloud::Tasks::V2::Queue]
395
412
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -439,8 +456,8 @@ module Google
439
456
  # the queue if it does exist.
440
457
  #
441
458
  # Queues created with this method allow tasks to live for a maximum of 31
442
- # days. After a task is 31 days old, the task will be deleted regardless of whether
443
- # it was dispatched or not.
459
+ # days. After a task is 31 days old, the task will be deleted regardless of
460
+ # whether it was dispatched or not.
444
461
  #
445
462
  # WARNING: Using this method may have unintended side effects if you are
446
463
  # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
@@ -666,9 +683,10 @@ module Google
666
683
  #
667
684
  # If a queue is paused then the system will stop dispatching tasks
668
685
  # until the queue is resumed via
669
- # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can still be added
670
- # when the queue is paused. A queue is paused if its
671
- # {::Google::Cloud::Tasks::V2::Queue#state state} is {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}.
686
+ # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#resume_queue ResumeQueue}. Tasks can
687
+ # still be added when the queue is paused. A queue is paused if its
688
+ # {::Google::Cloud::Tasks::V2::Queue#state state} is
689
+ # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}.
672
690
  #
673
691
  # @overload pause_queue(request, options = nil)
674
692
  # Pass arguments to `pause_queue` via a request object, either of type
@@ -735,9 +753,10 @@ module Google
735
753
  #
736
754
  # This method resumes a queue after it has been
737
755
  # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED} or
738
- # {::Google::Cloud::Tasks::V2::Queue::State::DISABLED DISABLED}. The state of a queue is stored
739
- # in the queue's {::Google::Cloud::Tasks::V2::Queue#state state}; after calling this method it
740
- # will be set to {::Google::Cloud::Tasks::V2::Queue::State::RUNNING RUNNING}.
756
+ # {::Google::Cloud::Tasks::V2::Queue::State::DISABLED DISABLED}. The state of a
757
+ # queue is stored in the queue's {::Google::Cloud::Tasks::V2::Queue#state state};
758
+ # after calling this method it will be set to
759
+ # {::Google::Cloud::Tasks::V2::Queue::State::RUNNING RUNNING}.
741
760
  #
742
761
  # WARNING: Resuming many high-QPS queues at the same time can
743
762
  # lead to target overloading. If you are resuming high-QPS
@@ -880,8 +899,8 @@ module Google
880
899
  end
881
900
 
882
901
  ##
883
- # Sets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}. Replaces any existing
884
- # policy.
902
+ # Sets the access control policy for a {::Google::Cloud::Tasks::V2::Queue Queue}.
903
+ # Replaces any existing policy.
885
904
  #
886
905
  # Note: The Cloud Console does not check queue-level IAM permissions yet.
887
906
  # Project-level permissions are required to use the Cloud Console.
@@ -964,9 +983,10 @@ module Google
964
983
  end
965
984
 
966
985
  ##
967
- # Returns permissions that a caller has on a {::Google::Cloud::Tasks::V2::Queue Queue}.
968
- # If the resource does not exist, this will return an empty set of
969
- # permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
986
+ # Returns permissions that a caller has on a
987
+ # {::Google::Cloud::Tasks::V2::Queue Queue}. If the resource does not exist, this
988
+ # will return an empty set of permissions, not a
989
+ # [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
970
990
  #
971
991
  # Note: This operation is designed to be used for building permission-aware
972
992
  # UIs and command-line tools, not for authorization checking. This operation
@@ -1040,10 +1060,10 @@ module Google
1040
1060
  ##
1041
1061
  # Lists the tasks in a queue.
1042
1062
  #
1043
- # By default, only the {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC} view is retrieved
1044
- # due to performance considerations;
1045
- # {::Google::Cloud::Tasks::V2::ListTasksRequest#response_view response_view} controls the
1046
- # subset of information which is returned.
1063
+ # By default, only the {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC} view is
1064
+ # retrieved due to performance considerations;
1065
+ # {::Google::Cloud::Tasks::V2::ListTasksRequest#response_view response_view}
1066
+ # controls the subset of information which is returned.
1047
1067
  #
1048
1068
  # The tasks may be returned in any order. The ordering may change at any
1049
1069
  # time.
@@ -1067,11 +1087,11 @@ module Google
1067
1087
  # Required. The queue name. For example:
1068
1088
  # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1069
1089
  # @param response_view [::Google::Cloud::Tasks::V2::Task::View]
1070
- # The response_view specifies which subset of the {::Google::Cloud::Tasks::V2::Task Task} will be
1071
- # returned.
1090
+ # The response_view specifies which subset of the
1091
+ # {::Google::Cloud::Tasks::V2::Task Task} will be returned.
1072
1092
  #
1073
- # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; not all
1074
- # information is retrieved by default because some data, such as
1093
+ # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
1094
+ # not all information is retrieved by default because some data, such as
1075
1095
  # payloads, might be desirable to return only when needed because
1076
1096
  # of its large size or because of the sensitivity of data that it
1077
1097
  # contains.
@@ -1083,8 +1103,8 @@ module Google
1083
1103
  # Maximum page size.
1084
1104
  #
1085
1105
  # Fewer tasks than requested might be returned, even if more tasks exist; use
1086
- # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} in the response to
1087
- # determine if more tasks exist.
1106
+ # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token}
1107
+ # in the response to determine if more tasks exist.
1088
1108
  #
1089
1109
  # The maximum page size is 1000. If unspecified, the page size will be the
1090
1110
  # maximum.
@@ -1093,9 +1113,9 @@ module Google
1093
1113
  #
1094
1114
  # To request the first page results, page_token must be empty. To
1095
1115
  # request the next page of results, page_token must be the value of
1096
- # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token} returned
1097
- # from the previous call to {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_tasks ListTasks}
1098
- # method.
1116
+ # {::Google::Cloud::Tasks::V2::ListTasksResponse#next_page_token next_page_token}
1117
+ # returned from the previous call to
1118
+ # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#list_tasks ListTasks} method.
1099
1119
  #
1100
1120
  # The page token is valid for only 2 hours.
1101
1121
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -1163,11 +1183,11 @@ module Google
1163
1183
  # Required. The task name. For example:
1164
1184
  # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1165
1185
  # @param response_view [::Google::Cloud::Tasks::V2::Task::View]
1166
- # The response_view specifies which subset of the {::Google::Cloud::Tasks::V2::Task Task} will be
1167
- # returned.
1186
+ # The response_view specifies which subset of the
1187
+ # {::Google::Cloud::Tasks::V2::Task Task} will be returned.
1168
1188
  #
1169
- # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; not all
1170
- # information is retrieved by default because some data, such as
1189
+ # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
1190
+ # not all information is retrieved by default because some data, such as
1171
1191
  # payloads, might be desirable to return only when needed because
1172
1192
  # of its large size or because of the sensitivity of data that it
1173
1193
  # contains.
@@ -1249,13 +1269,13 @@ module Google
1249
1269
  #
1250
1270
  # Task names have the following format:
1251
1271
  # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
1252
- # The user can optionally specify a task {::Google::Cloud::Tasks::V2::Task#name name}. If a
1253
- # name is not specified then the system will generate a random
1254
- # unique task id, which will be set in the task returned in the
1255
- # {::Google::Cloud::Tasks::V2::Task#name response}.
1272
+ # The user can optionally specify a task
1273
+ # {::Google::Cloud::Tasks::V2::Task#name name}. If a name is not specified then
1274
+ # the system will generate a random unique task id, which will be set in the
1275
+ # task returned in the {::Google::Cloud::Tasks::V2::Task#name response}.
1256
1276
  #
1257
- # If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or is in the
1258
- # past then Cloud Tasks will set it to the current time.
1277
+ # If {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} is not set or
1278
+ # is in the past then Cloud Tasks will set it to the current time.
1259
1279
  #
1260
1280
  # Task De-duplication:
1261
1281
  #
@@ -1270,20 +1290,20 @@ module Google
1270
1290
  # for ~9days after the original task was deleted or executed.
1271
1291
  #
1272
1292
  # Because there is an extra lookup cost to identify duplicate task
1273
- # names, these {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#create_task CreateTask} calls have significantly
1274
- # increased latency. Using hashed strings for the task id or for
1275
- # the prefix of the task id is recommended. Choosing task ids that
1276
- # are sequential or have sequential prefixes, for example using a
1293
+ # names, these {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#create_task CreateTask}
1294
+ # calls have significantly increased latency. Using hashed strings for the
1295
+ # task id or for the prefix of the task id is recommended. Choosing task ids
1296
+ # that are sequential or have sequential prefixes, for example using a
1277
1297
  # timestamp, causes an increase in latency and error rates in all
1278
1298
  # task commands. The infrastructure relies on an approximately
1279
1299
  # uniform distribution of task ids to store and serve tasks
1280
1300
  # efficiently.
1281
1301
  # @param response_view [::Google::Cloud::Tasks::V2::Task::View]
1282
- # The response_view specifies which subset of the {::Google::Cloud::Tasks::V2::Task Task} will be
1283
- # returned.
1302
+ # The response_view specifies which subset of the
1303
+ # {::Google::Cloud::Tasks::V2::Task Task} will be returned.
1284
1304
  #
1285
- # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; not all
1286
- # information is retrieved by default because some data, such as
1305
+ # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
1306
+ # not all information is retrieved by default because some data, such as
1287
1307
  # payloads, might be desirable to return only when needed because
1288
1308
  # of its large size or because of the sensitivity of data that it
1289
1309
  # contains.
@@ -1404,13 +1424,14 @@ module Google
1404
1424
  # Forces a task to run now.
1405
1425
  #
1406
1426
  # When this method is called, Cloud Tasks will dispatch the task, even if
1407
- # the task is already running, the queue has reached its {::Google::Cloud::Tasks::V2::RateLimits RateLimits} or
1408
- # is {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}.
1427
+ # the task is already running, the queue has reached its
1428
+ # {::Google::Cloud::Tasks::V2::RateLimits RateLimits} or is
1429
+ # {::Google::Cloud::Tasks::V2::Queue::State::PAUSED PAUSED}.
1409
1430
  #
1410
1431
  # This command is meant to be used for manual debugging. For
1411
- # example, {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} can be used to retry a failed
1412
- # task after a fix has been made or to manually force a task to be
1413
- # dispatched now.
1432
+ # example, {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} can be used to
1433
+ # retry a failed task after a fix has been made or to manually force a task
1434
+ # to be dispatched now.
1414
1435
  #
1415
1436
  # The dispatched task is returned. That is, the task that is returned
1416
1437
  # contains the [status][Task.status] after the task is dispatched but
@@ -1418,9 +1439,10 @@ module Google
1418
1439
  #
1419
1440
  # If Cloud Tasks receives a successful response from the task's
1420
1441
  # target, then the task will be deleted; otherwise the task's
1421
- # {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} will be reset to the time that
1422
- # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} was called plus the retry delay specified
1423
- # in the queue's {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}.
1442
+ # {::Google::Cloud::Tasks::V2::Task#schedule_time schedule_time} will be reset to
1443
+ # the time that {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} was
1444
+ # called plus the retry delay specified in the queue's
1445
+ # {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}.
1424
1446
  #
1425
1447
  # {::Google::Cloud::Tasks::V2::CloudTasks::Rest::Client#run_task RunTask} returns
1426
1448
  # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
@@ -1445,11 +1467,11 @@ module Google
1445
1467
  # Required. The task name. For example:
1446
1468
  # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1447
1469
  # @param response_view [::Google::Cloud::Tasks::V2::Task::View]
1448
- # The response_view specifies which subset of the {::Google::Cloud::Tasks::V2::Task Task} will be
1449
- # returned.
1470
+ # The response_view specifies which subset of the
1471
+ # {::Google::Cloud::Tasks::V2::Task Task} will be returned.
1450
1472
  #
1451
- # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC}; not all
1452
- # information is retrieved by default because some data, such as
1473
+ # By default response_view is {::Google::Cloud::Tasks::V2::Task::View::BASIC BASIC};
1474
+ # not all information is retrieved by default because some data, such as
1453
1475
  # payloads, might be desirable to return only when needed because
1454
1476
  # of its large size or because of the sensitivity of data that it
1455
1477
  # contains.
@@ -1572,7 +1594,9 @@ module Google
1572
1594
  class Configuration
1573
1595
  extend ::Gapic::Config
1574
1596
 
1575
- config_attr :endpoint, "cloudtasks.googleapis.com", ::String
1597
+ DEFAULT_ENDPOINT = "cloudtasks.googleapis.com"
1598
+
1599
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1576
1600
  config_attr :credentials, nil do |value|
1577
1601
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1578
1602
  allowed.any? { |klass| klass === value }
@@ -1585,6 +1609,13 @@ module Google
1585
1609
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1586
1610
  config_attr :quota_project, nil, ::String, nil
1587
1611
 
1612
+ # @private
1613
+ # Overrides for http bindings for the RPCs of this service
1614
+ # are only used when this service is used as mixin, and only
1615
+ # by the host service.
1616
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1617
+ config_attr :bindings_override, {}, ::Hash, nil
1618
+
1588
1619
  # @private
1589
1620
  def initialize parent_config = nil
1590
1621
  @parent_config = parent_config unless parent_config.nil?
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_list_queues_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_queue_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_create_queue_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_update_queue_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_queue_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -249,7 +249,7 @@ module Google
249
249
 
250
250
  verb, uri, query_string_params, body = ServiceStub.transcode_purge_queue_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
253
  else
254
254
  {}
255
255
  end
@@ -287,7 +287,7 @@ module Google
287
287
 
288
288
  verb, uri, query_string_params, body = ServiceStub.transcode_pause_queue_request request_pb
289
289
  query_string_params = if query_string_params.any?
290
- query_string_params.to_h { |p| p.split("=", 2) }
290
+ query_string_params.to_h { |p| p.split "=", 2 }
291
291
  else
292
292
  {}
293
293
  end
@@ -325,7 +325,7 @@ module Google
325
325
 
326
326
  verb, uri, query_string_params, body = ServiceStub.transcode_resume_queue_request request_pb
327
327
  query_string_params = if query_string_params.any?
328
- query_string_params.to_h { |p| p.split("=", 2) }
328
+ query_string_params.to_h { |p| p.split "=", 2 }
329
329
  else
330
330
  {}
331
331
  end
@@ -363,7 +363,7 @@ module Google
363
363
 
364
364
  verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
365
365
  query_string_params = if query_string_params.any?
366
- query_string_params.to_h { |p| p.split("=", 2) }
366
+ query_string_params.to_h { |p| p.split "=", 2 }
367
367
  else
368
368
  {}
369
369
  end
@@ -401,7 +401,7 @@ module Google
401
401
 
402
402
  verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
403
403
  query_string_params = if query_string_params.any?
404
- query_string_params.to_h { |p| p.split("=", 2) }
404
+ query_string_params.to_h { |p| p.split "=", 2 }
405
405
  else
406
406
  {}
407
407
  end
@@ -439,7 +439,7 @@ module Google
439
439
 
440
440
  verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
441
441
  query_string_params = if query_string_params.any?
442
- query_string_params.to_h { |p| p.split("=", 2) }
442
+ query_string_params.to_h { |p| p.split "=", 2 }
443
443
  else
444
444
  {}
445
445
  end
@@ -477,7 +477,7 @@ module Google
477
477
 
478
478
  verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb
479
479
  query_string_params = if query_string_params.any?
480
- query_string_params.to_h { |p| p.split("=", 2) }
480
+ query_string_params.to_h { |p| p.split "=", 2 }
481
481
  else
482
482
  {}
483
483
  end
@@ -515,7 +515,7 @@ module Google
515
515
 
516
516
  verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb
517
517
  query_string_params = if query_string_params.any?
518
- query_string_params.to_h { |p| p.split("=", 2) }
518
+ query_string_params.to_h { |p| p.split "=", 2 }
519
519
  else
520
520
  {}
521
521
  end
@@ -553,7 +553,7 @@ module Google
553
553
 
554
554
  verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb
555
555
  query_string_params = if query_string_params.any?
556
- query_string_params.to_h { |p| p.split("=", 2) }
556
+ query_string_params.to_h { |p| p.split "=", 2 }
557
557
  else
558
558
  {}
559
559
  end
@@ -591,7 +591,7 @@ module Google
591
591
 
592
592
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb
593
593
  query_string_params = if query_string_params.any?
594
- query_string_params.to_h { |p| p.split("=", 2) }
594
+ query_string_params.to_h { |p| p.split "=", 2 }
595
595
  else
596
596
  {}
597
597
  end
@@ -629,7 +629,7 @@ module Google
629
629
 
630
630
  verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb
631
631
  query_string_params = if query_string_params.any?
632
- query_string_params.to_h { |p| p.split("=", 2) }
632
+ query_string_params.to_h { |p| p.split "=", 2 }
633
633
  else
634
634
  {}
635
635
  end
@@ -21,6 +21,7 @@ require "gapic/config"
21
21
  require "gapic/config/method"
22
22
 
23
23
  require "google/cloud/tasks/v2/version"
24
+ require "google/cloud/tasks/v2/bindings_override"
24
25
 
25
26
  require "google/cloud/tasks/v2/cloud_tasks/credentials"
26
27
  require "google/cloud/tasks/v2/cloud_tasks/paths"