Skip to content

Commit

Permalink
fix!: remove BufferTask method which cannot be called from client lib…
Browse files Browse the repository at this point in the history
…raries

PiperOrigin-RevId: 599211253
  • Loading branch information
Google APIs authored and Copybara-Service committed Jan 17, 2024
1 parent 57b28e8 commit 1654062
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 104 deletions.
52 changes: 0 additions & 52 deletions google/cloud/tasks/v2beta2/cloudtasks.proto
Original file line number Diff line number Diff line change
Expand Up @@ -414,25 +414,6 @@ service CloudTasks {
};
option (google.api.method_signature) = "name";
}

// Creates and buffers a new task without the need to explicitly define a Task
// message. The queue must have [HTTP
// target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a
// custom ID, use the following format and set TASK_ID to your desired ID:
// projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer
// To create the task with an automatically generated ID, use the following
// format:
// projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.
// Note: This feature is in its experimental stage. You must request access to
// the API through the [Cloud Tasks BufferTask Experiment Signup
// form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
rpc BufferTask(BufferTaskRequest) returns (BufferTaskResponse) {
option (google.api.http) = {
post: "/v2beta2/{queue=projects/*/locations/*/queues/*}/tasks/{task_id}:buffer"
body: "*"
};
option (google.api.method_signature) = "queue,task_id,body";
}
}

// Request message for
Expand Down Expand Up @@ -1028,36 +1009,3 @@ message RunTaskRequest {
// [Task][google.cloud.tasks.v2beta2.Task] resource.
Task.View response_view = 2;
}

// LINT.IfChange
// Request message for
// [BufferTask][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
message BufferTaskRequest {
// Required. The parent queue name. For example:
// projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
//
// The queue must already exist.
string queue = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "cloudtasks.googleapis.com/Task"
}
];

// Optional. Task ID for the task being created. If not provided, a random
// task ID is assigned to the task.
string task_id = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. Body of the HTTP request.
//
// The body can take any generic value. The value is written to the
// [HttpRequest][payload] of the [Task].
google.api.HttpBody body = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for
// [BufferTask][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
message BufferTaskResponse {
// The created task.
Task task = 1;
}
52 changes: 0 additions & 52 deletions google/cloud/tasks/v2beta3/cloudtasks.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package google.cloud.tasks.v2beta3;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/httpbody.proto";
import "google/api/resource.proto";
import "google/cloud/tasks/v2beta3/queue.proto";
import "google/cloud/tasks/v2beta3/task.proto";
Expand Down Expand Up @@ -313,25 +312,6 @@ service CloudTasks {
};
option (google.api.method_signature) = "name";
}

// Creates and buffers a new task without the need to explicitly define a Task
// message. The queue must have [HTTP
// target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a
// custom ID, use the following format and set TASK_ID to your desired ID:
// projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer
// To create the task with an automatically generated ID, use the following
// format:
// projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.
// Note: This feature is in its experimental stage. You must request access to
// the API through the [Cloud Tasks BufferTask Experiment Signup
// form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
rpc BufferTask(BufferTaskRequest) returns (BufferTaskResponse) {
option (google.api.http) = {
post: "/v2beta3/{queue=projects/*/locations/*/queues/*}/tasks/{task_id}:buffer"
body: "*"
};
option (google.api.method_signature) = "queue,task_id,body";
}
}

// Request message for
Expand Down Expand Up @@ -714,35 +694,3 @@ message RunTaskRequest {
// [Task][google.cloud.tasks.v2beta3.Task] resource.
Task.View response_view = 2;
}

// Request message for
// [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
message BufferTaskRequest {
// Required. The parent queue name. For example:
// projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
//
// The queue must already exist.
string queue = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "cloudtasks.googleapis.com/Task"
}
];

// Optional. Task ID for the task being created. If not provided, a random
// task ID is assigned to the task.
string task_id = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. Body of the HTTP request.
//
// The body can take any generic value. The value is written to the
// [HttpRequest][payload] of the [Task].
google.api.HttpBody body = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for
// [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
message BufferTaskResponse {
// The created task.
Task task = 1;
}

0 comments on commit 1654062

Please sign in to comment.