Skip to content

Commit fb1e9d6

Browse files
feat: Updated Client Libraries for Cloud Scheduler (#3738)
* feat: Updated Client Libraries for Cloud Scheduler PiperOrigin-RevId: 495092454 Source-Link: googleapis/googleapis@3fbdb93 Source-Link: googleapis/googleapis-gen@ecf0b6c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNjaGVkdWxlci8uT3dsQm90LnlhbWwiLCJoIjoiZWNmMGI2YzkwZWU3NmU1M2UzOGNiOGVhNWY2MDQ3NWYyYjRlMzIwYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 4a0a105 commit fb1e9d6

15 files changed

+830
-157
lines changed

packages/google-cloud-scheduler/protos/google/cloud/scheduler/v1beta1/cloudscheduler.proto

+81-33
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -11,7 +11,6 @@
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

1615
syntax = "proto3";
1716

@@ -35,7 +34,8 @@ option objc_class_prefix = "SCHEDULER";
3534
// schedule asynchronous jobs.
3635
service 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.v1beta1.Job] is returned. If the job does
68-
// not exist, `NOT_FOUND` is returned.
67+
// If successful, the updated [Job][google.cloud.scheduler.v1beta1.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.v1beta1.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.v1beta1.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: "/v1beta1/{job.name=projects/*/locations/*/jobs/*}"
@@ -90,10 +91,14 @@ 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.v1beta1.CloudScheduler.ResumeJob]. The
94-
// state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it
95-
// will be set to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]
96-
// to be paused.
94+
// until it is re-enabled via
95+
// [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
96+
// state of the job is stored in
97+
// [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it will be set
98+
// to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A
99+
// job must be in
100+
// [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be
101+
// paused.
97102
rpc PauseJob(PauseJobRequest) returns (Job) {
98103
option (google.api.http) = {
99104
post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause"
@@ -104,10 +109,15 @@ service CloudScheduler {
104109

105110
// Resume a job.
106111
//
107-
// This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
108-
// state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it
109-
// will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in
110-
// [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed.
112+
// This method reenables a job after it has been
113+
// [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
114+
// state of a job is stored in
115+
// [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this
116+
// method it will be set to
117+
// [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A
118+
// job must be in
119+
// [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be
120+
// resumed.
111121
rpc ResumeJob(ResumeJobRequest) returns (Job) {
112122
option (google.api.http) = {
113123
post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume"
@@ -129,7 +139,8 @@ service CloudScheduler {
129139
}
130140
}
131141

132-
// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
142+
// Request message for listing jobs using
143+
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
133144
message ListJobsRequest {
134145
// Required. The location name. For example:
135146
// `projects/PROJECT_ID/locations/LOCATION_ID`.
@@ -140,6 +151,16 @@ message ListJobsRequest {
140151
}
141152
];
142153

154+
// `filter` can be used to specify a subset of jobs.
155+
//
156+
// If `filter` equals `target_config="HttpConfig"`, then the http
157+
// target jobs are retrieved. If `filter` equals
158+
// `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
159+
// retrieved. If `filter` equals `labels.foo=value1
160+
// labels.foo=value2` then only jobs which are labeled with
161+
// foo=value1 AND foo=value2 will be returned.
162+
string filter = 4;
163+
143164
// Requested page size.
144165
//
145166
// The maximum page size is 500. If unspecified, the page size will
@@ -151,29 +172,40 @@ message ListJobsRequest {
151172
// A token identifying a page of results the server will return. To
152173
// request the first page results, page_token must be empty. To
153174
// request the next page of results, page_token must be the value of
154-
// [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token] returned from
155-
// the previous call to [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is an error to
156-
// switch the value of [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or
157-
// [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while iterating through pages.
175+
// [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token]
176+
// returned from the previous call to
177+
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is
178+
// an error to switch the value of
179+
// [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or
180+
// [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while
181+
// iterating through pages.
158182
string page_token = 6;
183+
184+
// This field is used to manage the legacy App Engine Cron jobs using the
185+
// Cloud Scheduler API. If the field is set to true, the jobs in the __cron
186+
// queue will be listed instead.
187+
bool legacy_app_engine_cron = 7;
159188
}
160189

161-
// Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
190+
// Response message for listing jobs using
191+
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
162192
message ListJobsResponse {
163193
// The list of jobs.
164194
repeated Job jobs = 1;
165195

166196
// A token to retrieve next page of results. Pass this value in the
167-
// [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
168-
// [ListJobs][google.cloud.scheduler.v1beta1.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.
197+
// [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
198+
// field in the subsequent call to
199+
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
200+
// retrieve the next page of results. If this is empty it indicates that there
201+
// are no more results through which to paginate.
171202
//
172203
// The page token is valid for only 2 hours.
173204
string next_page_token = 2;
174205
}
175206

176-
// Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
207+
// Request message for
208+
// [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
177209
message GetJobRequest {
178210
// Required. The job name. For example:
179211
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -185,7 +217,8 @@ message GetJobRequest {
185217
];
186218
}
187219

188-
// Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
220+
// Request message for
221+
// [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
189222
message CreateJobRequest {
190223
// Required. The location name. For example:
191224
// `projects/PROJECT_ID/locations/LOCATION_ID`.
@@ -197,16 +230,19 @@ message CreateJobRequest {
197230
];
198231

199232
// Required. The job to add. The user can optionally specify a name for the
200-
// job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
233+
// job in [name][google.cloud.scheduler.v1beta1.Job.name].
234+
// [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
201235
// existing job. If a name is not specified then the system will
202236
// generate a random unique name that will be returned
203237
// ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
204238
Job job = 2 [(google.api.field_behavior) = REQUIRED];
205239
}
206240

207-
// Request message for [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
241+
// Request message for
242+
// [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
208243
message UpdateJobRequest {
209-
// Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
244+
// Required. The new job properties.
245+
// [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
210246
//
211247
// Output only fields cannot be modified using UpdateJob.
212248
// Any value specified for an output only field will be ignored.
@@ -227,9 +263,15 @@ message DeleteJobRequest {
227263
type: "cloudscheduler.googleapis.com/Job"
228264
}
229265
];
266+
267+
// This field is used to manage the legacy App Engine Cron jobs using the
268+
// Cloud Scheduler API. If the field is set to true, the job in the __cron
269+
// queue with the corresponding name will be deleted instead.
270+
bool legacy_app_engine_cron = 2;
230271
}
231272

232-
// Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
273+
// Request message for
274+
// [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
233275
message PauseJobRequest {
234276
// Required. The job name. For example:
235277
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -241,7 +283,8 @@ message PauseJobRequest {
241283
];
242284
}
243285

244-
// Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
286+
// Request message for
287+
// [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
245288
message ResumeJobRequest {
246289
// Required. The job name. For example:
247290
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
@@ -264,4 +307,9 @@ message RunJobRequest {
264307
type: "cloudscheduler.googleapis.com/Job"
265308
}
266309
];
310+
311+
// This field is used to manage the legacy App Engine Cron jobs using the
312+
// Cloud Scheduler API. If the field is set to true, the job in the __cron
313+
// queue with the corresponding name will be forced to run instead.
314+
bool legacy_app_engine_cron = 2;
267315
}

0 commit comments

Comments
 (0)