1- // Copyright 2019 Google LLC.
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
1111// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14- //
1514
1615syntax = "proto3" ;
1716
@@ -35,7 +34,8 @@ option objc_class_prefix = "SCHEDULER";
3534// schedule asynchronous jobs.
3635service CloudScheduler {
3736 option (google.api.default_host ) = "cloudscheduler.googleapis.com" ;
38- option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
37+ option (google.api.oauth_scopes ) =
38+ "https://www.googleapis.com/auth/cloud-platform" ;
3939
4040 // Lists jobs.
4141 rpc ListJobs (ListJobsRequest ) returns (ListJobsResponse ) {
@@ -64,13 +64,14 @@ service CloudScheduler {
6464
6565 // Updates a job.
6666 //
67- // If successful, the updated [Job][google.cloud.scheduler.v1.Job] is returned. If the job does
68- // not exist, `NOT_FOUND` is returned.
67+ // If successful, the updated [Job][google.cloud.scheduler.v1.Job] is
68+ // returned. If the job does not exist, `NOT_FOUND` is returned.
6969 //
7070 // If UpdateJob does not successfully return, it is possible for the
71- // job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] state. A job in this state may
72- // not be executed. If this happens, retry the UpdateJob request
73- // until a successful response is received.
71+ // job to be in an
72+ // [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED]
73+ // state. A job in this state may not be executed. If this happens, retry the
74+ // UpdateJob request until a successful response is received.
7475 rpc UpdateJob (UpdateJobRequest ) returns (Job ) {
7576 option (google.api.http ) = {
7677 patch : "/v1/{job.name=projects/*/locations/*/jobs/*}"
@@ -90,10 +91,13 @@ service CloudScheduler {
9091 // Pauses a job.
9192 //
9293 // If a job is paused then the system will stop executing the job
93- // until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The
94- // state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it
95- // will be set to [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]
96- // to be paused.
94+ // until it is re-enabled via
95+ // [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The state
96+ // of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if
97+ // paused it will be set to
98+ // [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must
99+ // be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED] to
100+ // be paused.
97101 rpc PauseJob (PauseJobRequest ) returns (Job ) {
98102 option (google.api.http ) = {
99103 post : "/v1/{name=projects/*/locations/*/jobs/*}:pause"
@@ -104,10 +108,13 @@ service CloudScheduler {
104108
105109 // Resume a job.
106110 //
107- // This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The
108- // state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it
109- // will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in
110- // [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed.
111+ // This method reenables a job after it has been
112+ // [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The state
113+ // of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state];
114+ // after calling this method it will be set to
115+ // [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job
116+ // must be in [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]
117+ // to be resumed.
111118 rpc ResumeJob (ResumeJobRequest ) returns (Job ) {
112119 option (google.api.http ) = {
113120 post : "/v1/{name=projects/*/locations/*/jobs/*}:resume"
@@ -129,7 +136,8 @@ service CloudScheduler {
129136 }
130137}
131138
132- // Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs].
139+ // Request message for listing jobs using
140+ // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs].
133141message ListJobsRequest {
134142 // Required. The location name. For example:
135143 // `projects/PROJECT_ID/locations/LOCATION_ID`.
@@ -151,29 +159,35 @@ message ListJobsRequest {
151159 // A token identifying a page of results the server will return. To
152160 // request the first page results, page_token must be empty. To
153161 // request the next page of results, page_token must be the value of
154- // [next_page_token][google.cloud.scheduler.v1.ListJobsResponse.next_page_token] returned from
155- // the previous call to [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. It is an error to
156- // switch the value of [filter][google.cloud.scheduler.v1.ListJobsRequest.filter] or
157- // [order_by][google.cloud.scheduler.v1.ListJobsRequest.order_by] while iterating through pages.
162+ // [next_page_token][google.cloud.scheduler.v1.ListJobsResponse.next_page_token]
163+ // returned from the previous call to
164+ // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs]. It is an
165+ // error to switch the value of
166+ // [filter][google.cloud.scheduler.v1.ListJobsRequest.filter] or
167+ // [order_by][google.cloud.scheduler.v1.ListJobsRequest.order_by] while
168+ // iterating through pages.
158169 string page_token = 6 ;
159170}
160171
161- // Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs].
172+ // Response message for listing jobs using
173+ // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs].
162174message ListJobsResponse {
163175 // The list of jobs.
164176 repeated Job jobs = 1 ;
165177
166178 // A token to retrieve next page of results. Pass this value in the
167- // [page_token][google.cloud.scheduler.v1.ListJobsRequest.page_token] field in the subsequent call to
168- // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs] to retrieve the next page of results.
169- // If this is empty it indicates that there are no more results
170- // through which to paginate.
179+ // [page_token][google.cloud.scheduler.v1.ListJobsRequest.page_token] field in
180+ // the subsequent call to
181+ // [ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs] to retrieve
182+ // the next page of results. If this is empty it indicates that there are no
183+ // more results through which to paginate.
171184 //
172185 // The page token is valid for only 2 hours.
173186 string next_page_token = 2 ;
174187}
175188
176- // Request message for [GetJob][google.cloud.scheduler.v1.CloudScheduler.GetJob].
189+ // Request message for
190+ // [GetJob][google.cloud.scheduler.v1.CloudScheduler.GetJob].
177191message GetJobRequest {
178192 // Required. The job name. For example:
179193 // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -185,7 +199,8 @@ message GetJobRequest {
185199 ];
186200}
187201
188- // Request message for [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob].
202+ // Request message for
203+ // [CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob].
189204message CreateJobRequest {
190205 // Required. The location name. For example:
191206 // `projects/PROJECT_ID/locations/LOCATION_ID`.
@@ -197,24 +212,26 @@ message CreateJobRequest {
197212 ];
198213
199214 // Required. The job to add. The user can optionally specify a name for the
200- // job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an
215+ // job in [name][google.cloud.scheduler.v1.Job.name].
216+ // [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an
201217 // existing job. If a name is not specified then the system will
202218 // generate a random unique name that will be returned
203219 // ([name][google.cloud.scheduler.v1.Job.name]) in the response.
204220 Job job = 2 [(google.api.field_behavior ) = REQUIRED ];
205221}
206222
207- // Request message for [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob].
223+ // Request message for
224+ // [UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob].
208225message UpdateJobRequest {
209- // Required. The new job properties. [name][google.cloud.scheduler.v1.Job.name] must be specified.
226+ // Required. The new job properties.
227+ // [name][google.cloud.scheduler.v1.Job.name] must be specified.
210228 //
211229 // Output only fields cannot be modified using UpdateJob.
212230 // Any value specified for an output only field will be ignored.
213231 Job job = 1 [(google.api.field_behavior ) = REQUIRED ];
214232
215233 // A mask used to specify which fields of the job are being updated.
216- google.protobuf.FieldMask update_mask = 2
217- [(google.api.field_behavior ) = REQUIRED ];
234+ google.protobuf.FieldMask update_mask = 2 ;
218235}
219236
220237// Request message for deleting a job using
@@ -230,7 +247,8 @@ message DeleteJobRequest {
230247 ];
231248}
232249
233- // Request message for [PauseJob][google.cloud.scheduler.v1.CloudScheduler.PauseJob].
250+ // Request message for
251+ // [PauseJob][google.cloud.scheduler.v1.CloudScheduler.PauseJob].
234252message PauseJobRequest {
235253 // Required. The job name. For example:
236254 // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -242,7 +260,8 @@ message PauseJobRequest {
242260 ];
243261}
244262
245- // Request message for [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob].
263+ // Request message for
264+ // [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob].
246265message ResumeJobRequest {
247266 // Required. The job name. For example:
248267 // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
0 commit comments