Skip to content

Commit 71fe7ff

Browse files
Google APIscopybara-github
authored andcommitted
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
1 parent 6052603 commit 71fe7ff

5 files changed

Lines changed: 26 additions & 27 deletions

File tree

google/dataflow/v1beta3/jobs.proto

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ service JobsV1Beta3 {
5151
// in `us-central1`.
5252
rpc CreateJob(CreateJobRequest) returns (Job) {
5353
option (google.api.http) = {
54-
post: "/v1b3/projects/{project_id}/jobs"
54+
post: "/v1b3/projects/{project_id}/locations/{location}/jobs"
5555
body: "job"
5656
additional_bindings {
57-
post: "/v1b3/projects/{project_id}/locations/{location}/jobs"
57+
post: "/v1b3/projects/{project_id}/jobs"
5858
body: "job"
5959
}
6060
};
@@ -69,9 +69,9 @@ service JobsV1Beta3 {
6969
// jobs that are running in `us-central1`.
7070
rpc GetJob(GetJobRequest) returns (Job) {
7171
option (google.api.http) = {
72-
get: "/v1b3/projects/{project_id}/jobs/{job_id}"
72+
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}"
7373
additional_bindings {
74-
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}"
74+
get: "/v1b3/projects/{project_id}/jobs/{job_id}"
7575
}
7676
};
7777
}
@@ -85,10 +85,10 @@ service JobsV1Beta3 {
8585
// of jobs that are running in `us-central1`.
8686
rpc UpdateJob(UpdateJobRequest) returns (Job) {
8787
option (google.api.http) = {
88-
put: "/v1b3/projects/{project_id}/jobs/{job_id}"
88+
put: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}"
8989
body: "job"
9090
additional_bindings {
91-
put: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}"
91+
put: "/v1b3/projects/{project_id}/jobs/{job_id}"
9292
body: "job"
9393
}
9494
};
@@ -104,9 +104,9 @@ service JobsV1Beta3 {
104104
// jobs that are running in `us-central1`.
105105
rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
106106
option (google.api.http) = {
107-
get: "/v1b3/projects/{project_id}/jobs"
107+
get: "/v1b3/projects/{project_id}/locations/{location}/jobs"
108108
additional_bindings {
109-
get: "/v1b3/projects/{project_id}/locations/{location}/jobs"
109+
get: "/v1b3/projects/{project_id}/jobs"
110110
}
111111
};
112112
}
@@ -125,18 +125,17 @@ service JobsV1Beta3 {
125125
// Snapshot the state of a streaming job.
126126
rpc SnapshotJob(SnapshotJobRequest) returns (Snapshot) {
127127
option (google.api.http) = {
128-
post: "/v1b3/projects/{project_id}/jobs/{job_id}:snapshot"
128+
post: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}:snapshot"
129129
body: "*"
130130
additional_bindings {
131-
post: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}:snapshot"
131+
post: "/v1b3/projects/{project_id}/jobs/{job_id}:snapshot"
132132
body: "*"
133133
}
134134
};
135135
}
136136
}
137137

