fix!: Use http binding with location field as primary http bindings

Changing HTTP bindings and/or their order might be a breaking change for libraries.

PiperOrigin-RevId: 430239565
pull/705/head
Google APIs 3 years ago committed by Copybara-Service
parent 60526031e7
commit 71fe7ff3f9
  1. 21
      google/dataflow/v1beta3/jobs.proto
  2. 4
      google/dataflow/v1beta3/messages.proto
  3. 4
      google/dataflow/v1beta3/metrics.proto
  4. 12
      google/dataflow/v1beta3/snapshots.proto
  5. 12
      google/dataflow/v1beta3/templates.proto

@ -51,10 +51,10 @@ service JobsV1Beta3 {
// in `us-central1`.
rpc CreateJob(CreateJobRequest) returns (Job) {
option (google.api.http) = {
post: "/v1b3/projects/{project_id}/jobs"
post: "/v1b3/projects/{project_id}/locations/{location}/jobs"
body: "job"
additional_bindings {
post: "/v1b3/projects/{project_id}/locations/{location}/jobs"
post: "/v1b3/projects/{project_id}/jobs"
body: "job"
}
};
@ -69,9 +69,9 @@ service JobsV1Beta3 {
// jobs that are running in `us-central1`.
rpc GetJob(GetJobRequest) returns (Job) {
option (google.api.http) = {
get: "/v1b3/projects/{project_id}/jobs/{job_id}"
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}"
additional_bindings {
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}"
get: "/v1b3/projects/{project_id}/jobs/{job_id}"
}
};
}
@ -85,10 +85,10 @@ service JobsV1Beta3 {
// of jobs that are running in `us-central1`.
rpc UpdateJob(UpdateJobRequest) returns (Job) {
option (google.api.http) = {
put: "/v1b3/projects/{project_id}/jobs/{job_id}"
put: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}"
body: "job"
additional_bindings {
put: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}"
put: "/v1b3/projects/{project_id}/jobs/{job_id}"
body: "job"
}
};
@ -104,9 +104,9 @@ service JobsV1Beta3 {
// jobs that are running in `us-central1`.
rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
option (google.api.http) = {
get: "/v1b3/projects/{project_id}/jobs"
get: "/v1b3/projects/{project_id}/locations/{location}/jobs"
additional_bindings {
get: "/v1b3/projects/{project_id}/locations/{location}/jobs"
get: "/v1b3/projects/{project_id}/jobs"
}
};
}
@ -125,10 +125,10 @@ service JobsV1Beta3 {
// Snapshot the state of a streaming job.
rpc SnapshotJob(SnapshotJobRequest) returns (Snapshot) {
option (google.api.http) = {
post: "/v1b3/projects/{project_id}/jobs/{job_id}:snapshot"
post: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}:snapshot"
body: "*"
additional_bindings {
post: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}:snapshot"
post: "/v1b3/projects/{project_id}/jobs/{job_id}:snapshot"
body: "*"
}
};
@ -136,7 +136,6 @@ service JobsV1Beta3 {
}
// Defines a job to be run by the Cloud Dataflow service.
// nextID: 26
message Job {
// The unique ID of this job.
//

@ -48,9 +48,9 @@ service MessagesV1Beta3 {
// the status of jobs that are running in `us-central1`.
rpc ListJobMessages(ListJobMessagesRequest) returns (ListJobMessagesResponse) {
option (google.api.http) = {
get: "/v1b3/projects/{project_id}/jobs/{job_id}/messages"
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/messages"
additional_bindings {
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/messages"
get: "/v1b3/projects/{project_id}/jobs/{job_id}/messages"
}
};
}

@ -48,9 +48,9 @@ service MetricsV1Beta3 {
// status of jobs that are running in `us-central1`.
rpc GetJobMetrics(GetJobMetricsRequest) returns (JobMetrics) {
option (google.api.http) = {
get: "/v1b3/projects/{project_id}/jobs/{job_id}/metrics"
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/metrics"
additional_bindings {
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/metrics"
get: "/v1b3/projects/{project_id}/jobs/{job_id}/metrics"
}
};
}

@ -41,9 +41,9 @@ service SnapshotsV1Beta3 {
// Gets information about a snapshot.
rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
option (google.api.http) = {
get: "/v1b3/projects/{project_id}/snapshots/{snapshot_id}"
get: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}"
additional_bindings {
get: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}"
get: "/v1b3/projects/{project_id}/snapshots/{snapshot_id}"
}
};
}
@ -51,9 +51,9 @@ service SnapshotsV1Beta3 {
// Deletes a snapshot.
rpc DeleteSnapshot(DeleteSnapshotRequest) returns (DeleteSnapshotResponse) {
option (google.api.http) = {
delete: "/v1b3/projects/{project_id}/snapshots"
delete: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}"
additional_bindings {
delete: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}"
delete: "/v1b3/projects/{project_id}/snapshots"
}
};
}
@ -61,12 +61,12 @@ service SnapshotsV1Beta3 {
// Lists snapshots.
rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
option (google.api.http) = {
get: "/v1b3/projects/{project_id}/snapshots"
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/snapshots"
additional_bindings {
get: "/v1b3/projects/{project_id}/locations/{location}/snapshots"
}
additional_bindings {
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/snapshots"
get: "/v1b3/projects/{project_id}/snapshots"
}
};
}

@ -42,10 +42,10 @@ service TemplatesService {
// Creates a Cloud Dataflow job from a template.
rpc CreateJobFromTemplate(CreateJobFromTemplateRequest) returns (Job) {
option (google.api.http) = {
post: "/v1b3/projects/{project_id}/templates"
post: "/v1b3/projects/{project_id}/locations/{location}/templates"
body: "*"
additional_bindings {
post: "/v1b3/projects/{project_id}/locations/{location}/templates"
post: "/v1b3/projects/{project_id}/templates"
body: "*"
}
};
@ -54,10 +54,10 @@ service TemplatesService {
// Launch a template.
rpc LaunchTemplate(LaunchTemplateRequest) returns (LaunchTemplateResponse) {
option (google.api.http) = {
post: "/v1b3/projects/{project_id}/templates:launch"
post: "/v1b3/projects/{project_id}/locations/{location}/templates:launch"
body: "launch_parameters"
additional_bindings {
post: "/v1b3/projects/{project_id}/locations/{location}/templates:launch"
post: "/v1b3/projects/{project_id}/templates:launch"
body: "launch_parameters"
}
};
@ -66,9 +66,9 @@ service TemplatesService {
// Get the template associated with a template.
rpc GetTemplate(GetTemplateRequest) returns (GetTemplateResponse) {
option (google.api.http) = {
get: "/v1b3/projects/{project_id}/templates:get"
get: "/v1b3/projects/{project_id}/locations/{location}/templates:get"
additional_bindings {
get: "/v1b3/projects/{project_id}/locations/{location}/templates:get"
get: "/v1b3/projects/{project_id}/templates:get"
}
};
}

Loading…
Cancel
Save