public final UnaryCallable<CreateTaskRequest, Task> createTaskCallable() {
    return stub.createTaskCallable();
  }
Creates a task and adds it to a queue.

<p>Tasks cannot be updated after creation; there is no UpdateTask command.

<ul>
  <li>For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task
      size is 100KB.
  <li>For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB.
</ul>

<p>Sample code:

<pre>{@code
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
  CreateTaskRequest request =
      CreateTaskRequest.newBuilder()
          .setParent(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString())
          .setTask(Task.newBuilder().build())
          .build();
  ApiFuture<Task> future = cloudTasksClient.createTaskCallable().futureCall(request);
  // Do something.
  Task response = future.get();
}
}</pre>
java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java