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 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/tasks/v2/cloudtasks.proto 18 19 package com.google.cloud.tasks.v2; 20 21 public interface CreateTaskRequestOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2.CreateTaskRequest) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Required. The queue name. For example: 31 * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` 32 * The queue must already exist. 33 * </pre> 34 * 35 * <code> 36 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 37 * </code> 38 * 39 * @return The parent. 40 */ getParent()41 java.lang.String getParent(); 42 /** 43 * 44 * 45 * <pre> 46 * Required. The queue name. For example: 47 * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` 48 * The queue must already exist. 49 * </pre> 50 * 51 * <code> 52 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 53 * </code> 54 * 55 * @return The bytes for parent. 56 */ getParentBytes()57 com.google.protobuf.ByteString getParentBytes(); 58 59 /** 60 * 61 * 62 * <pre> 63 * Required. The task to add. 64 * Task names have the following format: 65 * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. 66 * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a 67 * name is not specified then the system will generate a random 68 * unique task id, which will be set in the task returned in the 69 * [response][google.cloud.tasks.v2.Task.name]. 70 * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the 71 * past then Cloud Tasks will set it to the current time. 72 * Task De-duplication: 73 * Explicitly specifying a task ID enables task de-duplication. If 74 * a task's ID is identical to that of an existing task or a task 75 * that was deleted or executed recently then the call will fail 76 * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. 77 * If the task's queue was created using Cloud Tasks, then another task with 78 * the same name can't be created for ~1hour after the original task was 79 * deleted or executed. If the task's queue was created using queue.yaml or 80 * queue.xml, then another task with the same name can't be created 81 * for ~9days after the original task was deleted or executed. 82 * Because there is an extra lookup cost to identify duplicate task 83 * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly 84 * increased latency. Using hashed strings for the task id or for 85 * the prefix of the task id is recommended. Choosing task ids that 86 * are sequential or have sequential prefixes, for example using a 87 * timestamp, causes an increase in latency and error rates in all 88 * task commands. The infrastructure relies on an approximately 89 * uniform distribution of task ids to store and serve tasks 90 * efficiently. 91 * </pre> 92 * 93 * <code>.google.cloud.tasks.v2.Task task = 2 [(.google.api.field_behavior) = REQUIRED];</code> 94 * 95 * @return Whether the task field is set. 96 */ hasTask()97 boolean hasTask(); 98 /** 99 * 100 * 101 * <pre> 102 * Required. The task to add. 103 * Task names have the following format: 104 * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. 105 * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a 106 * name is not specified then the system will generate a random 107 * unique task id, which will be set in the task returned in the 108 * [response][google.cloud.tasks.v2.Task.name]. 109 * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the 110 * past then Cloud Tasks will set it to the current time. 111 * Task De-duplication: 112 * Explicitly specifying a task ID enables task de-duplication. If 113 * a task's ID is identical to that of an existing task or a task 114 * that was deleted or executed recently then the call will fail 115 * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. 116 * If the task's queue was created using Cloud Tasks, then another task with 117 * the same name can't be created for ~1hour after the original task was 118 * deleted or executed. If the task's queue was created using queue.yaml or 119 * queue.xml, then another task with the same name can't be created 120 * for ~9days after the original task was deleted or executed. 121 * Because there is an extra lookup cost to identify duplicate task 122 * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly 123 * increased latency. Using hashed strings for the task id or for 124 * the prefix of the task id is recommended. Choosing task ids that 125 * are sequential or have sequential prefixes, for example using a 126 * timestamp, causes an increase in latency and error rates in all 127 * task commands. The infrastructure relies on an approximately 128 * uniform distribution of task ids to store and serve tasks 129 * efficiently. 130 * </pre> 131 * 132 * <code>.google.cloud.tasks.v2.Task task = 2 [(.google.api.field_behavior) = REQUIRED];</code> 133 * 134 * @return The task. 135 */ getTask()136 com.google.cloud.tasks.v2.Task getTask(); 137 /** 138 * 139 * 140 * <pre> 141 * Required. The task to add. 142 * Task names have the following format: 143 * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. 144 * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a 145 * name is not specified then the system will generate a random 146 * unique task id, which will be set in the task returned in the 147 * [response][google.cloud.tasks.v2.Task.name]. 148 * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the 149 * past then Cloud Tasks will set it to the current time. 150 * Task De-duplication: 151 * Explicitly specifying a task ID enables task de-duplication. If 152 * a task's ID is identical to that of an existing task or a task 153 * that was deleted or executed recently then the call will fail 154 * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. 155 * If the task's queue was created using Cloud Tasks, then another task with 156 * the same name can't be created for ~1hour after the original task was 157 * deleted or executed. If the task's queue was created using queue.yaml or 158 * queue.xml, then another task with the same name can't be created 159 * for ~9days after the original task was deleted or executed. 160 * Because there is an extra lookup cost to identify duplicate task 161 * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly 162 * increased latency. Using hashed strings for the task id or for 163 * the prefix of the task id is recommended. Choosing task ids that 164 * are sequential or have sequential prefixes, for example using a 165 * timestamp, causes an increase in latency and error rates in all 166 * task commands. The infrastructure relies on an approximately 167 * uniform distribution of task ids to store and serve tasks 168 * efficiently. 169 * </pre> 170 * 171 * <code>.google.cloud.tasks.v2.Task task = 2 [(.google.api.field_behavior) = REQUIRED];</code> 172 */ getTaskOrBuilder()173 com.google.cloud.tasks.v2.TaskOrBuilder getTaskOrBuilder(); 174 175 /** 176 * 177 * 178 * <pre> 179 * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be 180 * returned. 181 * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all 182 * information is retrieved by default because some data, such as 183 * payloads, might be desirable to return only when needed because 184 * of its large size or because of the sensitivity of data that it 185 * contains. 186 * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires 187 * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) 188 * permission on the [Task][google.cloud.tasks.v2.Task] resource. 189 * </pre> 190 * 191 * <code>.google.cloud.tasks.v2.Task.View response_view = 3;</code> 192 * 193 * @return The enum numeric value on the wire for responseView. 194 */ getResponseViewValue()195 int getResponseViewValue(); 196 /** 197 * 198 * 199 * <pre> 200 * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be 201 * returned. 202 * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all 203 * information is retrieved by default because some data, such as 204 * payloads, might be desirable to return only when needed because 205 * of its large size or because of the sensitivity of data that it 206 * contains. 207 * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires 208 * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) 209 * permission on the [Task][google.cloud.tasks.v2.Task] resource. 210 * </pre> 211 * 212 * <code>.google.cloud.tasks.v2.Task.View response_view = 3;</code> 213 * 214 * @return The responseView. 215 */ getResponseView()216 com.google.cloud.tasks.v2.Task.View getResponseView(); 217 } 218