138138
// Defines a job to be run by the Cloud Dataflow service.
139-
// nextID: 26
140139
message Job {
141140
// The unique ID of this job.
142141
//

google/dataflow/v1beta3/messages.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ service MessagesV1Beta3 {
4848
// the status of jobs that are running in `us-central1`.
4949
rpc ListJobMessages(ListJobMessagesRequest) returns (ListJobMessagesResponse) {
5050
option (google.api.http) = {
51-
get: "/v1b3/projects/{project_id}/jobs/{job_id}/messages"
51+
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/messages"
5252
additional_bindings {
53-
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/messages"
53+
get: "/v1b3/projects/{project_id}/jobs/{job_id}/messages"
5454
}
5555
};
5656
}

google/dataflow/v1beta3/metrics.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ service MetricsV1Beta3 {
4848
// status of jobs that are running in `us-central1`.
4949
rpc GetJobMetrics(GetJobMetricsRequest) returns (JobMetrics) {
5050
option (google.api.http) = {
51-
get: "/v1b3/projects/{project_id}/jobs/{job_id}/metrics"
51+
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/metrics"
5252
additional_bindings {
53-
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/metrics"
53+
get: "/v1b3/projects/{project_id}/jobs/{job_id}/metrics"
5454
}
5555
};
5656
}

google/dataflow/v1beta3/snapshots.proto

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,32 +41,32 @@ service SnapshotsV1Beta3 {
4141
// Gets information about a snapshot.
4242
rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
4343
option (google.api.http) = {
44-
get: "/v1b3/projects/{project_id}/snapshots/{snapshot_id}"
44+
get: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}"
4545
additional_bindings {
46-
get: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}"
46+
get: "/v1b3/projects/{project_id}/snapshots/{snapshot_id}"
4747
}
4848
};
4949
}
5050

5151
// Deletes a snapshot.
5252
rpc DeleteSnapshot(DeleteSnapshotRequest) returns (DeleteSnapshotResponse) {
5353
option (google.api.http) = {
54-
delete: "/v1b3/projects/{project_id}/snapshots"
54+
delete: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}"
5555
additional_bindings {
56-
delete: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}"
56+
delete: "/v1b3/projects/{project_id}/snapshots"
5757
}
5858
};
5959
}
6060

6161
// Lists snapshots.
6262
rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
6363
option (google.api.http) = {
64-
get: "/v1b3/projects/{project_id}/snapshots"
64+
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/snapshots"
6565
additional_bindings {
6666
get: "/v1b3/projects/{project_id}/locations/{location}/snapshots"
6767
}
6868
additional_bindings {
69-
get: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/snapshots"
69+
get: "/v1b3/projects/{project_id}/snapshots"
7070
}
7171
};
7272
}

google/dataflow/v1beta3/templates.proto

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ service TemplatesService {
4242
// Creates a Cloud Dataflow job from a template.
4343
rpc CreateJobFromTemplate(CreateJobFromTemplateRequest) returns (Job) {
4444
option (google.api.http) = {
45-
post: "/v1b3/projects/{project_id}/templates"
45+
post: "/v1b3/projects/{project_id}/locations/{location}/templates"
4646
body: "*"
4747
additional_bindings {
48-
post: "/v1b3/projects/{project_id}/locations/{location}/templates"
48+
post: "/v1b3/projects/{project_id}/templates"
4949
body: "*"
5050
}
5151
};
@@ -54,10 +54,10 @@ service TemplatesService {
5454
// Launch a template.
5555
rpc LaunchTemplate(LaunchTemplateRequest) returns (LaunchTemplateResponse) {
5656
option (google.api.http) = {
57-
post: "/v1b3/projects/{project_id}/templates:launch"
57+
post: "/v1b3/projects/{project_id}/locations/{location}/templates:launch"
5858
body: "launch_parameters"
5959
additional_bindings {
60-
post: "/v1b3/projects/{project_id}/locations/{location}/templates:launch"
60+
post: "/v1b3/projects/{project_id}/templates:launch"
6161
body: "launch_parameters"
6262
}
6363
};
@@ -66,9 +66,9 @@ service TemplatesService {
6666
// Get the template associated with a template.
6767
rpc GetTemplate(GetTemplateRequest) returns (GetTemplateResponse) {
6868
option (google.api.http) = {
69-
get: "/v1b3/projects/{project_id}/templates:get"
69+
get: "/v1b3/projects/{project_id}/locations/{location}/templates:get"
7070
additional_bindings {
71-
get: "/v1b3/projects/{project_id}/locations/{location}/templates:get"
71+
get: "/v1b3/projects/{project_id}/templates:get"
7272
}
7373
};
7474
}

0 commit comments

Comments
 (0)