1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.google.cloud.tasks.v2; 17 18 import static io.grpc.MethodDescriptor.generateFullMethodName; 19 20 /** 21 * 22 * 23 * <pre> 24 * Cloud Tasks allows developers to manage the execution of background 25 * work in their applications. 26 * </pre> 27 */ 28 @javax.annotation.Generated( 29 value = "by gRPC proto compiler", 30 comments = "Source: google/cloud/tasks/v2/cloudtasks.proto") 31 @io.grpc.stub.annotations.GrpcGenerated 32 public final class CloudTasksGrpc { 33 CloudTasksGrpc()34 private CloudTasksGrpc() {} 35 36 public static final String SERVICE_NAME = "google.cloud.tasks.v2.CloudTasks"; 37 38 // Static method descriptors that strictly reflect the proto. 39 private static volatile io.grpc.MethodDescriptor< 40 com.google.cloud.tasks.v2.ListQueuesRequest, com.google.cloud.tasks.v2.ListQueuesResponse> 41 getListQueuesMethod; 42 43 @io.grpc.stub.annotations.RpcMethod( 44 fullMethodName = SERVICE_NAME + '/' + "ListQueues", 45 requestType = com.google.cloud.tasks.v2.ListQueuesRequest.class, 46 responseType = com.google.cloud.tasks.v2.ListQueuesResponse.class, 47 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 48 public static io.grpc.MethodDescriptor< 49 com.google.cloud.tasks.v2.ListQueuesRequest, com.google.cloud.tasks.v2.ListQueuesResponse> getListQueuesMethod()50 getListQueuesMethod() { 51 io.grpc.MethodDescriptor< 52 com.google.cloud.tasks.v2.ListQueuesRequest, 53 com.google.cloud.tasks.v2.ListQueuesResponse> 54 getListQueuesMethod; 55 if ((getListQueuesMethod = CloudTasksGrpc.getListQueuesMethod) == null) { 56 synchronized (CloudTasksGrpc.class) { 57 if ((getListQueuesMethod = CloudTasksGrpc.getListQueuesMethod) == null) { 58 CloudTasksGrpc.getListQueuesMethod = 59 getListQueuesMethod = 60 io.grpc.MethodDescriptor 61 .<com.google.cloud.tasks.v2.ListQueuesRequest, 62 com.google.cloud.tasks.v2.ListQueuesResponse> 63 newBuilder() 64 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 65 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListQueues")) 66 .setSampledToLocalTracing(true) 67 .setRequestMarshaller( 68 io.grpc.protobuf.ProtoUtils.marshaller( 69 com.google.cloud.tasks.v2.ListQueuesRequest.getDefaultInstance())) 70 .setResponseMarshaller( 71 io.grpc.protobuf.ProtoUtils.marshaller( 72 com.google.cloud.tasks.v2.ListQueuesResponse.getDefaultInstance())) 73 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("ListQueues")) 74 .build(); 75 } 76 } 77 } 78 return getListQueuesMethod; 79 } 80 81 private static volatile io.grpc.MethodDescriptor< 82 com.google.cloud.tasks.v2.GetQueueRequest, com.google.cloud.tasks.v2.Queue> 83 getGetQueueMethod; 84 85 @io.grpc.stub.annotations.RpcMethod( 86 fullMethodName = SERVICE_NAME + '/' + "GetQueue", 87 requestType = com.google.cloud.tasks.v2.GetQueueRequest.class, 88 responseType = com.google.cloud.tasks.v2.Queue.class, 89 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 90 public static io.grpc.MethodDescriptor< 91 com.google.cloud.tasks.v2.GetQueueRequest, com.google.cloud.tasks.v2.Queue> getGetQueueMethod()92 getGetQueueMethod() { 93 io.grpc.MethodDescriptor< 94 com.google.cloud.tasks.v2.GetQueueRequest, com.google.cloud.tasks.v2.Queue> 95 getGetQueueMethod; 96 if ((getGetQueueMethod = CloudTasksGrpc.getGetQueueMethod) == null) { 97 synchronized (CloudTasksGrpc.class) { 98 if ((getGetQueueMethod = CloudTasksGrpc.getGetQueueMethod) == null) { 99 CloudTasksGrpc.getGetQueueMethod = 100 getGetQueueMethod = 101 io.grpc.MethodDescriptor 102 .<com.google.cloud.tasks.v2.GetQueueRequest, com.google.cloud.tasks.v2.Queue> 103 newBuilder() 104 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 105 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetQueue")) 106 .setSampledToLocalTracing(true) 107 .setRequestMarshaller( 108 io.grpc.protobuf.ProtoUtils.marshaller( 109 com.google.cloud.tasks.v2.GetQueueRequest.getDefaultInstance())) 110 .setResponseMarshaller( 111 io.grpc.protobuf.ProtoUtils.marshaller( 112 com.google.cloud.tasks.v2.Queue.getDefaultInstance())) 113 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("GetQueue")) 114 .build(); 115 } 116 } 117 } 118 return getGetQueueMethod; 119 } 120 121 private static volatile io.grpc.MethodDescriptor< 122 com.google.cloud.tasks.v2.CreateQueueRequest, com.google.cloud.tasks.v2.Queue> 123 getCreateQueueMethod; 124 125 @io.grpc.stub.annotations.RpcMethod( 126 fullMethodName = SERVICE_NAME + '/' + "CreateQueue", 127 requestType = com.google.cloud.tasks.v2.CreateQueueRequest.class, 128 responseType = com.google.cloud.tasks.v2.Queue.class, 129 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 130 public static io.grpc.MethodDescriptor< 131 com.google.cloud.tasks.v2.CreateQueueRequest, com.google.cloud.tasks.v2.Queue> getCreateQueueMethod()132 getCreateQueueMethod() { 133 io.grpc.MethodDescriptor< 134 com.google.cloud.tasks.v2.CreateQueueRequest, com.google.cloud.tasks.v2.Queue> 135 getCreateQueueMethod; 136 if ((getCreateQueueMethod = CloudTasksGrpc.getCreateQueueMethod) == null) { 137 synchronized (CloudTasksGrpc.class) { 138 if ((getCreateQueueMethod = CloudTasksGrpc.getCreateQueueMethod) == null) { 139 CloudTasksGrpc.getCreateQueueMethod = 140 getCreateQueueMethod = 141 io.grpc.MethodDescriptor 142 .<com.google.cloud.tasks.v2.CreateQueueRequest, 143 com.google.cloud.tasks.v2.Queue> 144 newBuilder() 145 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 146 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateQueue")) 147 .setSampledToLocalTracing(true) 148 .setRequestMarshaller( 149 io.grpc.protobuf.ProtoUtils.marshaller( 150 com.google.cloud.tasks.v2.CreateQueueRequest.getDefaultInstance())) 151 .setResponseMarshaller( 152 io.grpc.protobuf.ProtoUtils.marshaller( 153 com.google.cloud.tasks.v2.Queue.getDefaultInstance())) 154 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("CreateQueue")) 155 .build(); 156 } 157 } 158 } 159 return getCreateQueueMethod; 160 } 161 162 private static volatile io.grpc.MethodDescriptor< 163 com.google.cloud.tasks.v2.UpdateQueueRequest, com.google.cloud.tasks.v2.Queue> 164 getUpdateQueueMethod; 165 166 @io.grpc.stub.annotations.RpcMethod( 167 fullMethodName = SERVICE_NAME + '/' + "UpdateQueue", 168 requestType = com.google.cloud.tasks.v2.UpdateQueueRequest.class, 169 responseType = com.google.cloud.tasks.v2.Queue.class, 170 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 171 public static io.grpc.MethodDescriptor< 172 com.google.cloud.tasks.v2.UpdateQueueRequest, com.google.cloud.tasks.v2.Queue> getUpdateQueueMethod()173 getUpdateQueueMethod() { 174 io.grpc.MethodDescriptor< 175 com.google.cloud.tasks.v2.UpdateQueueRequest, com.google.cloud.tasks.v2.Queue> 176 getUpdateQueueMethod; 177 if ((getUpdateQueueMethod = CloudTasksGrpc.getUpdateQueueMethod) == null) { 178 synchronized (CloudTasksGrpc.class) { 179 if ((getUpdateQueueMethod = CloudTasksGrpc.getUpdateQueueMethod) == null) { 180 CloudTasksGrpc.getUpdateQueueMethod = 181 getUpdateQueueMethod = 182 io.grpc.MethodDescriptor 183 .<com.google.cloud.tasks.v2.UpdateQueueRequest, 184 com.google.cloud.tasks.v2.Queue> 185 newBuilder() 186 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 187 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateQueue")) 188 .setSampledToLocalTracing(true) 189 .setRequestMarshaller( 190 io.grpc.protobuf.ProtoUtils.marshaller( 191 com.google.cloud.tasks.v2.UpdateQueueRequest.getDefaultInstance())) 192 .setResponseMarshaller( 193 io.grpc.protobuf.ProtoUtils.marshaller( 194 com.google.cloud.tasks.v2.Queue.getDefaultInstance())) 195 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("UpdateQueue")) 196 .build(); 197 } 198 } 199 } 200 return getUpdateQueueMethod; 201 } 202 203 private static volatile io.grpc.MethodDescriptor< 204 com.google.cloud.tasks.v2.DeleteQueueRequest, com.google.protobuf.Empty> 205 getDeleteQueueMethod; 206 207 @io.grpc.stub.annotations.RpcMethod( 208 fullMethodName = SERVICE_NAME + '/' + "DeleteQueue", 209 requestType = com.google.cloud.tasks.v2.DeleteQueueRequest.class, 210 responseType = com.google.protobuf.Empty.class, 211 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 212 public static io.grpc.MethodDescriptor< 213 com.google.cloud.tasks.v2.DeleteQueueRequest, com.google.protobuf.Empty> getDeleteQueueMethod()214 getDeleteQueueMethod() { 215 io.grpc.MethodDescriptor< 216 com.google.cloud.tasks.v2.DeleteQueueRequest, com.google.protobuf.Empty> 217 getDeleteQueueMethod; 218 if ((getDeleteQueueMethod = CloudTasksGrpc.getDeleteQueueMethod) == null) { 219 synchronized (CloudTasksGrpc.class) { 220 if ((getDeleteQueueMethod = CloudTasksGrpc.getDeleteQueueMethod) == null) { 221 CloudTasksGrpc.getDeleteQueueMethod = 222 getDeleteQueueMethod = 223 io.grpc.MethodDescriptor 224 .<com.google.cloud.tasks.v2.DeleteQueueRequest, com.google.protobuf.Empty> 225 newBuilder() 226 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 227 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteQueue")) 228 .setSampledToLocalTracing(true) 229 .setRequestMarshaller( 230 io.grpc.protobuf.ProtoUtils.marshaller( 231 com.google.cloud.tasks.v2.DeleteQueueRequest.getDefaultInstance())) 232 .setResponseMarshaller( 233 io.grpc.protobuf.ProtoUtils.marshaller( 234 com.google.protobuf.Empty.getDefaultInstance())) 235 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("DeleteQueue")) 236 .build(); 237 } 238 } 239 } 240 return getDeleteQueueMethod; 241 } 242 243 private static volatile io.grpc.MethodDescriptor< 244 com.google.cloud.tasks.v2.PurgeQueueRequest, com.google.cloud.tasks.v2.Queue> 245 getPurgeQueueMethod; 246 247 @io.grpc.stub.annotations.RpcMethod( 248 fullMethodName = SERVICE_NAME + '/' + "PurgeQueue", 249 requestType = com.google.cloud.tasks.v2.PurgeQueueRequest.class, 250 responseType = com.google.cloud.tasks.v2.Queue.class, 251 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 252 public static io.grpc.MethodDescriptor< 253 com.google.cloud.tasks.v2.PurgeQueueRequest, com.google.cloud.tasks.v2.Queue> getPurgeQueueMethod()254 getPurgeQueueMethod() { 255 io.grpc.MethodDescriptor< 256 com.google.cloud.tasks.v2.PurgeQueueRequest, com.google.cloud.tasks.v2.Queue> 257 getPurgeQueueMethod; 258 if ((getPurgeQueueMethod = CloudTasksGrpc.getPurgeQueueMethod) == null) { 259 synchronized (CloudTasksGrpc.class) { 260 if ((getPurgeQueueMethod = CloudTasksGrpc.getPurgeQueueMethod) == null) { 261 CloudTasksGrpc.getPurgeQueueMethod = 262 getPurgeQueueMethod = 263 io.grpc.MethodDescriptor 264 .<com.google.cloud.tasks.v2.PurgeQueueRequest, 265 com.google.cloud.tasks.v2.Queue> 266 newBuilder() 267 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 268 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PurgeQueue")) 269 .setSampledToLocalTracing(true) 270 .setRequestMarshaller( 271 io.grpc.protobuf.ProtoUtils.marshaller( 272 com.google.cloud.tasks.v2.PurgeQueueRequest.getDefaultInstance())) 273 .setResponseMarshaller( 274 io.grpc.protobuf.ProtoUtils.marshaller( 275 com.google.cloud.tasks.v2.Queue.getDefaultInstance())) 276 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("PurgeQueue")) 277 .build(); 278 } 279 } 280 } 281 return getPurgeQueueMethod; 282 } 283 284 private static volatile io.grpc.MethodDescriptor< 285 com.google.cloud.tasks.v2.PauseQueueRequest, com.google.cloud.tasks.v2.Queue> 286 getPauseQueueMethod; 287 288 @io.grpc.stub.annotations.RpcMethod( 289 fullMethodName = SERVICE_NAME + '/' + "PauseQueue", 290 requestType = com.google.cloud.tasks.v2.PauseQueueRequest.class, 291 responseType = com.google.cloud.tasks.v2.Queue.class, 292 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 293 public static io.grpc.MethodDescriptor< 294 com.google.cloud.tasks.v2.PauseQueueRequest, com.google.cloud.tasks.v2.Queue> getPauseQueueMethod()295 getPauseQueueMethod() { 296 io.grpc.MethodDescriptor< 297 com.google.cloud.tasks.v2.PauseQueueRequest, com.google.cloud.tasks.v2.Queue> 298 getPauseQueueMethod; 299 if ((getPauseQueueMethod = CloudTasksGrpc.getPauseQueueMethod) == null) { 300 synchronized (CloudTasksGrpc.class) { 301 if ((getPauseQueueMethod = CloudTasksGrpc.getPauseQueueMethod) == null) { 302 CloudTasksGrpc.getPauseQueueMethod = 303 getPauseQueueMethod = 304 io.grpc.MethodDescriptor 305 .<com.google.cloud.tasks.v2.PauseQueueRequest, 306 com.google.cloud.tasks.v2.Queue> 307 newBuilder() 308 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 309 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PauseQueue")) 310 .setSampledToLocalTracing(true) 311 .setRequestMarshaller( 312 io.grpc.protobuf.ProtoUtils.marshaller( 313 com.google.cloud.tasks.v2.PauseQueueRequest.getDefaultInstance())) 314 .setResponseMarshaller( 315 io.grpc.protobuf.ProtoUtils.marshaller( 316 com.google.cloud.tasks.v2.Queue.getDefaultInstance())) 317 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("PauseQueue")) 318 .build(); 319 } 320 } 321 } 322 return getPauseQueueMethod; 323 } 324 325 private static volatile io.grpc.MethodDescriptor< 326 com.google.cloud.tasks.v2.ResumeQueueRequest, com.google.cloud.tasks.v2.Queue> 327 getResumeQueueMethod; 328 329 @io.grpc.stub.annotations.RpcMethod( 330 fullMethodName = SERVICE_NAME + '/' + "ResumeQueue", 331 requestType = com.google.cloud.tasks.v2.ResumeQueueRequest.class, 332 responseType = com.google.cloud.tasks.v2.Queue.class, 333 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 334 public static io.grpc.MethodDescriptor< 335 com.google.cloud.tasks.v2.ResumeQueueRequest, com.google.cloud.tasks.v2.Queue> getResumeQueueMethod()336 getResumeQueueMethod() { 337 io.grpc.MethodDescriptor< 338 com.google.cloud.tasks.v2.ResumeQueueRequest, com.google.cloud.tasks.v2.Queue> 339 getResumeQueueMethod; 340 if ((getResumeQueueMethod = CloudTasksGrpc.getResumeQueueMethod) == null) { 341 synchronized (CloudTasksGrpc.class) { 342 if ((getResumeQueueMethod = CloudTasksGrpc.getResumeQueueMethod) == null) { 343 CloudTasksGrpc.getResumeQueueMethod = 344 getResumeQueueMethod = 345 io.grpc.MethodDescriptor 346 .<com.google.cloud.tasks.v2.ResumeQueueRequest, 347 com.google.cloud.tasks.v2.Queue> 348 newBuilder() 349 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 350 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResumeQueue")) 351 .setSampledToLocalTracing(true) 352 .setRequestMarshaller( 353 io.grpc.protobuf.ProtoUtils.marshaller( 354 com.google.cloud.tasks.v2.ResumeQueueRequest.getDefaultInstance())) 355 .setResponseMarshaller( 356 io.grpc.protobuf.ProtoUtils.marshaller( 357 com.google.cloud.tasks.v2.Queue.getDefaultInstance())) 358 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("ResumeQueue")) 359 .build(); 360 } 361 } 362 } 363 return getResumeQueueMethod; 364 } 365 366 private static volatile io.grpc.MethodDescriptor< 367 com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> 368 getGetIamPolicyMethod; 369 370 @io.grpc.stub.annotations.RpcMethod( 371 fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", 372 requestType = com.google.iam.v1.GetIamPolicyRequest.class, 373 responseType = com.google.iam.v1.Policy.class, 374 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 375 public static io.grpc.MethodDescriptor< 376 com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> getGetIamPolicyMethod()377 getGetIamPolicyMethod() { 378 io.grpc.MethodDescriptor<com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> 379 getGetIamPolicyMethod; 380 if ((getGetIamPolicyMethod = CloudTasksGrpc.getGetIamPolicyMethod) == null) { 381 synchronized (CloudTasksGrpc.class) { 382 if ((getGetIamPolicyMethod = CloudTasksGrpc.getGetIamPolicyMethod) == null) { 383 CloudTasksGrpc.getGetIamPolicyMethod = 384 getGetIamPolicyMethod = 385 io.grpc.MethodDescriptor 386 .<com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy>newBuilder() 387 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 388 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) 389 .setSampledToLocalTracing(true) 390 .setRequestMarshaller( 391 io.grpc.protobuf.ProtoUtils.marshaller( 392 com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) 393 .setResponseMarshaller( 394 io.grpc.protobuf.ProtoUtils.marshaller( 395 com.google.iam.v1.Policy.getDefaultInstance())) 396 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("GetIamPolicy")) 397 .build(); 398 } 399 } 400 } 401 return getGetIamPolicyMethod; 402 } 403 404 private static volatile io.grpc.MethodDescriptor< 405 com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> 406 getSetIamPolicyMethod; 407 408 @io.grpc.stub.annotations.RpcMethod( 409 fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", 410 requestType = com.google.iam.v1.SetIamPolicyRequest.class, 411 responseType = com.google.iam.v1.Policy.class, 412 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 413 public static io.grpc.MethodDescriptor< 414 com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> getSetIamPolicyMethod()415 getSetIamPolicyMethod() { 416 io.grpc.MethodDescriptor<com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> 417 getSetIamPolicyMethod; 418 if ((getSetIamPolicyMethod = CloudTasksGrpc.getSetIamPolicyMethod) == null) { 419 synchronized (CloudTasksGrpc.class) { 420 if ((getSetIamPolicyMethod = CloudTasksGrpc.getSetIamPolicyMethod) == null) { 421 CloudTasksGrpc.getSetIamPolicyMethod = 422 getSetIamPolicyMethod = 423 io.grpc.MethodDescriptor 424 .<com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy>newBuilder() 425 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 426 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) 427 .setSampledToLocalTracing(true) 428 .setRequestMarshaller( 429 io.grpc.protobuf.ProtoUtils.marshaller( 430 com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) 431 .setResponseMarshaller( 432 io.grpc.protobuf.ProtoUtils.marshaller( 433 com.google.iam.v1.Policy.getDefaultInstance())) 434 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("SetIamPolicy")) 435 .build(); 436 } 437 } 438 } 439 return getSetIamPolicyMethod; 440 } 441 442 private static volatile io.grpc.MethodDescriptor< 443 com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> 444 getTestIamPermissionsMethod; 445 446 @io.grpc.stub.annotations.RpcMethod( 447 fullMethodName = SERVICE_NAME + '/' + "TestIamPermissions", 448 requestType = com.google.iam.v1.TestIamPermissionsRequest.class, 449 responseType = com.google.iam.v1.TestIamPermissionsResponse.class, 450 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 451 public static io.grpc.MethodDescriptor< 452 com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> getTestIamPermissionsMethod()453 getTestIamPermissionsMethod() { 454 io.grpc.MethodDescriptor< 455 com.google.iam.v1.TestIamPermissionsRequest, 456 com.google.iam.v1.TestIamPermissionsResponse> 457 getTestIamPermissionsMethod; 458 if ((getTestIamPermissionsMethod = CloudTasksGrpc.getTestIamPermissionsMethod) == null) { 459 synchronized (CloudTasksGrpc.class) { 460 if ((getTestIamPermissionsMethod = CloudTasksGrpc.getTestIamPermissionsMethod) == null) { 461 CloudTasksGrpc.getTestIamPermissionsMethod = 462 getTestIamPermissionsMethod = 463 io.grpc.MethodDescriptor 464 .<com.google.iam.v1.TestIamPermissionsRequest, 465 com.google.iam.v1.TestIamPermissionsResponse> 466 newBuilder() 467 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 468 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TestIamPermissions")) 469 .setSampledToLocalTracing(true) 470 .setRequestMarshaller( 471 io.grpc.protobuf.ProtoUtils.marshaller( 472 com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance())) 473 .setResponseMarshaller( 474 io.grpc.protobuf.ProtoUtils.marshaller( 475 com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance())) 476 .setSchemaDescriptor( 477 new CloudTasksMethodDescriptorSupplier("TestIamPermissions")) 478 .build(); 479 } 480 } 481 } 482 return getTestIamPermissionsMethod; 483 } 484 485 private static volatile io.grpc.MethodDescriptor< 486 com.google.cloud.tasks.v2.ListTasksRequest, com.google.cloud.tasks.v2.ListTasksResponse> 487 getListTasksMethod; 488 489 @io.grpc.stub.annotations.RpcMethod( 490 fullMethodName = SERVICE_NAME + '/' + "ListTasks", 491 requestType = com.google.cloud.tasks.v2.ListTasksRequest.class, 492 responseType = com.google.cloud.tasks.v2.ListTasksResponse.class, 493 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 494 public static io.grpc.MethodDescriptor< 495 com.google.cloud.tasks.v2.ListTasksRequest, com.google.cloud.tasks.v2.ListTasksResponse> getListTasksMethod()496 getListTasksMethod() { 497 io.grpc.MethodDescriptor< 498 com.google.cloud.tasks.v2.ListTasksRequest, com.google.cloud.tasks.v2.ListTasksResponse> 499 getListTasksMethod; 500 if ((getListTasksMethod = CloudTasksGrpc.getListTasksMethod) == null) { 501 synchronized (CloudTasksGrpc.class) { 502 if ((getListTasksMethod = CloudTasksGrpc.getListTasksMethod) == null) { 503 CloudTasksGrpc.getListTasksMethod = 504 getListTasksMethod = 505 io.grpc.MethodDescriptor 506 .<com.google.cloud.tasks.v2.ListTasksRequest, 507 com.google.cloud.tasks.v2.ListTasksResponse> 508 newBuilder() 509 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 510 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTasks")) 511 .setSampledToLocalTracing(true) 512 .setRequestMarshaller( 513 io.grpc.protobuf.ProtoUtils.marshaller( 514 com.google.cloud.tasks.v2.ListTasksRequest.getDefaultInstance())) 515 .setResponseMarshaller( 516 io.grpc.protobuf.ProtoUtils.marshaller( 517 com.google.cloud.tasks.v2.ListTasksResponse.getDefaultInstance())) 518 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("ListTasks")) 519 .build(); 520 } 521 } 522 } 523 return getListTasksMethod; 524 } 525 526 private static volatile io.grpc.MethodDescriptor< 527 com.google.cloud.tasks.v2.GetTaskRequest, com.google.cloud.tasks.v2.Task> 528 getGetTaskMethod; 529 530 @io.grpc.stub.annotations.RpcMethod( 531 fullMethodName = SERVICE_NAME + '/' + "GetTask", 532 requestType = com.google.cloud.tasks.v2.GetTaskRequest.class, 533 responseType = com.google.cloud.tasks.v2.Task.class, 534 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 535 public static io.grpc.MethodDescriptor< 536 com.google.cloud.tasks.v2.GetTaskRequest, com.google.cloud.tasks.v2.Task> getGetTaskMethod()537 getGetTaskMethod() { 538 io.grpc.MethodDescriptor< 539 com.google.cloud.tasks.v2.GetTaskRequest, com.google.cloud.tasks.v2.Task> 540 getGetTaskMethod; 541 if ((getGetTaskMethod = CloudTasksGrpc.getGetTaskMethod) == null) { 542 synchronized (CloudTasksGrpc.class) { 543 if ((getGetTaskMethod = CloudTasksGrpc.getGetTaskMethod) == null) { 544 CloudTasksGrpc.getGetTaskMethod = 545 getGetTaskMethod = 546 io.grpc.MethodDescriptor 547 .<com.google.cloud.tasks.v2.GetTaskRequest, com.google.cloud.tasks.v2.Task> 548 newBuilder() 549 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 550 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTask")) 551 .setSampledToLocalTracing(true) 552 .setRequestMarshaller( 553 io.grpc.protobuf.ProtoUtils.marshaller( 554 com.google.cloud.tasks.v2.GetTaskRequest.getDefaultInstance())) 555 .setResponseMarshaller( 556 io.grpc.protobuf.ProtoUtils.marshaller( 557 com.google.cloud.tasks.v2.Task.getDefaultInstance())) 558 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("GetTask")) 559 .build(); 560 } 561 } 562 } 563 return getGetTaskMethod; 564 } 565 566 private static volatile io.grpc.MethodDescriptor< 567 com.google.cloud.tasks.v2.CreateTaskRequest, com.google.cloud.tasks.v2.Task> 568 getCreateTaskMethod; 569 570 @io.grpc.stub.annotations.RpcMethod( 571 fullMethodName = SERVICE_NAME + '/' + "CreateTask", 572 requestType = com.google.cloud.tasks.v2.CreateTaskRequest.class, 573 responseType = com.google.cloud.tasks.v2.Task.class, 574 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 575 public static io.grpc.MethodDescriptor< 576 com.google.cloud.tasks.v2.CreateTaskRequest, com.google.cloud.tasks.v2.Task> getCreateTaskMethod()577 getCreateTaskMethod() { 578 io.grpc.MethodDescriptor< 579 com.google.cloud.tasks.v2.CreateTaskRequest, com.google.cloud.tasks.v2.Task> 580 getCreateTaskMethod; 581 if ((getCreateTaskMethod = CloudTasksGrpc.getCreateTaskMethod) == null) { 582 synchronized (CloudTasksGrpc.class) { 583 if ((getCreateTaskMethod = CloudTasksGrpc.getCreateTaskMethod) == null) { 584 CloudTasksGrpc.getCreateTaskMethod = 585 getCreateTaskMethod = 586 io.grpc.MethodDescriptor 587 .<com.google.cloud.tasks.v2.CreateTaskRequest, com.google.cloud.tasks.v2.Task> 588 newBuilder() 589 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 590 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTask")) 591 .setSampledToLocalTracing(true) 592 .setRequestMarshaller( 593 io.grpc.protobuf.ProtoUtils.marshaller( 594 com.google.cloud.tasks.v2.CreateTaskRequest.getDefaultInstance())) 595 .setResponseMarshaller( 596 io.grpc.protobuf.ProtoUtils.marshaller( 597 com.google.cloud.tasks.v2.Task.getDefaultInstance())) 598 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("CreateTask")) 599 .build(); 600 } 601 } 602 } 603 return getCreateTaskMethod; 604 } 605 606 private static volatile io.grpc.MethodDescriptor< 607 com.google.cloud.tasks.v2.DeleteTaskRequest, com.google.protobuf.Empty> 608 getDeleteTaskMethod; 609 610 @io.grpc.stub.annotations.RpcMethod( 611 fullMethodName = SERVICE_NAME + '/' + "DeleteTask", 612 requestType = com.google.cloud.tasks.v2.DeleteTaskRequest.class, 613 responseType = com.google.protobuf.Empty.class, 614 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 615 public static io.grpc.MethodDescriptor< 616 com.google.cloud.tasks.v2.DeleteTaskRequest, com.google.protobuf.Empty> getDeleteTaskMethod()617 getDeleteTaskMethod() { 618 io.grpc.MethodDescriptor<com.google.cloud.tasks.v2.DeleteTaskRequest, com.google.protobuf.Empty> 619 getDeleteTaskMethod; 620 if ((getDeleteTaskMethod = CloudTasksGrpc.getDeleteTaskMethod) == null) { 621 synchronized (CloudTasksGrpc.class) { 622 if ((getDeleteTaskMethod = CloudTasksGrpc.getDeleteTaskMethod) == null) { 623 CloudTasksGrpc.getDeleteTaskMethod = 624 getDeleteTaskMethod = 625 io.grpc.MethodDescriptor 626 .<com.google.cloud.tasks.v2.DeleteTaskRequest, com.google.protobuf.Empty> 627 newBuilder() 628 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 629 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTask")) 630 .setSampledToLocalTracing(true) 631 .setRequestMarshaller( 632 io.grpc.protobuf.ProtoUtils.marshaller( 633 com.google.cloud.tasks.v2.DeleteTaskRequest.getDefaultInstance())) 634 .setResponseMarshaller( 635 io.grpc.protobuf.ProtoUtils.marshaller( 636 com.google.protobuf.Empty.getDefaultInstance())) 637 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("DeleteTask")) 638 .build(); 639 } 640 } 641 } 642 return getDeleteTaskMethod; 643 } 644 645 private static volatile io.grpc.MethodDescriptor< 646 com.google.cloud.tasks.v2.RunTaskRequest, com.google.cloud.tasks.v2.Task> 647 getRunTaskMethod; 648 649 @io.grpc.stub.annotations.RpcMethod( 650 fullMethodName = SERVICE_NAME + '/' + "RunTask", 651 requestType = com.google.cloud.tasks.v2.RunTaskRequest.class, 652 responseType = com.google.cloud.tasks.v2.Task.class, 653 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 654 public static io.grpc.MethodDescriptor< 655 com.google.cloud.tasks.v2.RunTaskRequest, com.google.cloud.tasks.v2.Task> getRunTaskMethod()656 getRunTaskMethod() { 657 io.grpc.MethodDescriptor< 658 com.google.cloud.tasks.v2.RunTaskRequest, com.google.cloud.tasks.v2.Task> 659 getRunTaskMethod; 660 if ((getRunTaskMethod = CloudTasksGrpc.getRunTaskMethod) == null) { 661 synchronized (CloudTasksGrpc.class) { 662 if ((getRunTaskMethod = CloudTasksGrpc.getRunTaskMethod) == null) { 663 CloudTasksGrpc.getRunTaskMethod = 664 getRunTaskMethod = 665 io.grpc.MethodDescriptor 666 .<com.google.cloud.tasks.v2.RunTaskRequest, com.google.cloud.tasks.v2.Task> 667 newBuilder() 668 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 669 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunTask")) 670 .setSampledToLocalTracing(true) 671 .setRequestMarshaller( 672 io.grpc.protobuf.ProtoUtils.marshaller( 673 com.google.cloud.tasks.v2.RunTaskRequest.getDefaultInstance())) 674 .setResponseMarshaller( 675 io.grpc.protobuf.ProtoUtils.marshaller( 676 com.google.cloud.tasks.v2.Task.getDefaultInstance())) 677 .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("RunTask")) 678 .build(); 679 } 680 } 681 } 682 return getRunTaskMethod; 683 } 684 685 /** Creates a new async stub that supports all call types for the service */ newStub(io.grpc.Channel channel)686 public static CloudTasksStub newStub(io.grpc.Channel channel) { 687 io.grpc.stub.AbstractStub.StubFactory<CloudTasksStub> factory = 688 new io.grpc.stub.AbstractStub.StubFactory<CloudTasksStub>() { 689 @java.lang.Override 690 public CloudTasksStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 691 return new CloudTasksStub(channel, callOptions); 692 } 693 }; 694 return CloudTasksStub.newStub(factory, channel); 695 } 696 697 /** 698 * Creates a new blocking-style stub that supports unary and streaming output calls on the service 699 */ newBlockingStub(io.grpc.Channel channel)700 public static CloudTasksBlockingStub newBlockingStub(io.grpc.Channel channel) { 701 io.grpc.stub.AbstractStub.StubFactory<CloudTasksBlockingStub> factory = 702 new io.grpc.stub.AbstractStub.StubFactory<CloudTasksBlockingStub>() { 703 @java.lang.Override 704 public CloudTasksBlockingStub newStub( 705 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 706 return new CloudTasksBlockingStub(channel, callOptions); 707 } 708 }; 709 return CloudTasksBlockingStub.newStub(factory, channel); 710 } 711 712 /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ newFutureStub(io.grpc.Channel channel)713 public static CloudTasksFutureStub newFutureStub(io.grpc.Channel channel) { 714 io.grpc.stub.AbstractStub.StubFactory<CloudTasksFutureStub> factory = 715 new io.grpc.stub.AbstractStub.StubFactory<CloudTasksFutureStub>() { 716 @java.lang.Override 717 public CloudTasksFutureStub newStub( 718 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 719 return new CloudTasksFutureStub(channel, callOptions); 720 } 721 }; 722 return CloudTasksFutureStub.newStub(factory, channel); 723 } 724 725 /** 726 * 727 * 728 * <pre> 729 * Cloud Tasks allows developers to manage the execution of background 730 * work in their applications. 731 * </pre> 732 */ 733 public interface AsyncService { 734 735 /** 736 * 737 * 738 * <pre> 739 * Lists queues. 740 * Queues are returned in lexicographical order. 741 * </pre> 742 */ listQueues( com.google.cloud.tasks.v2.ListQueuesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListQueuesResponse> responseObserver)743 default void listQueues( 744 com.google.cloud.tasks.v2.ListQueuesRequest request, 745 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListQueuesResponse> 746 responseObserver) { 747 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListQueuesMethod(), responseObserver); 748 } 749 750 /** 751 * 752 * 753 * <pre> 754 * Gets a queue. 755 * </pre> 756 */ getQueue( com.google.cloud.tasks.v2.GetQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)757 default void getQueue( 758 com.google.cloud.tasks.v2.GetQueueRequest request, 759 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 760 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetQueueMethod(), responseObserver); 761 } 762 763 /** 764 * 765 * 766 * <pre> 767 * Creates a queue. 768 * Queues created with this method allow tasks to live for a maximum of 31 769 * days. After a task is 31 days old, the task will be deleted regardless of whether 770 * it was dispatched or not. 771 * WARNING: Using this method may have unintended side effects if you are 772 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 773 * Read 774 * [Overview of Queue Management and 775 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 776 * this method. 777 * </pre> 778 */ createQueue( com.google.cloud.tasks.v2.CreateQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)779 default void createQueue( 780 com.google.cloud.tasks.v2.CreateQueueRequest request, 781 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 782 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 783 getCreateQueueMethod(), responseObserver); 784 } 785 786 /** 787 * 788 * 789 * <pre> 790 * Updates a queue. 791 * This method creates the queue if it does not exist and updates 792 * the queue if it does exist. 793 * Queues created with this method allow tasks to live for a maximum of 31 794 * days. After a task is 31 days old, the task will be deleted regardless of whether 795 * it was dispatched or not. 796 * WARNING: Using this method may have unintended side effects if you are 797 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 798 * Read 799 * [Overview of Queue Management and 800 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 801 * this method. 802 * </pre> 803 */ updateQueue( com.google.cloud.tasks.v2.UpdateQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)804 default void updateQueue( 805 com.google.cloud.tasks.v2.UpdateQueueRequest request, 806 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 807 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 808 getUpdateQueueMethod(), responseObserver); 809 } 810 811 /** 812 * 813 * 814 * <pre> 815 * Deletes a queue. 816 * This command will delete the queue even if it has tasks in it. 817 * Note: If you delete a queue, a queue with the same name can't be created 818 * for 7 days. 819 * WARNING: Using this method may have unintended side effects if you are 820 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 821 * Read 822 * [Overview of Queue Management and 823 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 824 * this method. 825 * </pre> 826 */ deleteQueue( com.google.cloud.tasks.v2.DeleteQueueRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)827 default void deleteQueue( 828 com.google.cloud.tasks.v2.DeleteQueueRequest request, 829 io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { 830 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 831 getDeleteQueueMethod(), responseObserver); 832 } 833 834 /** 835 * 836 * 837 * <pre> 838 * Purges a queue by deleting all of its tasks. 839 * All tasks created before this method is called are permanently deleted. 840 * Purge operations can take up to one minute to take effect. Tasks 841 * might be dispatched before the purge takes effect. A purge is irreversible. 842 * </pre> 843 */ purgeQueue( com.google.cloud.tasks.v2.PurgeQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)844 default void purgeQueue( 845 com.google.cloud.tasks.v2.PurgeQueueRequest request, 846 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 847 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPurgeQueueMethod(), responseObserver); 848 } 849 850 /** 851 * 852 * 853 * <pre> 854 * Pauses the queue. 855 * If a queue is paused then the system will stop dispatching tasks 856 * until the queue is resumed via 857 * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added 858 * when the queue is paused. A queue is paused if its 859 * [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. 860 * </pre> 861 */ pauseQueue( com.google.cloud.tasks.v2.PauseQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)862 default void pauseQueue( 863 com.google.cloud.tasks.v2.PauseQueueRequest request, 864 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 865 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPauseQueueMethod(), responseObserver); 866 } 867 868 /** 869 * 870 * 871 * <pre> 872 * Resume a queue. 873 * This method resumes a queue after it has been 874 * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or 875 * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored 876 * in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it 877 * will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. 878 * WARNING: Resuming many high-QPS queues at the same time can 879 * lead to target overloading. If you are resuming high-QPS 880 * queues, follow the 500/50/5 pattern described in 881 * [Managing Cloud Tasks Scaling 882 * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). 883 * </pre> 884 */ resumeQueue( com.google.cloud.tasks.v2.ResumeQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)885 default void resumeQueue( 886 com.google.cloud.tasks.v2.ResumeQueueRequest request, 887 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 888 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 889 getResumeQueueMethod(), responseObserver); 890 } 891 892 /** 893 * 894 * 895 * <pre> 896 * Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. 897 * Returns an empty policy if the resource exists and does not have a policy 898 * set. 899 * Authorization requires the following 900 * [Google IAM](https://cloud.google.com/iam) permission on the specified 901 * resource parent: 902 * * `cloudtasks.queues.getIamPolicy` 903 * </pre> 904 */ getIamPolicy( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)905 default void getIamPolicy( 906 com.google.iam.v1.GetIamPolicyRequest request, 907 io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { 908 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 909 getGetIamPolicyMethod(), responseObserver); 910 } 911 912 /** 913 * 914 * 915 * <pre> 916 * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing 917 * policy. 918 * Note: The Cloud Console does not check queue-level IAM permissions yet. 919 * Project-level permissions are required to use the Cloud Console. 920 * Authorization requires the following 921 * [Google IAM](https://cloud.google.com/iam) permission on the specified 922 * resource parent: 923 * * `cloudtasks.queues.setIamPolicy` 924 * </pre> 925 */ setIamPolicy( com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)926 default void setIamPolicy( 927 com.google.iam.v1.SetIamPolicyRequest request, 928 io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { 929 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 930 getSetIamPolicyMethod(), responseObserver); 931 } 932 933 /** 934 * 935 * 936 * <pre> 937 * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue]. 938 * If the resource does not exist, this will return an empty set of 939 * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. 940 * Note: This operation is designed to be used for building permission-aware 941 * UIs and command-line tools, not for authorization checking. This operation 942 * may "fail open" without warning. 943 * </pre> 944 */ testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver)945 default void testIamPermissions( 946 com.google.iam.v1.TestIamPermissionsRequest request, 947 io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> 948 responseObserver) { 949 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 950 getTestIamPermissionsMethod(), responseObserver); 951 } 952 953 /** 954 * 955 * 956 * <pre> 957 * Lists the tasks in a queue. 958 * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved 959 * due to performance considerations; 960 * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the 961 * subset of information which is returned. 962 * The tasks may be returned in any order. The ordering may change at any 963 * time. 964 * </pre> 965 */ listTasks( com.google.cloud.tasks.v2.ListTasksRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListTasksResponse> responseObserver)966 default void listTasks( 967 com.google.cloud.tasks.v2.ListTasksRequest request, 968 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListTasksResponse> responseObserver) { 969 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTasksMethod(), responseObserver); 970 } 971 972 /** 973 * 974 * 975 * <pre> 976 * Gets a task. 977 * </pre> 978 */ getTask( com.google.cloud.tasks.v2.GetTaskRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver)979 default void getTask( 980 com.google.cloud.tasks.v2.GetTaskRequest request, 981 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver) { 982 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTaskMethod(), responseObserver); 983 } 984 985 /** 986 * 987 * 988 * <pre> 989 * Creates a task and adds it to a queue. 990 * Tasks cannot be updated after creation; there is no UpdateTask command. 991 * * The maximum task size is 100KB. 992 * </pre> 993 */ createTask( com.google.cloud.tasks.v2.CreateTaskRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver)994 default void createTask( 995 com.google.cloud.tasks.v2.CreateTaskRequest request, 996 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver) { 997 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateTaskMethod(), responseObserver); 998 } 999 1000 /** 1001 * 1002 * 1003 * <pre> 1004 * Deletes a task. 1005 * A task can be deleted if it is scheduled or dispatched. A task 1006 * cannot be deleted if it has executed successfully or permanently 1007 * failed. 1008 * </pre> 1009 */ deleteTask( com.google.cloud.tasks.v2.DeleteTaskRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)1010 default void deleteTask( 1011 com.google.cloud.tasks.v2.DeleteTaskRequest request, 1012 io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { 1013 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteTaskMethod(), responseObserver); 1014 } 1015 1016 /** 1017 * 1018 * 1019 * <pre> 1020 * Forces a task to run now. 1021 * When this method is called, Cloud Tasks will dispatch the task, even if 1022 * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or 1023 * is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. 1024 * This command is meant to be used for manual debugging. For 1025 * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed 1026 * task after a fix has been made or to manually force a task to be 1027 * dispatched now. 1028 * The dispatched task is returned. That is, the task that is returned 1029 * contains the [status][Task.status] after the task is dispatched but 1030 * before the task is received by its target. 1031 * If Cloud Tasks receives a successful response from the task's 1032 * target, then the task will be deleted; otherwise the task's 1033 * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that 1034 * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified 1035 * in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig]. 1036 * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns 1037 * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a 1038 * task that has already succeeded or permanently failed. 1039 * </pre> 1040 */ runTask( com.google.cloud.tasks.v2.RunTaskRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver)1041 default void runTask( 1042 com.google.cloud.tasks.v2.RunTaskRequest request, 1043 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver) { 1044 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRunTaskMethod(), responseObserver); 1045 } 1046 } 1047 1048 /** 1049 * Base class for the server implementation of the service CloudTasks. 1050 * 1051 * <pre> 1052 * Cloud Tasks allows developers to manage the execution of background 1053 * work in their applications. 1054 * </pre> 1055 */ 1056 public abstract static class CloudTasksImplBase implements io.grpc.BindableService, AsyncService { 1057 1058 @java.lang.Override bindService()1059 public final io.grpc.ServerServiceDefinition bindService() { 1060 return CloudTasksGrpc.bindService(this); 1061 } 1062 } 1063 1064 /** 1065 * A stub to allow clients to do asynchronous rpc calls to service CloudTasks. 1066 * 1067 * <pre> 1068 * Cloud Tasks allows developers to manage the execution of background 1069 * work in their applications. 1070 * </pre> 1071 */ 1072 public static final class CloudTasksStub extends io.grpc.stub.AbstractAsyncStub<CloudTasksStub> { CloudTasksStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1073 private CloudTasksStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1074 super(channel, callOptions); 1075 } 1076 1077 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1078 protected CloudTasksStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1079 return new CloudTasksStub(channel, callOptions); 1080 } 1081 1082 /** 1083 * 1084 * 1085 * <pre> 1086 * Lists queues. 1087 * Queues are returned in lexicographical order. 1088 * </pre> 1089 */ listQueues( com.google.cloud.tasks.v2.ListQueuesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListQueuesResponse> responseObserver)1090 public void listQueues( 1091 com.google.cloud.tasks.v2.ListQueuesRequest request, 1092 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListQueuesResponse> 1093 responseObserver) { 1094 io.grpc.stub.ClientCalls.asyncUnaryCall( 1095 getChannel().newCall(getListQueuesMethod(), getCallOptions()), request, responseObserver); 1096 } 1097 1098 /** 1099 * 1100 * 1101 * <pre> 1102 * Gets a queue. 1103 * </pre> 1104 */ getQueue( com.google.cloud.tasks.v2.GetQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)1105 public void getQueue( 1106 com.google.cloud.tasks.v2.GetQueueRequest request, 1107 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 1108 io.grpc.stub.ClientCalls.asyncUnaryCall( 1109 getChannel().newCall(getGetQueueMethod(), getCallOptions()), request, responseObserver); 1110 } 1111 1112 /** 1113 * 1114 * 1115 * <pre> 1116 * Creates a queue. 1117 * Queues created with this method allow tasks to live for a maximum of 31 1118 * days. After a task is 31 days old, the task will be deleted regardless of whether 1119 * it was dispatched or not. 1120 * WARNING: Using this method may have unintended side effects if you are 1121 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 1122 * Read 1123 * [Overview of Queue Management and 1124 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 1125 * this method. 1126 * </pre> 1127 */ createQueue( com.google.cloud.tasks.v2.CreateQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)1128 public void createQueue( 1129 com.google.cloud.tasks.v2.CreateQueueRequest request, 1130 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 1131 io.grpc.stub.ClientCalls.asyncUnaryCall( 1132 getChannel().newCall(getCreateQueueMethod(), getCallOptions()), 1133 request, 1134 responseObserver); 1135 } 1136 1137 /** 1138 * 1139 * 1140 * <pre> 1141 * Updates a queue. 1142 * This method creates the queue if it does not exist and updates 1143 * the queue if it does exist. 1144 * Queues created with this method allow tasks to live for a maximum of 31 1145 * days. After a task is 31 days old, the task will be deleted regardless of whether 1146 * it was dispatched or not. 1147 * WARNING: Using this method may have unintended side effects if you are 1148 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 1149 * Read 1150 * [Overview of Queue Management and 1151 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 1152 * this method. 1153 * </pre> 1154 */ updateQueue( com.google.cloud.tasks.v2.UpdateQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)1155 public void updateQueue( 1156 com.google.cloud.tasks.v2.UpdateQueueRequest request, 1157 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 1158 io.grpc.stub.ClientCalls.asyncUnaryCall( 1159 getChannel().newCall(getUpdateQueueMethod(), getCallOptions()), 1160 request, 1161 responseObserver); 1162 } 1163 1164 /** 1165 * 1166 * 1167 * <pre> 1168 * Deletes a queue. 1169 * This command will delete the queue even if it has tasks in it. 1170 * Note: If you delete a queue, a queue with the same name can't be created 1171 * for 7 days. 1172 * WARNING: Using this method may have unintended side effects if you are 1173 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 1174 * Read 1175 * [Overview of Queue Management and 1176 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 1177 * this method. 1178 * </pre> 1179 */ deleteQueue( com.google.cloud.tasks.v2.DeleteQueueRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)1180 public void deleteQueue( 1181 com.google.cloud.tasks.v2.DeleteQueueRequest request, 1182 io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { 1183 io.grpc.stub.ClientCalls.asyncUnaryCall( 1184 getChannel().newCall(getDeleteQueueMethod(), getCallOptions()), 1185 request, 1186 responseObserver); 1187 } 1188 1189 /** 1190 * 1191 * 1192 * <pre> 1193 * Purges a queue by deleting all of its tasks. 1194 * All tasks created before this method is called are permanently deleted. 1195 * Purge operations can take up to one minute to take effect. Tasks 1196 * might be dispatched before the purge takes effect. A purge is irreversible. 1197 * </pre> 1198 */ purgeQueue( com.google.cloud.tasks.v2.PurgeQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)1199 public void purgeQueue( 1200 com.google.cloud.tasks.v2.PurgeQueueRequest request, 1201 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 1202 io.grpc.stub.ClientCalls.asyncUnaryCall( 1203 getChannel().newCall(getPurgeQueueMethod(), getCallOptions()), request, responseObserver); 1204 } 1205 1206 /** 1207 * 1208 * 1209 * <pre> 1210 * Pauses the queue. 1211 * If a queue is paused then the system will stop dispatching tasks 1212 * until the queue is resumed via 1213 * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added 1214 * when the queue is paused. A queue is paused if its 1215 * [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. 1216 * </pre> 1217 */ pauseQueue( com.google.cloud.tasks.v2.PauseQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)1218 public void pauseQueue( 1219 com.google.cloud.tasks.v2.PauseQueueRequest request, 1220 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 1221 io.grpc.stub.ClientCalls.asyncUnaryCall( 1222 getChannel().newCall(getPauseQueueMethod(), getCallOptions()), request, responseObserver); 1223 } 1224 1225 /** 1226 * 1227 * 1228 * <pre> 1229 * Resume a queue. 1230 * This method resumes a queue after it has been 1231 * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or 1232 * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored 1233 * in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it 1234 * will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. 1235 * WARNING: Resuming many high-QPS queues at the same time can 1236 * lead to target overloading. If you are resuming high-QPS 1237 * queues, follow the 500/50/5 pattern described in 1238 * [Managing Cloud Tasks Scaling 1239 * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). 1240 * </pre> 1241 */ resumeQueue( com.google.cloud.tasks.v2.ResumeQueueRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver)1242 public void resumeQueue( 1243 com.google.cloud.tasks.v2.ResumeQueueRequest request, 1244 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue> responseObserver) { 1245 io.grpc.stub.ClientCalls.asyncUnaryCall( 1246 getChannel().newCall(getResumeQueueMethod(), getCallOptions()), 1247 request, 1248 responseObserver); 1249 } 1250 1251 /** 1252 * 1253 * 1254 * <pre> 1255 * Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. 1256 * Returns an empty policy if the resource exists and does not have a policy 1257 * set. 1258 * Authorization requires the following 1259 * [Google IAM](https://cloud.google.com/iam) permission on the specified 1260 * resource parent: 1261 * * `cloudtasks.queues.getIamPolicy` 1262 * </pre> 1263 */ getIamPolicy( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)1264 public void getIamPolicy( 1265 com.google.iam.v1.GetIamPolicyRequest request, 1266 io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { 1267 io.grpc.stub.ClientCalls.asyncUnaryCall( 1268 getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), 1269 request, 1270 responseObserver); 1271 } 1272 1273 /** 1274 * 1275 * 1276 * <pre> 1277 * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing 1278 * policy. 1279 * Note: The Cloud Console does not check queue-level IAM permissions yet. 1280 * Project-level permissions are required to use the Cloud Console. 1281 * Authorization requires the following 1282 * [Google IAM](https://cloud.google.com/iam) permission on the specified 1283 * resource parent: 1284 * * `cloudtasks.queues.setIamPolicy` 1285 * </pre> 1286 */ setIamPolicy( com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)1287 public void setIamPolicy( 1288 com.google.iam.v1.SetIamPolicyRequest request, 1289 io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { 1290 io.grpc.stub.ClientCalls.asyncUnaryCall( 1291 getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), 1292 request, 1293 responseObserver); 1294 } 1295 1296 /** 1297 * 1298 * 1299 * <pre> 1300 * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue]. 1301 * If the resource does not exist, this will return an empty set of 1302 * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. 1303 * Note: This operation is designed to be used for building permission-aware 1304 * UIs and command-line tools, not for authorization checking. This operation 1305 * may "fail open" without warning. 1306 * </pre> 1307 */ testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver)1308 public void testIamPermissions( 1309 com.google.iam.v1.TestIamPermissionsRequest request, 1310 io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> 1311 responseObserver) { 1312 io.grpc.stub.ClientCalls.asyncUnaryCall( 1313 getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), 1314 request, 1315 responseObserver); 1316 } 1317 1318 /** 1319 * 1320 * 1321 * <pre> 1322 * Lists the tasks in a queue. 1323 * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved 1324 * due to performance considerations; 1325 * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the 1326 * subset of information which is returned. 1327 * The tasks may be returned in any order. The ordering may change at any 1328 * time. 1329 * </pre> 1330 */ listTasks( com.google.cloud.tasks.v2.ListTasksRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListTasksResponse> responseObserver)1331 public void listTasks( 1332 com.google.cloud.tasks.v2.ListTasksRequest request, 1333 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListTasksResponse> responseObserver) { 1334 io.grpc.stub.ClientCalls.asyncUnaryCall( 1335 getChannel().newCall(getListTasksMethod(), getCallOptions()), request, responseObserver); 1336 } 1337 1338 /** 1339 * 1340 * 1341 * <pre> 1342 * Gets a task. 1343 * </pre> 1344 */ getTask( com.google.cloud.tasks.v2.GetTaskRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver)1345 public void getTask( 1346 com.google.cloud.tasks.v2.GetTaskRequest request, 1347 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver) { 1348 io.grpc.stub.ClientCalls.asyncUnaryCall( 1349 getChannel().newCall(getGetTaskMethod(), getCallOptions()), request, responseObserver); 1350 } 1351 1352 /** 1353 * 1354 * 1355 * <pre> 1356 * Creates a task and adds it to a queue. 1357 * Tasks cannot be updated after creation; there is no UpdateTask command. 1358 * * The maximum task size is 100KB. 1359 * </pre> 1360 */ createTask( com.google.cloud.tasks.v2.CreateTaskRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver)1361 public void createTask( 1362 com.google.cloud.tasks.v2.CreateTaskRequest request, 1363 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver) { 1364 io.grpc.stub.ClientCalls.asyncUnaryCall( 1365 getChannel().newCall(getCreateTaskMethod(), getCallOptions()), request, responseObserver); 1366 } 1367 1368 /** 1369 * 1370 * 1371 * <pre> 1372 * Deletes a task. 1373 * A task can be deleted if it is scheduled or dispatched. A task 1374 * cannot be deleted if it has executed successfully or permanently 1375 * failed. 1376 * </pre> 1377 */ deleteTask( com.google.cloud.tasks.v2.DeleteTaskRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)1378 public void deleteTask( 1379 com.google.cloud.tasks.v2.DeleteTaskRequest request, 1380 io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { 1381 io.grpc.stub.ClientCalls.asyncUnaryCall( 1382 getChannel().newCall(getDeleteTaskMethod(), getCallOptions()), request, responseObserver); 1383 } 1384 1385 /** 1386 * 1387 * 1388 * <pre> 1389 * Forces a task to run now. 1390 * When this method is called, Cloud Tasks will dispatch the task, even if 1391 * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or 1392 * is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. 1393 * This command is meant to be used for manual debugging. For 1394 * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed 1395 * task after a fix has been made or to manually force a task to be 1396 * dispatched now. 1397 * The dispatched task is returned. That is, the task that is returned 1398 * contains the [status][Task.status] after the task is dispatched but 1399 * before the task is received by its target. 1400 * If Cloud Tasks receives a successful response from the task's 1401 * target, then the task will be deleted; otherwise the task's 1402 * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that 1403 * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified 1404 * in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig]. 1405 * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns 1406 * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a 1407 * task that has already succeeded or permanently failed. 1408 * </pre> 1409 */ runTask( com.google.cloud.tasks.v2.RunTaskRequest request, io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver)1410 public void runTask( 1411 com.google.cloud.tasks.v2.RunTaskRequest request, 1412 io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task> responseObserver) { 1413 io.grpc.stub.ClientCalls.asyncUnaryCall( 1414 getChannel().newCall(getRunTaskMethod(), getCallOptions()), request, responseObserver); 1415 } 1416 } 1417 1418 /** 1419 * A stub to allow clients to do synchronous rpc calls to service CloudTasks. 1420 * 1421 * <pre> 1422 * Cloud Tasks allows developers to manage the execution of background 1423 * work in their applications. 1424 * </pre> 1425 */ 1426 public static final class CloudTasksBlockingStub 1427 extends io.grpc.stub.AbstractBlockingStub<CloudTasksBlockingStub> { CloudTasksBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1428 private CloudTasksBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1429 super(channel, callOptions); 1430 } 1431 1432 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)1433 protected CloudTasksBlockingStub build( 1434 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1435 return new CloudTasksBlockingStub(channel, callOptions); 1436 } 1437 1438 /** 1439 * 1440 * 1441 * <pre> 1442 * Lists queues. 1443 * Queues are returned in lexicographical order. 1444 * </pre> 1445 */ listQueues( com.google.cloud.tasks.v2.ListQueuesRequest request)1446 public com.google.cloud.tasks.v2.ListQueuesResponse listQueues( 1447 com.google.cloud.tasks.v2.ListQueuesRequest request) { 1448 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1449 getChannel(), getListQueuesMethod(), getCallOptions(), request); 1450 } 1451 1452 /** 1453 * 1454 * 1455 * <pre> 1456 * Gets a queue. 1457 * </pre> 1458 */ getQueue( com.google.cloud.tasks.v2.GetQueueRequest request)1459 public com.google.cloud.tasks.v2.Queue getQueue( 1460 com.google.cloud.tasks.v2.GetQueueRequest request) { 1461 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1462 getChannel(), getGetQueueMethod(), getCallOptions(), request); 1463 } 1464 1465 /** 1466 * 1467 * 1468 * <pre> 1469 * Creates a queue. 1470 * Queues created with this method allow tasks to live for a maximum of 31 1471 * days. After a task is 31 days old, the task will be deleted regardless of whether 1472 * it was dispatched or not. 1473 * WARNING: Using this method may have unintended side effects if you are 1474 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 1475 * Read 1476 * [Overview of Queue Management and 1477 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 1478 * this method. 1479 * </pre> 1480 */ createQueue( com.google.cloud.tasks.v2.CreateQueueRequest request)1481 public com.google.cloud.tasks.v2.Queue createQueue( 1482 com.google.cloud.tasks.v2.CreateQueueRequest request) { 1483 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1484 getChannel(), getCreateQueueMethod(), getCallOptions(), request); 1485 } 1486 1487 /** 1488 * 1489 * 1490 * <pre> 1491 * Updates a queue. 1492 * This method creates the queue if it does not exist and updates 1493 * the queue if it does exist. 1494 * Queues created with this method allow tasks to live for a maximum of 31 1495 * days. After a task is 31 days old, the task will be deleted regardless of whether 1496 * it was dispatched or not. 1497 * WARNING: Using this method may have unintended side effects if you are 1498 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 1499 * Read 1500 * [Overview of Queue Management and 1501 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 1502 * this method. 1503 * </pre> 1504 */ updateQueue( com.google.cloud.tasks.v2.UpdateQueueRequest request)1505 public com.google.cloud.tasks.v2.Queue updateQueue( 1506 com.google.cloud.tasks.v2.UpdateQueueRequest request) { 1507 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1508 getChannel(), getUpdateQueueMethod(), getCallOptions(), request); 1509 } 1510 1511 /** 1512 * 1513 * 1514 * <pre> 1515 * Deletes a queue. 1516 * This command will delete the queue even if it has tasks in it. 1517 * Note: If you delete a queue, a queue with the same name can't be created 1518 * for 7 days. 1519 * WARNING: Using this method may have unintended side effects if you are 1520 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 1521 * Read 1522 * [Overview of Queue Management and 1523 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 1524 * this method. 1525 * </pre> 1526 */ deleteQueue( com.google.cloud.tasks.v2.DeleteQueueRequest request)1527 public com.google.protobuf.Empty deleteQueue( 1528 com.google.cloud.tasks.v2.DeleteQueueRequest request) { 1529 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1530 getChannel(), getDeleteQueueMethod(), getCallOptions(), request); 1531 } 1532 1533 /** 1534 * 1535 * 1536 * <pre> 1537 * Purges a queue by deleting all of its tasks. 1538 * All tasks created before this method is called are permanently deleted. 1539 * Purge operations can take up to one minute to take effect. Tasks 1540 * might be dispatched before the purge takes effect. A purge is irreversible. 1541 * </pre> 1542 */ purgeQueue( com.google.cloud.tasks.v2.PurgeQueueRequest request)1543 public com.google.cloud.tasks.v2.Queue purgeQueue( 1544 com.google.cloud.tasks.v2.PurgeQueueRequest request) { 1545 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1546 getChannel(), getPurgeQueueMethod(), getCallOptions(), request); 1547 } 1548 1549 /** 1550 * 1551 * 1552 * <pre> 1553 * Pauses the queue. 1554 * If a queue is paused then the system will stop dispatching tasks 1555 * until the queue is resumed via 1556 * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added 1557 * when the queue is paused. A queue is paused if its 1558 * [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. 1559 * </pre> 1560 */ pauseQueue( com.google.cloud.tasks.v2.PauseQueueRequest request)1561 public com.google.cloud.tasks.v2.Queue pauseQueue( 1562 com.google.cloud.tasks.v2.PauseQueueRequest request) { 1563 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1564 getChannel(), getPauseQueueMethod(), getCallOptions(), request); 1565 } 1566 1567 /** 1568 * 1569 * 1570 * <pre> 1571 * Resume a queue. 1572 * This method resumes a queue after it has been 1573 * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or 1574 * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored 1575 * in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it 1576 * will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. 1577 * WARNING: Resuming many high-QPS queues at the same time can 1578 * lead to target overloading. If you are resuming high-QPS 1579 * queues, follow the 500/50/5 pattern described in 1580 * [Managing Cloud Tasks Scaling 1581 * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). 1582 * </pre> 1583 */ resumeQueue( com.google.cloud.tasks.v2.ResumeQueueRequest request)1584 public com.google.cloud.tasks.v2.Queue resumeQueue( 1585 com.google.cloud.tasks.v2.ResumeQueueRequest request) { 1586 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1587 getChannel(), getResumeQueueMethod(), getCallOptions(), request); 1588 } 1589 1590 /** 1591 * 1592 * 1593 * <pre> 1594 * Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. 1595 * Returns an empty policy if the resource exists and does not have a policy 1596 * set. 1597 * Authorization requires the following 1598 * [Google IAM](https://cloud.google.com/iam) permission on the specified 1599 * resource parent: 1600 * * `cloudtasks.queues.getIamPolicy` 1601 * </pre> 1602 */ getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)1603 public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { 1604 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1605 getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); 1606 } 1607 1608 /** 1609 * 1610 * 1611 * <pre> 1612 * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing 1613 * policy. 1614 * Note: The Cloud Console does not check queue-level IAM permissions yet. 1615 * Project-level permissions are required to use the Cloud Console. 1616 * Authorization requires the following 1617 * [Google IAM](https://cloud.google.com/iam) permission on the specified 1618 * resource parent: 1619 * * `cloudtasks.queues.setIamPolicy` 1620 * </pre> 1621 */ setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)1622 public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { 1623 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1624 getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); 1625 } 1626 1627 /** 1628 * 1629 * 1630 * <pre> 1631 * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue]. 1632 * If the resource does not exist, this will return an empty set of 1633 * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. 1634 * Note: This operation is designed to be used for building permission-aware 1635 * UIs and command-line tools, not for authorization checking. This operation 1636 * may "fail open" without warning. 1637 * </pre> 1638 */ testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request)1639 public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( 1640 com.google.iam.v1.TestIamPermissionsRequest request) { 1641 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1642 getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); 1643 } 1644 1645 /** 1646 * 1647 * 1648 * <pre> 1649 * Lists the tasks in a queue. 1650 * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved 1651 * due to performance considerations; 1652 * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the 1653 * subset of information which is returned. 1654 * The tasks may be returned in any order. The ordering may change at any 1655 * time. 1656 * </pre> 1657 */ listTasks( com.google.cloud.tasks.v2.ListTasksRequest request)1658 public com.google.cloud.tasks.v2.ListTasksResponse listTasks( 1659 com.google.cloud.tasks.v2.ListTasksRequest request) { 1660 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1661 getChannel(), getListTasksMethod(), getCallOptions(), request); 1662 } 1663 1664 /** 1665 * 1666 * 1667 * <pre> 1668 * Gets a task. 1669 * </pre> 1670 */ getTask( com.google.cloud.tasks.v2.GetTaskRequest request)1671 public com.google.cloud.tasks.v2.Task getTask( 1672 com.google.cloud.tasks.v2.GetTaskRequest request) { 1673 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1674 getChannel(), getGetTaskMethod(), getCallOptions(), request); 1675 } 1676 1677 /** 1678 * 1679 * 1680 * <pre> 1681 * Creates a task and adds it to a queue. 1682 * Tasks cannot be updated after creation; there is no UpdateTask command. 1683 * * The maximum task size is 100KB. 1684 * </pre> 1685 */ createTask( com.google.cloud.tasks.v2.CreateTaskRequest request)1686 public com.google.cloud.tasks.v2.Task createTask( 1687 com.google.cloud.tasks.v2.CreateTaskRequest request) { 1688 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1689 getChannel(), getCreateTaskMethod(), getCallOptions(), request); 1690 } 1691 1692 /** 1693 * 1694 * 1695 * <pre> 1696 * Deletes a task. 1697 * A task can be deleted if it is scheduled or dispatched. A task 1698 * cannot be deleted if it has executed successfully or permanently 1699 * failed. 1700 * </pre> 1701 */ deleteTask( com.google.cloud.tasks.v2.DeleteTaskRequest request)1702 public com.google.protobuf.Empty deleteTask( 1703 com.google.cloud.tasks.v2.DeleteTaskRequest request) { 1704 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1705 getChannel(), getDeleteTaskMethod(), getCallOptions(), request); 1706 } 1707 1708 /** 1709 * 1710 * 1711 * <pre> 1712 * Forces a task to run now. 1713 * When this method is called, Cloud Tasks will dispatch the task, even if 1714 * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or 1715 * is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. 1716 * This command is meant to be used for manual debugging. For 1717 * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed 1718 * task after a fix has been made or to manually force a task to be 1719 * dispatched now. 1720 * The dispatched task is returned. That is, the task that is returned 1721 * contains the [status][Task.status] after the task is dispatched but 1722 * before the task is received by its target. 1723 * If Cloud Tasks receives a successful response from the task's 1724 * target, then the task will be deleted; otherwise the task's 1725 * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that 1726 * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified 1727 * in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig]. 1728 * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns 1729 * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a 1730 * task that has already succeeded or permanently failed. 1731 * </pre> 1732 */ runTask( com.google.cloud.tasks.v2.RunTaskRequest request)1733 public com.google.cloud.tasks.v2.Task runTask( 1734 com.google.cloud.tasks.v2.RunTaskRequest request) { 1735 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1736 getChannel(), getRunTaskMethod(), getCallOptions(), request); 1737 } 1738 } 1739 1740 /** 1741 * A stub to allow clients to do ListenableFuture-style rpc calls to service CloudTasks. 1742 * 1743 * <pre> 1744 * Cloud Tasks allows developers to manage the execution of background 1745 * work in their applications. 1746 * </pre> 1747 */ 1748 public static final class CloudTasksFutureStub 1749 extends io.grpc.stub.AbstractFutureStub<CloudTasksFutureStub> { CloudTasksFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1750 private CloudTasksFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1751 super(channel, callOptions); 1752 } 1753 1754 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1755 protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1756 return new CloudTasksFutureStub(channel, callOptions); 1757 } 1758 1759 /** 1760 * 1761 * 1762 * <pre> 1763 * Lists queues. 1764 * Queues are returned in lexicographical order. 1765 * </pre> 1766 */ 1767 public com.google.common.util.concurrent.ListenableFuture< 1768 com.google.cloud.tasks.v2.ListQueuesResponse> listQueues(com.google.cloud.tasks.v2.ListQueuesRequest request)1769 listQueues(com.google.cloud.tasks.v2.ListQueuesRequest request) { 1770 return io.grpc.stub.ClientCalls.futureUnaryCall( 1771 getChannel().newCall(getListQueuesMethod(), getCallOptions()), request); 1772 } 1773 1774 /** 1775 * 1776 * 1777 * <pre> 1778 * Gets a queue. 1779 * </pre> 1780 */ 1781 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tasks.v2.Queue> getQueue(com.google.cloud.tasks.v2.GetQueueRequest request)1782 getQueue(com.google.cloud.tasks.v2.GetQueueRequest request) { 1783 return io.grpc.stub.ClientCalls.futureUnaryCall( 1784 getChannel().newCall(getGetQueueMethod(), getCallOptions()), request); 1785 } 1786 1787 /** 1788 * 1789 * 1790 * <pre> 1791 * Creates a queue. 1792 * Queues created with this method allow tasks to live for a maximum of 31 1793 * days. After a task is 31 days old, the task will be deleted regardless of whether 1794 * it was dispatched or not. 1795 * WARNING: Using this method may have unintended side effects if you are 1796 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 1797 * Read 1798 * [Overview of Queue Management and 1799 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 1800 * this method. 1801 * </pre> 1802 */ 1803 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tasks.v2.Queue> createQueue(com.google.cloud.tasks.v2.CreateQueueRequest request)1804 createQueue(com.google.cloud.tasks.v2.CreateQueueRequest request) { 1805 return io.grpc.stub.ClientCalls.futureUnaryCall( 1806 getChannel().newCall(getCreateQueueMethod(), getCallOptions()), request); 1807 } 1808 1809 /** 1810 * 1811 * 1812 * <pre> 1813 * Updates a queue. 1814 * This method creates the queue if it does not exist and updates 1815 * the queue if it does exist. 1816 * Queues created with this method allow tasks to live for a maximum of 31 1817 * days. After a task is 31 days old, the task will be deleted regardless of whether 1818 * it was dispatched or not. 1819 * WARNING: Using this method may have unintended side effects if you are 1820 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 1821 * Read 1822 * [Overview of Queue Management and 1823 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 1824 * this method. 1825 * </pre> 1826 */ 1827 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tasks.v2.Queue> updateQueue(com.google.cloud.tasks.v2.UpdateQueueRequest request)1828 updateQueue(com.google.cloud.tasks.v2.UpdateQueueRequest request) { 1829 return io.grpc.stub.ClientCalls.futureUnaryCall( 1830 getChannel().newCall(getUpdateQueueMethod(), getCallOptions()), request); 1831 } 1832 1833 /** 1834 * 1835 * 1836 * <pre> 1837 * Deletes a queue. 1838 * This command will delete the queue even if it has tasks in it. 1839 * Note: If you delete a queue, a queue with the same name can't be created 1840 * for 7 days. 1841 * WARNING: Using this method may have unintended side effects if you are 1842 * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. 1843 * Read 1844 * [Overview of Queue Management and 1845 * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using 1846 * this method. 1847 * </pre> 1848 */ 1849 public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteQueue(com.google.cloud.tasks.v2.DeleteQueueRequest request)1850 deleteQueue(com.google.cloud.tasks.v2.DeleteQueueRequest request) { 1851 return io.grpc.stub.ClientCalls.futureUnaryCall( 1852 getChannel().newCall(getDeleteQueueMethod(), getCallOptions()), request); 1853 } 1854 1855 /** 1856 * 1857 * 1858 * <pre> 1859 * Purges a queue by deleting all of its tasks. 1860 * All tasks created before this method is called are permanently deleted. 1861 * Purge operations can take up to one minute to take effect. Tasks 1862 * might be dispatched before the purge takes effect. A purge is irreversible. 1863 * </pre> 1864 */ 1865 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tasks.v2.Queue> purgeQueue(com.google.cloud.tasks.v2.PurgeQueueRequest request)1866 purgeQueue(com.google.cloud.tasks.v2.PurgeQueueRequest request) { 1867 return io.grpc.stub.ClientCalls.futureUnaryCall( 1868 getChannel().newCall(getPurgeQueueMethod(), getCallOptions()), request); 1869 } 1870 1871 /** 1872 * 1873 * 1874 * <pre> 1875 * Pauses the queue. 1876 * If a queue is paused then the system will stop dispatching tasks 1877 * until the queue is resumed via 1878 * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added 1879 * when the queue is paused. A queue is paused if its 1880 * [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. 1881 * </pre> 1882 */ 1883 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tasks.v2.Queue> pauseQueue(com.google.cloud.tasks.v2.PauseQueueRequest request)1884 pauseQueue(com.google.cloud.tasks.v2.PauseQueueRequest request) { 1885 return io.grpc.stub.ClientCalls.futureUnaryCall( 1886 getChannel().newCall(getPauseQueueMethod(), getCallOptions()), request); 1887 } 1888 1889 /** 1890 * 1891 * 1892 * <pre> 1893 * Resume a queue. 1894 * This method resumes a queue after it has been 1895 * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or 1896 * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored 1897 * in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it 1898 * will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. 1899 * WARNING: Resuming many high-QPS queues at the same time can 1900 * lead to target overloading. If you are resuming high-QPS 1901 * queues, follow the 500/50/5 pattern described in 1902 * [Managing Cloud Tasks Scaling 1903 * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). 1904 * </pre> 1905 */ 1906 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tasks.v2.Queue> resumeQueue(com.google.cloud.tasks.v2.ResumeQueueRequest request)1907 resumeQueue(com.google.cloud.tasks.v2.ResumeQueueRequest request) { 1908 return io.grpc.stub.ClientCalls.futureUnaryCall( 1909 getChannel().newCall(getResumeQueueMethod(), getCallOptions()), request); 1910 } 1911 1912 /** 1913 * 1914 * 1915 * <pre> 1916 * Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. 1917 * Returns an empty policy if the resource exists and does not have a policy 1918 * set. 1919 * Authorization requires the following 1920 * [Google IAM](https://cloud.google.com/iam) permission on the specified 1921 * resource parent: 1922 * * `cloudtasks.queues.getIamPolicy` 1923 * </pre> 1924 */ 1925 public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy> getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)1926 getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { 1927 return io.grpc.stub.ClientCalls.futureUnaryCall( 1928 getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); 1929 } 1930 1931 /** 1932 * 1933 * 1934 * <pre> 1935 * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing 1936 * policy. 1937 * Note: The Cloud Console does not check queue-level IAM permissions yet. 1938 * Project-level permissions are required to use the Cloud Console. 1939 * Authorization requires the following 1940 * [Google IAM](https://cloud.google.com/iam) permission on the specified 1941 * resource parent: 1942 * * `cloudtasks.queues.setIamPolicy` 1943 * </pre> 1944 */ 1945 public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy> setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)1946 setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { 1947 return io.grpc.stub.ClientCalls.futureUnaryCall( 1948 getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); 1949 } 1950 1951 /** 1952 * 1953 * 1954 * <pre> 1955 * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue]. 1956 * If the resource does not exist, this will return an empty set of 1957 * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. 1958 * Note: This operation is designed to be used for building permission-aware 1959 * UIs and command-line tools, not for authorization checking. This operation 1960 * may "fail open" without warning. 1961 * </pre> 1962 */ 1963 public com.google.common.util.concurrent.ListenableFuture< 1964 com.google.iam.v1.TestIamPermissionsResponse> testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)1965 testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { 1966 return io.grpc.stub.ClientCalls.futureUnaryCall( 1967 getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); 1968 } 1969 1970 /** 1971 * 1972 * 1973 * <pre> 1974 * Lists the tasks in a queue. 1975 * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved 1976 * due to performance considerations; 1977 * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the 1978 * subset of information which is returned. 1979 * The tasks may be returned in any order. The ordering may change at any 1980 * time. 1981 * </pre> 1982 */ 1983 public com.google.common.util.concurrent.ListenableFuture< 1984 com.google.cloud.tasks.v2.ListTasksResponse> listTasks(com.google.cloud.tasks.v2.ListTasksRequest request)1985 listTasks(com.google.cloud.tasks.v2.ListTasksRequest request) { 1986 return io.grpc.stub.ClientCalls.futureUnaryCall( 1987 getChannel().newCall(getListTasksMethod(), getCallOptions()), request); 1988 } 1989 1990 /** 1991 * 1992 * 1993 * <pre> 1994 * Gets a task. 1995 * </pre> 1996 */ 1997 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tasks.v2.Task> getTask(com.google.cloud.tasks.v2.GetTaskRequest request)1998 getTask(com.google.cloud.tasks.v2.GetTaskRequest request) { 1999 return io.grpc.stub.ClientCalls.futureUnaryCall( 2000 getChannel().newCall(getGetTaskMethod(), getCallOptions()), request); 2001 } 2002 2003 /** 2004 * 2005 * 2006 * <pre> 2007 * Creates a task and adds it to a queue. 2008 * Tasks cannot be updated after creation; there is no UpdateTask command. 2009 * * The maximum task size is 100KB. 2010 * </pre> 2011 */ 2012 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tasks.v2.Task> createTask(com.google.cloud.tasks.v2.CreateTaskRequest request)2013 createTask(com.google.cloud.tasks.v2.CreateTaskRequest request) { 2014 return io.grpc.stub.ClientCalls.futureUnaryCall( 2015 getChannel().newCall(getCreateTaskMethod(), getCallOptions()), request); 2016 } 2017 2018 /** 2019 * 2020 * 2021 * <pre> 2022 * Deletes a task. 2023 * A task can be deleted if it is scheduled or dispatched. A task 2024 * cannot be deleted if it has executed successfully or permanently 2025 * failed. 2026 * </pre> 2027 */ deleteTask( com.google.cloud.tasks.v2.DeleteTaskRequest request)2028 public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteTask( 2029 com.google.cloud.tasks.v2.DeleteTaskRequest request) { 2030 return io.grpc.stub.ClientCalls.futureUnaryCall( 2031 getChannel().newCall(getDeleteTaskMethod(), getCallOptions()), request); 2032 } 2033 2034 /** 2035 * 2036 * 2037 * <pre> 2038 * Forces a task to run now. 2039 * When this method is called, Cloud Tasks will dispatch the task, even if 2040 * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or 2041 * is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. 2042 * This command is meant to be used for manual debugging. For 2043 * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed 2044 * task after a fix has been made or to manually force a task to be 2045 * dispatched now. 2046 * The dispatched task is returned. That is, the task that is returned 2047 * contains the [status][Task.status] after the task is dispatched but 2048 * before the task is received by its target. 2049 * If Cloud Tasks receives a successful response from the task's 2050 * target, then the task will be deleted; otherwise the task's 2051 * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that 2052 * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified 2053 * in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig]. 2054 * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns 2055 * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a 2056 * task that has already succeeded or permanently failed. 2057 * </pre> 2058 */ 2059 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.tasks.v2.Task> runTask(com.google.cloud.tasks.v2.RunTaskRequest request)2060 runTask(com.google.cloud.tasks.v2.RunTaskRequest request) { 2061 return io.grpc.stub.ClientCalls.futureUnaryCall( 2062 getChannel().newCall(getRunTaskMethod(), getCallOptions()), request); 2063 } 2064 } 2065 2066 private static final int METHODID_LIST_QUEUES = 0; 2067 private static final int METHODID_GET_QUEUE = 1; 2068 private static final int METHODID_CREATE_QUEUE = 2; 2069 private static final int METHODID_UPDATE_QUEUE = 3; 2070 private static final int METHODID_DELETE_QUEUE = 4; 2071 private static final int METHODID_PURGE_QUEUE = 5; 2072 private static final int METHODID_PAUSE_QUEUE = 6; 2073 private static final int METHODID_RESUME_QUEUE = 7; 2074 private static final int METHODID_GET_IAM_POLICY = 8; 2075 private static final int METHODID_SET_IAM_POLICY = 9; 2076 private static final int METHODID_TEST_IAM_PERMISSIONS = 10; 2077 private static final int METHODID_LIST_TASKS = 11; 2078 private static final int METHODID_GET_TASK = 12; 2079 private static final int METHODID_CREATE_TASK = 13; 2080 private static final int METHODID_DELETE_TASK = 14; 2081 private static final int METHODID_RUN_TASK = 15; 2082 2083 private static final class MethodHandlers<Req, Resp> 2084 implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, 2085 io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, 2086 io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, 2087 io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { 2088 private final AsyncService serviceImpl; 2089 private final int methodId; 2090 MethodHandlers(AsyncService serviceImpl, int methodId)2091 MethodHandlers(AsyncService serviceImpl, int methodId) { 2092 this.serviceImpl = serviceImpl; 2093 this.methodId = methodId; 2094 } 2095 2096 @java.lang.Override 2097 @java.lang.SuppressWarnings("unchecked") invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)2098 public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { 2099 switch (methodId) { 2100 case METHODID_LIST_QUEUES: 2101 serviceImpl.listQueues( 2102 (com.google.cloud.tasks.v2.ListQueuesRequest) request, 2103 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListQueuesResponse>) 2104 responseObserver); 2105 break; 2106 case METHODID_GET_QUEUE: 2107 serviceImpl.getQueue( 2108 (com.google.cloud.tasks.v2.GetQueueRequest) request, 2109 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue>) responseObserver); 2110 break; 2111 case METHODID_CREATE_QUEUE: 2112 serviceImpl.createQueue( 2113 (com.google.cloud.tasks.v2.CreateQueueRequest) request, 2114 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue>) responseObserver); 2115 break; 2116 case METHODID_UPDATE_QUEUE: 2117 serviceImpl.updateQueue( 2118 (com.google.cloud.tasks.v2.UpdateQueueRequest) request, 2119 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue>) responseObserver); 2120 break; 2121 case METHODID_DELETE_QUEUE: 2122 serviceImpl.deleteQueue( 2123 (com.google.cloud.tasks.v2.DeleteQueueRequest) request, 2124 (io.grpc.stub.StreamObserver<com.google.protobuf.Empty>) responseObserver); 2125 break; 2126 case METHODID_PURGE_QUEUE: 2127 serviceImpl.purgeQueue( 2128 (com.google.cloud.tasks.v2.PurgeQueueRequest) request, 2129 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue>) responseObserver); 2130 break; 2131 case METHODID_PAUSE_QUEUE: 2132 serviceImpl.pauseQueue( 2133 (com.google.cloud.tasks.v2.PauseQueueRequest) request, 2134 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue>) responseObserver); 2135 break; 2136 case METHODID_RESUME_QUEUE: 2137 serviceImpl.resumeQueue( 2138 (com.google.cloud.tasks.v2.ResumeQueueRequest) request, 2139 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Queue>) responseObserver); 2140 break; 2141 case METHODID_GET_IAM_POLICY: 2142 serviceImpl.getIamPolicy( 2143 (com.google.iam.v1.GetIamPolicyRequest) request, 2144 (io.grpc.stub.StreamObserver<com.google.iam.v1.Policy>) responseObserver); 2145 break; 2146 case METHODID_SET_IAM_POLICY: 2147 serviceImpl.setIamPolicy( 2148 (com.google.iam.v1.SetIamPolicyRequest) request, 2149 (io.grpc.stub.StreamObserver<com.google.iam.v1.Policy>) responseObserver); 2150 break; 2151 case METHODID_TEST_IAM_PERMISSIONS: 2152 serviceImpl.testIamPermissions( 2153 (com.google.iam.v1.TestIamPermissionsRequest) request, 2154 (io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>) 2155 responseObserver); 2156 break; 2157 case METHODID_LIST_TASKS: 2158 serviceImpl.listTasks( 2159 (com.google.cloud.tasks.v2.ListTasksRequest) request, 2160 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.ListTasksResponse>) 2161 responseObserver); 2162 break; 2163 case METHODID_GET_TASK: 2164 serviceImpl.getTask( 2165 (com.google.cloud.tasks.v2.GetTaskRequest) request, 2166 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task>) responseObserver); 2167 break; 2168 case METHODID_CREATE_TASK: 2169 serviceImpl.createTask( 2170 (com.google.cloud.tasks.v2.CreateTaskRequest) request, 2171 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task>) responseObserver); 2172 break; 2173 case METHODID_DELETE_TASK: 2174 serviceImpl.deleteTask( 2175 (com.google.cloud.tasks.v2.DeleteTaskRequest) request, 2176 (io.grpc.stub.StreamObserver<com.google.protobuf.Empty>) responseObserver); 2177 break; 2178 case METHODID_RUN_TASK: 2179 serviceImpl.runTask( 2180 (com.google.cloud.tasks.v2.RunTaskRequest) request, 2181 (io.grpc.stub.StreamObserver<com.google.cloud.tasks.v2.Task>) responseObserver); 2182 break; 2183 default: 2184 throw new AssertionError(); 2185 } 2186 } 2187 2188 @java.lang.Override 2189 @java.lang.SuppressWarnings("unchecked") invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)2190 public io.grpc.stub.StreamObserver<Req> invoke( 2191 io.grpc.stub.StreamObserver<Resp> responseObserver) { 2192 switch (methodId) { 2193 default: 2194 throw new AssertionError(); 2195 } 2196 } 2197 } 2198 bindService(AsyncService service)2199 public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { 2200 return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) 2201 .addMethod( 2202 getListQueuesMethod(), 2203 io.grpc.stub.ServerCalls.asyncUnaryCall( 2204 new MethodHandlers< 2205 com.google.cloud.tasks.v2.ListQueuesRequest, 2206 com.google.cloud.tasks.v2.ListQueuesResponse>(service, METHODID_LIST_QUEUES))) 2207 .addMethod( 2208 getGetQueueMethod(), 2209 io.grpc.stub.ServerCalls.asyncUnaryCall( 2210 new MethodHandlers< 2211 com.google.cloud.tasks.v2.GetQueueRequest, com.google.cloud.tasks.v2.Queue>( 2212 service, METHODID_GET_QUEUE))) 2213 .addMethod( 2214 getCreateQueueMethod(), 2215 io.grpc.stub.ServerCalls.asyncUnaryCall( 2216 new MethodHandlers< 2217 com.google.cloud.tasks.v2.CreateQueueRequest, com.google.cloud.tasks.v2.Queue>( 2218 service, METHODID_CREATE_QUEUE))) 2219 .addMethod( 2220 getUpdateQueueMethod(), 2221 io.grpc.stub.ServerCalls.asyncUnaryCall( 2222 new MethodHandlers< 2223 com.google.cloud.tasks.v2.UpdateQueueRequest, com.google.cloud.tasks.v2.Queue>( 2224 service, METHODID_UPDATE_QUEUE))) 2225 .addMethod( 2226 getDeleteQueueMethod(), 2227 io.grpc.stub.ServerCalls.asyncUnaryCall( 2228 new MethodHandlers< 2229 com.google.cloud.tasks.v2.DeleteQueueRequest, com.google.protobuf.Empty>( 2230 service, METHODID_DELETE_QUEUE))) 2231 .addMethod( 2232 getPurgeQueueMethod(), 2233 io.grpc.stub.ServerCalls.asyncUnaryCall( 2234 new MethodHandlers< 2235 com.google.cloud.tasks.v2.PurgeQueueRequest, com.google.cloud.tasks.v2.Queue>( 2236 service, METHODID_PURGE_QUEUE))) 2237 .addMethod( 2238 getPauseQueueMethod(), 2239 io.grpc.stub.ServerCalls.asyncUnaryCall( 2240 new MethodHandlers< 2241 com.google.cloud.tasks.v2.PauseQueueRequest, com.google.cloud.tasks.v2.Queue>( 2242 service, METHODID_PAUSE_QUEUE))) 2243 .addMethod( 2244 getResumeQueueMethod(), 2245 io.grpc.stub.ServerCalls.asyncUnaryCall( 2246 new MethodHandlers< 2247 com.google.cloud.tasks.v2.ResumeQueueRequest, com.google.cloud.tasks.v2.Queue>( 2248 service, METHODID_RESUME_QUEUE))) 2249 .addMethod( 2250 getGetIamPolicyMethod(), 2251 io.grpc.stub.ServerCalls.asyncUnaryCall( 2252 new MethodHandlers<com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy>( 2253 service, METHODID_GET_IAM_POLICY))) 2254 .addMethod( 2255 getSetIamPolicyMethod(), 2256 io.grpc.stub.ServerCalls.asyncUnaryCall( 2257 new MethodHandlers<com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy>( 2258 service, METHODID_SET_IAM_POLICY))) 2259 .addMethod( 2260 getTestIamPermissionsMethod(), 2261 io.grpc.stub.ServerCalls.asyncUnaryCall( 2262 new MethodHandlers< 2263 com.google.iam.v1.TestIamPermissionsRequest, 2264 com.google.iam.v1.TestIamPermissionsResponse>( 2265 service, METHODID_TEST_IAM_PERMISSIONS))) 2266 .addMethod( 2267 getListTasksMethod(), 2268 io.grpc.stub.ServerCalls.asyncUnaryCall( 2269 new MethodHandlers< 2270 com.google.cloud.tasks.v2.ListTasksRequest, 2271 com.google.cloud.tasks.v2.ListTasksResponse>(service, METHODID_LIST_TASKS))) 2272 .addMethod( 2273 getGetTaskMethod(), 2274 io.grpc.stub.ServerCalls.asyncUnaryCall( 2275 new MethodHandlers< 2276 com.google.cloud.tasks.v2.GetTaskRequest, com.google.cloud.tasks.v2.Task>( 2277 service, METHODID_GET_TASK))) 2278 .addMethod( 2279 getCreateTaskMethod(), 2280 io.grpc.stub.ServerCalls.asyncUnaryCall( 2281 new MethodHandlers< 2282 com.google.cloud.tasks.v2.CreateTaskRequest, com.google.cloud.tasks.v2.Task>( 2283 service, METHODID_CREATE_TASK))) 2284 .addMethod( 2285 getDeleteTaskMethod(), 2286 io.grpc.stub.ServerCalls.asyncUnaryCall( 2287 new MethodHandlers< 2288 com.google.cloud.tasks.v2.DeleteTaskRequest, com.google.protobuf.Empty>( 2289 service, METHODID_DELETE_TASK))) 2290 .addMethod( 2291 getRunTaskMethod(), 2292 io.grpc.stub.ServerCalls.asyncUnaryCall( 2293 new MethodHandlers< 2294 com.google.cloud.tasks.v2.RunTaskRequest, com.google.cloud.tasks.v2.Task>( 2295 service, METHODID_RUN_TASK))) 2296 .build(); 2297 } 2298 2299 private abstract static class CloudTasksBaseDescriptorSupplier 2300 implements io.grpc.protobuf.ProtoFileDescriptorSupplier, 2301 io.grpc.protobuf.ProtoServiceDescriptorSupplier { CloudTasksBaseDescriptorSupplier()2302 CloudTasksBaseDescriptorSupplier() {} 2303 2304 @java.lang.Override getFileDescriptor()2305 public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { 2306 return com.google.cloud.tasks.v2.CloudTasksProto.getDescriptor(); 2307 } 2308 2309 @java.lang.Override getServiceDescriptor()2310 public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { 2311 return getFileDescriptor().findServiceByName("CloudTasks"); 2312 } 2313 } 2314 2315 private static final class CloudTasksFileDescriptorSupplier 2316 extends CloudTasksBaseDescriptorSupplier { CloudTasksFileDescriptorSupplier()2317 CloudTasksFileDescriptorSupplier() {} 2318 } 2319 2320 private static final class CloudTasksMethodDescriptorSupplier 2321 extends CloudTasksBaseDescriptorSupplier 2322 implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { 2323 private final String methodName; 2324 CloudTasksMethodDescriptorSupplier(String methodName)2325 CloudTasksMethodDescriptorSupplier(String methodName) { 2326 this.methodName = methodName; 2327 } 2328 2329 @java.lang.Override getMethodDescriptor()2330 public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { 2331 return getServiceDescriptor().findMethodByName(methodName); 2332 } 2333 } 2334 2335 private static volatile io.grpc.ServiceDescriptor serviceDescriptor; 2336 getServiceDescriptor()2337 public static io.grpc.ServiceDescriptor getServiceDescriptor() { 2338 io.grpc.ServiceDescriptor result = serviceDescriptor; 2339 if (result == null) { 2340 synchronized (CloudTasksGrpc.class) { 2341 result = serviceDescriptor; 2342 if (result == null) { 2343 serviceDescriptor = 2344 result = 2345 io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) 2346 .setSchemaDescriptor(new CloudTasksFileDescriptorSupplier()) 2347 .addMethod(getListQueuesMethod()) 2348 .addMethod(getGetQueueMethod()) 2349 .addMethod(getCreateQueueMethod()) 2350 .addMethod(getUpdateQueueMethod()) 2351 .addMethod(getDeleteQueueMethod()) 2352 .addMethod(getPurgeQueueMethod()) 2353 .addMethod(getPauseQueueMethod()) 2354 .addMethod(getResumeQueueMethod()) 2355 .addMethod(getGetIamPolicyMethod()) 2356 .addMethod(getSetIamPolicyMethod()) 2357 .addMethod(getTestIamPermissionsMethod()) 2358 .addMethod(getListTasksMethod()) 2359 .addMethod(getGetTaskMethod()) 2360 .addMethod(getCreateTaskMethod()) 2361 .addMethod(getDeleteTaskMethod()) 2362 .addMethod(getRunTaskMethod()) 2363 .build(); 2364 } 2365 } 2366 } 2367 return result; 2368 } 2369 } 2370