Skip to content

Commit

Permalink
feat: Updated Client Libraries for Cloud Scheduler (#3738)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Dec 13, 2022
1 parent 4a0a105 commit fb1e9d6
Show file tree
Hide file tree
Showing 15 changed files with 830 additions and 157 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

Expand All @@ -35,7 +34,8 @@ option objc_class_prefix = "SCHEDULER";
// schedule asynchronous jobs.
service CloudScheduler {
option (google.api.default_host) = "cloudscheduler.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// Lists jobs.
rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
Expand Down Expand Up @@ -64,13 +64,14 @@ service CloudScheduler {

// Updates a job.
//
// If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does
// not exist, `NOT_FOUND` is returned.
// If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is
// returned. If the job does not exist, `NOT_FOUND` is returned.
//
// If UpdateJob does not successfully return, it is possible for the
// job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may
// not be executed. If this happens, retry the UpdateJob request
// until a successful response is received.
// job to be in an
// [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED]
// state. A job in this state may not be executed. If this happens, retry the
// UpdateJob request until a successful response is received.
rpc UpdateJob(UpdateJobRequest) returns (Job) {
option (google.api.http) = {
patch: "/v1beta1/{job.name=projects/*/locations/*/jobs/*}"
Expand All @@ -90,10 +91,14 @@ service CloudScheduler {
// Pauses a job.
//
// If a job is paused then the system will stop executing the job
// until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
// state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it
// 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]
// to be paused.
// until it is re-enabled via
// [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The
// state of the job is stored in
// [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it 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] to be
// paused.
rpc PauseJob(PauseJobRequest) returns (Job) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause"
Expand All @@ -104,10 +109,15 @@ service CloudScheduler {

// Resume a job.
//
// This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
// state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it
// will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in
// [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed.
// This method reenables a job after it has been
// [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The
// state of a job is stored in
// [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this
// method it will be set to
// [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A
// job must be in
// [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be
// resumed.
rpc ResumeJob(ResumeJobRequest) returns (Job) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume"
Expand All @@ -129,7 +139,8 @@ service CloudScheduler {
}
}

// Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
// Request message for listing jobs using
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
message ListJobsRequest {
// Required. The location name. For example:
// `projects/PROJECT_ID/locations/LOCATION_ID`.
Expand All @@ -140,6 +151,16 @@ message ListJobsRequest {
}
];

// `filter` can be used to specify a subset of jobs.
//
// If `filter` equals `target_config="HttpConfig"`, then the http
// target jobs are retrieved. If `filter` equals
// `target_config="PubSubConfig"`, then the Pub/Sub target jobs are
// retrieved. If `filter` equals `labels.foo=value1
// labels.foo=value2` then only jobs which are labeled with
// foo=value1 AND foo=value2 will be returned.
string filter = 4;

// Requested page size.
//
// The maximum page size is 500. If unspecified, the page size will
Expand All @@ -151,29 +172,40 @@ message ListJobsRequest {
// A token identifying a page of results the server will return. To
// request the first page results, page_token must be empty. To
// request the next page of results, page_token must be the value of
// [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token] returned from
// the previous call to [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is an error to
// switch the value of [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or
// [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while iterating through pages.
// [next_page_token][google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token]
// returned from the previous call to
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. It is
// an error to switch the value of
// [filter][google.cloud.scheduler.v1beta1.ListJobsRequest.filter] or
// [order_by][google.cloud.scheduler.v1beta1.ListJobsRequest.order_by] while
// iterating through pages.
string page_token = 6;

// This field is used to manage the legacy App Engine Cron jobs using the
// Cloud Scheduler API. If the field is set to true, the jobs in the __cron
// queue will be listed instead.
bool legacy_app_engine_cron = 7;
}

// Response message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
// Response message for listing jobs using
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs].
message ListJobsResponse {
// The list of jobs.
repeated Job jobs = 1;

// A token to retrieve next page of results. Pass this value in the
// [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token] field in the subsequent call to
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to retrieve the next page of results.
// If this is empty it indicates that there are no more results
// through which to paginate.
// [page_token][google.cloud.scheduler.v1beta1.ListJobsRequest.page_token]
// field in the subsequent call to
// [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs] to
// retrieve the next page of results. If this is empty it indicates that there
// are no more results through which to paginate.
//
// The page token is valid for only 2 hours.
string next_page_token = 2;
}

// Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
// Request message for
// [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob].
message GetJobRequest {
// Required. The job name. For example:
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
Expand All @@ -185,7 +217,8 @@ message GetJobRequest {
];
}

// Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
// Request message for
// [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob].
message CreateJobRequest {
// Required. The location name. For example:
// `projects/PROJECT_ID/locations/LOCATION_ID`.
Expand All @@ -197,16 +230,19 @@ message CreateJobRequest {
];

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

// Request message for [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
// Request message for
// [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
message UpdateJobRequest {
// Required. The new job properties. [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
// Required. The new job properties.
// [name][google.cloud.scheduler.v1beta1.Job.name] must be specified.
//
// Output only fields cannot be modified using UpdateJob.
// Any value specified for an output only field will be ignored.
Expand All @@ -227,9 +263,15 @@ message DeleteJobRequest {
type: "cloudscheduler.googleapis.com/Job"
}
];

// This field is used to manage the legacy App Engine Cron jobs using the
// Cloud Scheduler API. If the field is set to true, the job in the __cron
// queue with the corresponding name will be deleted instead.
bool legacy_app_engine_cron = 2;
}

// Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
// Request message for
// [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob].
message PauseJobRequest {
// Required. The job name. For example:
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
Expand All @@ -241,7 +283,8 @@ message PauseJobRequest {
];
}

// Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
// Request message for
// [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob].
message ResumeJobRequest {
// Required. The job name. For example:
// `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
Expand All @@ -264,4 +307,9 @@ message RunJobRequest {
type: "cloudscheduler.googleapis.com/Job"
}
];

// This field is used to manage the legacy App Engine Cron jobs using the
// Cloud Scheduler API. If the field is set to true, the job in the __cron
// queue with the corresponding name will be forced to run instead.
bool legacy_app_engine_cron = 2;
}
Loading

0 comments on commit fb1e9d6

Please sign in to comment.