Skip to content

Commit 23ba642

Browse files
yoshi-automationbusunkim96
authored andcommitted
Add auth and configurable timeouts to v1beta1 (via synth).
1 parent 2f82703 commit 23ba642

8 files changed

Lines changed: 571 additions & 259 deletions

File tree

scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler.proto

Lines changed: 32 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018 Google LLC.
1+
// Copyright 2019 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.
@@ -18,6 +18,7 @@ syntax = "proto3";
1818
package google.cloud.scheduler.v1beta1;
1919

2020
import "google/api/annotations.proto";
21+
import "google/api/resource.proto";
2122
import "google/cloud/scheduler/v1beta1/job.proto";
2223
import "google/protobuf/empty.proto";
2324
import "google/protobuf/field_mask.proto";
@@ -55,14 +56,13 @@ service CloudScheduler {
5556

5657
// Updates a job.
5758
//
58-
// If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is
59-
// returned. If the job does not exist, `NOT_FOUND` is returned.
59+
// If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does
60+
// not exist, `NOT_FOUND` is returned.
6061
//
6162
// If UpdateJob does not successfully return, it is possible for the
62-
// job to be in an
63-
// [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED]
64-
// state. A job in this state may not be executed. If this happens, retry the
65-
// UpdateJob request until a successful response is received.
63+
// job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may
64+
// not be executed. If this happens, retry the UpdateJob request
65+
// until a successful response is received.
6666
rpc UpdateJob(UpdateJobRequest) returns (Job) {
6767
option (google.api.http) = {
6868
patch: "/v1beta1/{job.name=projects/*/locations/*/jobs/*}"
@@ -80,14 +80,10 @@ service CloudScheduler {
8080
// Pauses a job.
8181
//
8282
// If a job is paused then the system will stop executing the job
83-
// until it is re-enabled via
84-
// [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
85-
// state of the job is stored in
86-
// [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it will be set
87-
// to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A
88-
// job must be in
89-
// [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be
90-
// paused.
83+
// until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
84+
// state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it
85+
// 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]
86+
// to be paused.
9187
rpc PauseJob(PauseJobRequest) returns (Job) {
9288
option (google.api.http) = {
9389
post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause"
@@ -97,15 +93,10 @@ service CloudScheduler {
9793

9894
// Resume a job.
9995
//
100-
// This method reenables a job after it has been
101-
// [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
102-
// state of a job is stored in
103-
// [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this
104-
// method it will be set to
105-
// [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A
106-
// job must be in
107-
// [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be
108-
// resumed.
96+
// This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
97+
// state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it
98+
// will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in
99+
// [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed.
109100
rpc ResumeJob(ResumeJobRequest) returns (Job) {
110101
option (google.api.http) = {
111102
post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume"
@@ -125,8 +116,7 @@ service CloudScheduler {
125116
}
126117
}
127118

128-
// Request message for listing jobs using
129-
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
119+
// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
130120
message ListJobsRequest {
131121
// Required.
132122
//
@@ -145,35 +135,29 @@ message ListJobsRequest {
145135
// A token identifying a page of results the server will return. To
146136
// request the first page results, page_token must be empty. To
147137
// request the next page of results, page_token must be the value of
148-
// [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token]
149-
// returned from the previous call to
150-
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is
151-
// an error to switch the value of
152-
// [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or
153-
// [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while
154-
// iterating through pages.
138+
// [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token] returned from
139+
// the previous call to [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is an error to
140+
// switch the value of [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or
141+
// [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while iterating through pages.
155142
string page_token = 6;
156143
}
157144

158-
// Response message for listing jobs using
159-
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
145+
// Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
160146
message ListJobsResponse {
161147
// The list of jobs.
162148
repeated Job jobs = 1;
163149

164150
// A token to retrieve next page of results. Pass this value in the
165-
// [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
166-
// field in the subsequent call to
167-
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
168-
// retrieve the next page of results. If this is empty it indicates that there
169-
// are no more results through which to paginate.
151+
// [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
152+
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
153+
// If this is empty it indicates that there are no more results
154+
// through which to paginate.
170155
//
171156
// The page token is valid for only 2 hours.
172157
string next_page_token = 2;
173158
}
174159

175-
// Request message for
176-
// [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
160+
// Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
177161
message GetJobRequest {
178162
// Required.
179163
//
@@ -182,8 +166,7 @@ message GetJobRequest {
182166
string name = 1;
183167
}
184168

185-
// Request message for
186-
// [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
169+
// Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
187170
message CreateJobRequest {
188171
// Required.
189172
//
@@ -194,21 +177,18 @@ message CreateJobRequest {
194177
// Required.
195178
//
196179
// The job to add. The user can optionally specify a name for the
197-
// job in [name][google.cloud.scheduler.v1beta1.Job.name].
198-
// [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
180+
// job in [name][google.cloud.scheduler.v1beta1.Job.name]. [name][google.cloud.scheduler.v1beta1.Job.name] cannot be the same as an
199181
// existing job. If a name is not specified then the system will
200182
// generate a random unique name that will be returned
201183
// ([name][google.cloud.scheduler.v1beta1.Job.name]) in the response.
202184
Job job = 2;
203185
}
204186

205-
// Request message for
206-
// [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
187+
// Request message for [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
207188
message UpdateJobRequest {
208189
// Required.
209190
//
210-
// The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name]
211-
// must be specified.
191+
// The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
212192
//
213193
// Output only fields cannot be modified using UpdateJob.
214194
// Any value specified for an output only field will be ignored.
@@ -228,8 +208,7 @@ message DeleteJobRequest {
228208
string name = 1;
229209
}
230210

231-
// Request message for
232-
// [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
211+
// Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
233212
message PauseJobRequest {
234213
// Required.
235214
//
@@ -238,8 +217,7 @@ message PauseJobRequest {
238217
string name = 1;
239218
}
240219

241-
// Request message for
242-
// [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
220+
// Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
243221
message ResumeJobRequest {
244222
// Required.
245223
//

scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler_pb2.py

Lines changed: 23 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)