From 044897296086a0a114c987f15887dbc38a5ee955 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 28 Oct 2019 15:36:36 -0700 Subject: [PATCH] fix(scheduler)!: remove `project_path` method, update docstrings (via synth) (#9522) --- .../gapic/cloud_scheduler_client.py | 7 - .../gapic/cloud_scheduler_client_config.py | 18 +-- .../scheduler_v1/proto/cloudscheduler.proto | 4 +- .../scheduler_v1/proto/cloudscheduler_pb2.py | 6 +- .../gapic/cloud_scheduler_client.py | 49 ++----- .../gapic/cloud_scheduler_client_config.py | 22 +-- .../proto/cloudscheduler.proto | 102 +++++++++----- .../proto/cloudscheduler_pb2.py | 125 +++++++++++------- .../cloud/scheduler_v1beta1/proto/job.proto | 7 +- .../cloud/scheduler_v1beta1/proto/job_pb2.py | 17 ++- .../scheduler_v1beta1/proto/target.proto | 42 +++--- .../scheduler_v1beta1/proto/target_pb2.py | 56 ++++---- .../google-cloud-scheduler/synth.metadata | 12 +- 13 files changed, 257 insertions(+), 210 deletions(-) diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1/gapic/cloud_scheduler_client.py b/packages/google-cloud-scheduler/google/cloud/scheduler_v1/gapic/cloud_scheduler_client.py index 3f5583878c7f..bbedb85b3332 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1/gapic/cloud_scheduler_client.py +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1/gapic/cloud_scheduler_client.py @@ -98,13 +98,6 @@ def location_path(cls, project, location): location=location, ) - @classmethod - def project_path(cls, project): - """Return a fully-qualified project string.""" - return google.api_core.path_template.expand( - "projects/{project}", project=project - ) - def __init__( self, transport=None, diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1/gapic/cloud_scheduler_client_config.py b/packages/google-cloud-scheduler/google/cloud/scheduler_v1/gapic/cloud_scheduler_client_config.py index 31ccca1db159..da963b9d59b0 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1/gapic/cloud_scheduler_client_config.py +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1/gapic/cloud_scheduler_client_config.py @@ -18,42 +18,42 @@ }, "methods": { "ListJobs": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "GetJob": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "CreateJob": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "UpdateJob": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteJob": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "PauseJob": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ResumeJob": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "RunJob": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1/proto/cloudscheduler.proto b/packages/google-cloud-scheduler/google/cloud/scheduler_v1/proto/cloudscheduler.proto index 524ed388fafb..89ce8cbd338c 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1/proto/cloudscheduler.proto +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1/proto/cloudscheduler.proto @@ -136,7 +136,7 @@ message ListJobsRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "locations.googleapis.com/Location" + child_type: "cloudscheduler.googleapis.com/Job" } ]; @@ -192,7 +192,7 @@ message CreateJobRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "locations.googleapis.com/Location" + child_type: "cloudscheduler.googleapis.com/Job" } ]; diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1/proto/cloudscheduler_pb2.py b/packages/google-cloud-scheduler/google/cloud/scheduler_v1/proto/cloudscheduler_pb2.py index 948206ec89c1..4b7e2078b9bd 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1/proto/cloudscheduler_pb2.py +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1/proto/cloudscheduler_pb2.py @@ -34,7 +34,7 @@ "\n\035com.google.cloud.scheduler.v1B\016SchedulerProtoP\001ZBgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler\242\002\tSCHEDULER" ), serialized_pb=_b( - '\n4google/cloud/scheduler_v1/proto/cloudscheduler.proto\x12\x19google.cloud.scheduler.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/scheduler_v1/proto/job.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"s\n\x0fListJobsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t"Y\n\x10ListJobsResponse\x12,\n\x04jobs\x18\x01 \x03(\x0b\x32\x1e.google.cloud.scheduler.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\rGetJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"\x7f\n\x10\x43reateJobRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!locations.googleapis.com/Location\x12\x30\n\x03job\x18\x02 \x01(\x0b\x32\x1e.google.cloud.scheduler.v1.JobB\x03\xe0\x41\x02"z\n\x10UpdateJobRequest\x12\x30\n\x03job\x18\x01 \x01(\x0b\x32\x1e.google.cloud.scheduler.v1.JobB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"K\n\x10\x44\x65leteJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"J\n\x0fPauseJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"K\n\x10ResumeJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"H\n\rRunJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job2\xb3\n\n\x0e\x43loudScheduler\x12\x9e\x01\n\x08ListJobs\x12*.google.cloud.scheduler.v1.ListJobsRequest\x1a+.google.cloud.scheduler.v1.ListJobsResponse"9\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\xda\x41\x06parent\x12\x8b\x01\n\x06GetJob\x12(.google.cloud.scheduler.v1.GetJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"7\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\xda\x41\x04name\x12\x9c\x01\n\tCreateJob\x12+.google.cloud.scheduler.v1.CreateJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"B\x82\xd3\xe4\x93\x02/"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\xda\x41\nparent,job\x12\xa5\x01\n\tUpdateJob\x12+.google.cloud.scheduler.v1.UpdateJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"K\x82\xd3\xe4\x93\x02\x33\x32,/v1/{job.name=projects/*/locations/*/jobs/*}:\x03job\xda\x41\x0fjob,update_mask\x12\x89\x01\n\tDeleteJob\x12+.google.cloud.scheduler.v1.DeleteJobRequest\x1a\x16.google.protobuf.Empty"7\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\xda\x41\x04name\x12\x98\x01\n\x08PauseJob\x12*.google.cloud.scheduler.v1.PauseJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"@\x82\xd3\xe4\x93\x02\x33"./v1/{name=projects/*/locations/*/jobs/*}:pause:\x01*\xda\x41\x04name\x12\x9b\x01\n\tResumeJob\x12+.google.cloud.scheduler.v1.ResumeJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"A\x82\xd3\xe4\x93\x02\x34"//v1/{name=projects/*/locations/*/jobs/*}:resume:\x01*\xda\x41\x04name\x12\x92\x01\n\x06RunJob\x12(.google.cloud.scheduler.v1.RunJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job">\x82\xd3\xe4\x93\x02\x31",/v1/{name=projects/*/locations/*/jobs/*}:run:\x01*\xda\x41\x04name\x1aQ\xca\x41\x1d\x63loudscheduler.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x81\x01\n\x1d\x63om.google.cloud.scheduler.v1B\x0eSchedulerProtoP\x01ZBgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler\xa2\x02\tSCHEDULERb\x06proto3' + '\n4google/cloud/scheduler_v1/proto/cloudscheduler.proto\x12\x19google.cloud.scheduler.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/scheduler_v1/proto/job.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"s\n\x0fListJobsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!cloudscheduler.googleapis.com/Job\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t"Y\n\x10ListJobsResponse\x12,\n\x04jobs\x18\x01 \x03(\x0b\x32\x1e.google.cloud.scheduler.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\rGetJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"\x7f\n\x10\x43reateJobRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!cloudscheduler.googleapis.com/Job\x12\x30\n\x03job\x18\x02 \x01(\x0b\x32\x1e.google.cloud.scheduler.v1.JobB\x03\xe0\x41\x02"z\n\x10UpdateJobRequest\x12\x30\n\x03job\x18\x01 \x01(\x0b\x32\x1e.google.cloud.scheduler.v1.JobB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"K\n\x10\x44\x65leteJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"J\n\x0fPauseJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"K\n\x10ResumeJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"H\n\rRunJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job2\xb3\n\n\x0e\x43loudScheduler\x12\x9e\x01\n\x08ListJobs\x12*.google.cloud.scheduler.v1.ListJobsRequest\x1a+.google.cloud.scheduler.v1.ListJobsResponse"9\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\xda\x41\x06parent\x12\x8b\x01\n\x06GetJob\x12(.google.cloud.scheduler.v1.GetJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"7\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\xda\x41\x04name\x12\x9c\x01\n\tCreateJob\x12+.google.cloud.scheduler.v1.CreateJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"B\x82\xd3\xe4\x93\x02/"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\xda\x41\nparent,job\x12\xa5\x01\n\tUpdateJob\x12+.google.cloud.scheduler.v1.UpdateJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"K\x82\xd3\xe4\x93\x02\x33\x32,/v1/{job.name=projects/*/locations/*/jobs/*}:\x03job\xda\x41\x0fjob,update_mask\x12\x89\x01\n\tDeleteJob\x12+.google.cloud.scheduler.v1.DeleteJobRequest\x1a\x16.google.protobuf.Empty"7\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\xda\x41\x04name\x12\x98\x01\n\x08PauseJob\x12*.google.cloud.scheduler.v1.PauseJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"@\x82\xd3\xe4\x93\x02\x33"./v1/{name=projects/*/locations/*/jobs/*}:pause:\x01*\xda\x41\x04name\x12\x9b\x01\n\tResumeJob\x12+.google.cloud.scheduler.v1.ResumeJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job"A\x82\xd3\xe4\x93\x02\x34"//v1/{name=projects/*/locations/*/jobs/*}:resume:\x01*\xda\x41\x04name\x12\x92\x01\n\x06RunJob\x12(.google.cloud.scheduler.v1.RunJobRequest\x1a\x1e.google.cloud.scheduler.v1.Job">\x82\xd3\xe4\x93\x02\x31",/v1/{name=projects/*/locations/*/jobs/*}:run:\x01*\xda\x41\x04name\x1aQ\xca\x41\x1d\x63loudscheduler.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x81\x01\n\x1d\x63om.google.cloud.scheduler.v1B\x0eSchedulerProtoP\x01ZBgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1;scheduler\xa2\x02\tSCHEDULERb\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -71,7 +71,7 @@ is_extension=False, extension_scope=None, serialized_options=_b( - "\340A\002\372A#\022!locations.googleapis.com/Location" + "\340A\002\372A#\022!cloudscheduler.googleapis.com/Job" ), file=DESCRIPTOR, ), @@ -246,7 +246,7 @@ is_extension=False, extension_scope=None, serialized_options=_b( - "\340A\002\372A#\022!locations.googleapis.com/Location" + "\340A\002\372A#\022!cloudscheduler.googleapis.com/Job" ), file=DESCRIPTOR, ), diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/gapic/cloud_scheduler_client.py b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/gapic/cloud_scheduler_client.py index 50879081907b..446baffa4c41 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/gapic/cloud_scheduler_client.py +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/gapic/cloud_scheduler_client.py @@ -100,13 +100,6 @@ def location_path(cls, project, location): location=location, ) - @classmethod - def project_path(cls, project): - """Return a fully-qualified project string.""" - return google.api_core.path_template.expand( - "projects/{project}", project=project - ) - def __init__( self, transport=None, @@ -253,9 +246,7 @@ def list_jobs( ... pass Args: - parent (str): Required. - - The location name. For example: + parent (str): Required. The location name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID``. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- @@ -344,9 +335,7 @@ def get_job( >>> response = client.get_job(name) Args: - name (str): Required. - - The job name. For example: + name (str): Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -420,16 +409,12 @@ def create_job( >>> response = client.create_job(parent, job) Args: - parent (str): Required. - - The location name. For example: + parent (str): Required. The location name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID``. - job (Union[dict, ~google.cloud.scheduler_v1beta1.types.Job]): Required. - - The job to add. The user can optionally specify a name for the job in - ``name``. ``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``) in the response. + job (Union[dict, ~google.cloud.scheduler_v1beta1.types.Job]): Required. The job to add. The user can optionally specify a name for the + job in ``name``. ``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``) in the response. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.scheduler_v1beta1.types.Job` @@ -511,9 +496,7 @@ def update_job( >>> response = client.update_job(job) Args: - job (Union[dict, ~google.cloud.scheduler_v1beta1.types.Job]): Required. - - The new job properties. ``name`` must be specified. + job (Union[dict, ~google.cloud.scheduler_v1beta1.types.Job]): Required. The new job properties. ``name`` must be specified. Output only fields cannot be modified using UpdateJob. Any value specified for an output only field will be ignored. @@ -592,9 +575,7 @@ def delete_job( >>> client.delete_job(name) Args: - name (str): Required. - - The job name. For example: + name (str): Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -666,9 +647,7 @@ def pause_job( >>> response = client.pause_job(name) Args: - name (str): Required. - - The job name. For example: + name (str): Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -743,9 +722,7 @@ def resume_job( >>> response = client.resume_job(name) Args: - name (str): Required. - - The job name. For example: + name (str): Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -818,9 +795,7 @@ def run_job( >>> response = client.run_job(name) Args: - name (str): Required. - - The job name. For example: + name (str): Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/gapic/cloud_scheduler_client_config.py b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/gapic/cloud_scheduler_client_config.py index d972bce85f76..f2dce757b3ec 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/gapic/cloud_scheduler_client_config.py +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/gapic/cloud_scheduler_client_config.py @@ -18,42 +18,42 @@ }, "methods": { "ListJobs": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "GetJob": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "CreateJob": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "UpdateJob": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteJob": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "PauseJob": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ResumeJob": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "RunJob": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler.proto b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler.proto index 4c1d9661839e..4f86b7a56218 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler.proto +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler.proto @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.scheduler.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/scheduler/v1beta1/job.proto"; import "google/protobuf/empty.proto"; @@ -32,11 +34,15 @@ option objc_class_prefix = "SCHEDULER"; // The Cloud Scheduler API allows external entities to reliably // 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"; + // Lists jobs. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/jobs" }; + option (google.api.method_signature) = "parent"; } // Gets a job. @@ -44,6 +50,7 @@ service CloudScheduler { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/jobs/*}" }; + option (google.api.method_signature) = "name"; } // Creates a job. @@ -52,6 +59,7 @@ service CloudScheduler { post: "/v1beta1/{parent=projects/*/locations/*}/jobs" body: "job" }; + option (google.api.method_signature) = "parent,job"; } // Updates a job. @@ -68,6 +76,7 @@ service CloudScheduler { patch: "/v1beta1/{job.name=projects/*/locations/*/jobs/*}" body: "job" }; + option (google.api.method_signature) = "job,update_mask"; } // Deletes a job. @@ -75,6 +84,7 @@ service CloudScheduler { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/jobs/*}" }; + option (google.api.method_signature) = "name"; } // Pauses a job. @@ -89,6 +99,7 @@ service CloudScheduler { post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause" body: "*" }; + option (google.api.method_signature) = "name"; } // Resume a job. @@ -102,6 +113,7 @@ service CloudScheduler { post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume" body: "*" }; + option (google.api.method_signature) = "name"; } // Forces a job to run now. @@ -113,16 +125,20 @@ service CloudScheduler { post: "/v1beta1/{name=projects/*/locations/*/jobs/*}:run" body: "*" }; + option (google.api.method_signature) = "name"; } } // Request message for listing jobs using [ListJobs][google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs]. message ListJobsRequest { - // Required. - // - // The location name. For example: + // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudscheduler.googleapis.com/Job" + } + ]; // Requested page size. // @@ -159,40 +175,42 @@ message ListJobsResponse { // Request message for [GetJob][google.cloud.scheduler.v1beta1.CloudScheduler.GetJob]. message GetJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob]. message CreateJobRequest { - // Required. - // - // The location name. For example: + // Required. The location name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudscheduler.googleapis.com/Job" + } + ]; - // Required. - // - // The job to add. The user can optionally specify a name for the + // 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 // 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; + Job job = 2 [(google.api.field_behavior) = REQUIRED]; } // 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. - Job job = 1; + Job job = 1 [(google.api.field_behavior) = REQUIRED]; // A mask used to specify which fields of the job are being updated. google.protobuf.FieldMask update_mask = 2; @@ -201,37 +219,49 @@ message UpdateJobRequest { // Request message for deleting a job using // [DeleteJob][google.cloud.scheduler.v1beta1.CloudScheduler.DeleteJob]. message DeleteJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for [PauseJob][google.cloud.scheduler.v1beta1.CloudScheduler.PauseJob]. message PauseJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. message ResumeJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } // Request message for forcing a job to run now using // [RunJob][google.cloud.scheduler.v1beta1.CloudScheduler.RunJob]. message RunJobRequest { - // Required. - // - // The job name. For example: + // Required. The job name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudscheduler.googleapis.com/Job" + } + ]; } diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler_pb2.py b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler_pb2.py index f85e45704dc3..3ce738ced993 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler_pb2.py +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/cloudscheduler_pb2.py @@ -16,6 +16,8 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.scheduler_v1beta1.proto import ( job_pb2 as google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_job__pb2, @@ -32,10 +34,12 @@ '\n"com.google.cloud.scheduler.v1beta1B\016SchedulerProtoP\001ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler\242\002\tSCHEDULER' ), serialized_pb=_b( - '\n9google/cloud/scheduler_v1beta1/proto/cloudscheduler.proto\x12\x1egoogle.cloud.scheduler.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/scheduler_v1beta1/proto/job.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"H\n\x0fListJobsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t"^\n\x10ListJobsResponse\x12\x31\n\x04jobs\x18\x01 \x03(\x0b\x32#.google.cloud.scheduler.v1beta1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x1d\n\rGetJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"T\n\x10\x43reateJobRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x30\n\x03job\x18\x02 \x01(\x0b\x32#.google.cloud.scheduler.v1beta1.Job"u\n\x10UpdateJobRequest\x12\x30\n\x03job\x18\x01 \x01(\x0b\x32#.google.cloud.scheduler.v1beta1.Job\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask" \n\x10\x44\x65leteJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x1f\n\x0fPauseJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t" \n\x10ResumeJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x1d\n\rRunJobRequest\x12\x0c\n\x04name\x18\x01 \x01(\t2\x88\n\n\x0e\x43loudScheduler\x12\xa4\x01\n\x08ListJobs\x12/.google.cloud.scheduler.v1beta1.ListJobsRequest\x1a\x30.google.cloud.scheduler.v1beta1.ListJobsResponse"5\x82\xd3\xe4\x93\x02/\x12-/v1beta1/{parent=projects/*/locations/*}/jobs\x12\x93\x01\n\x06GetJob\x12-.google.cloud.scheduler.v1beta1.GetJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job"5\x82\xd3\xe4\x93\x02/\x12-/v1beta1/{name=projects/*/locations/*/jobs/*}\x12\x9e\x01\n\tCreateJob\x12\x30.google.cloud.scheduler.v1beta1.CreateJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job":\x82\xd3\xe4\x93\x02\x34"-/v1beta1/{parent=projects/*/locations/*}/jobs:\x03job\x12\xa2\x01\n\tUpdateJob\x12\x30.google.cloud.scheduler.v1beta1.UpdateJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job">\x82\xd3\xe4\x93\x02\x38\x32\x31/v1beta1/{job.name=projects/*/locations/*/jobs/*}:\x03job\x12\x8c\x01\n\tDeleteJob\x12\x30.google.cloud.scheduler.v1beta1.DeleteJobRequest\x1a\x16.google.protobuf.Empty"5\x82\xd3\xe4\x93\x02/*-/v1beta1/{name=projects/*/locations/*/jobs/*}\x12\xa0\x01\n\x08PauseJob\x12/.google.cloud.scheduler.v1beta1.PauseJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job">\x82\xd3\xe4\x93\x02\x38"3/v1beta1/{name=projects/*/locations/*/jobs/*}:pause:\x01*\x12\xa3\x01\n\tResumeJob\x12\x30.google.cloud.scheduler.v1beta1.ResumeJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job"?\x82\xd3\xe4\x93\x02\x39"4/v1beta1/{name=projects/*/locations/*/jobs/*}:resume:\x01*\x12\x9a\x01\n\x06RunJob\x12-.google.cloud.scheduler.v1beta1.RunJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job"<\x82\xd3\xe4\x93\x02\x36"1/v1beta1/{name=projects/*/locations/*/jobs/*}:run:\x01*B\x8b\x01\n"com.google.cloud.scheduler.v1beta1B\x0eSchedulerProtoP\x01ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler\xa2\x02\tSCHEDULERb\x06proto3' + '\n9google/cloud/scheduler_v1beta1/proto/cloudscheduler.proto\x12\x1egoogle.cloud.scheduler.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/scheduler_v1beta1/proto/job.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"s\n\x0fListJobsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!cloudscheduler.googleapis.com/Job\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t"^\n\x10ListJobsResponse\x12\x31\n\x04jobs\x18\x01 \x03(\x0b\x32#.google.cloud.scheduler.v1beta1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\rGetJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"\x84\x01\n\x10\x43reateJobRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!cloudscheduler.googleapis.com/Job\x12\x35\n\x03job\x18\x02 \x01(\x0b\x32#.google.cloud.scheduler.v1beta1.JobB\x03\xe0\x41\x02"z\n\x10UpdateJobRequest\x12\x35\n\x03job\x18\x01 \x01(\x0b\x32#.google.cloud.scheduler.v1beta1.JobB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"K\n\x10\x44\x65leteJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"J\n\x0fPauseJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"K\n\x10ResumeJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job"H\n\rRunJobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudscheduler.googleapis.com/Job2\xa6\x0b\n\x0e\x43loudScheduler\x12\xad\x01\n\x08ListJobs\x12/.google.cloud.scheduler.v1beta1.ListJobsRequest\x1a\x30.google.cloud.scheduler.v1beta1.ListJobsResponse">\x82\xd3\xe4\x93\x02/\x12-/v1beta1/{parent=projects/*/locations/*}/jobs\xda\x41\x06parent\x12\x9a\x01\n\x06GetJob\x12-.google.cloud.scheduler.v1beta1.GetJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job"<\x82\xd3\xe4\x93\x02/\x12-/v1beta1/{name=projects/*/locations/*/jobs/*}\xda\x41\x04name\x12\xab\x01\n\tCreateJob\x12\x30.google.cloud.scheduler.v1beta1.CreateJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job"G\x82\xd3\xe4\x93\x02\x34"-/v1beta1/{parent=projects/*/locations/*}/jobs:\x03job\xda\x41\nparent,job\x12\xb4\x01\n\tUpdateJob\x12\x30.google.cloud.scheduler.v1beta1.UpdateJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job"P\x82\xd3\xe4\x93\x02\x38\x32\x31/v1beta1/{job.name=projects/*/locations/*/jobs/*}:\x03job\xda\x41\x0fjob,update_mask\x12\x93\x01\n\tDeleteJob\x12\x30.google.cloud.scheduler.v1beta1.DeleteJobRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02/*-/v1beta1/{name=projects/*/locations/*/jobs/*}\xda\x41\x04name\x12\xa7\x01\n\x08PauseJob\x12/.google.cloud.scheduler.v1beta1.PauseJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job"E\x82\xd3\xe4\x93\x02\x38"3/v1beta1/{name=projects/*/locations/*/jobs/*}:pause:\x01*\xda\x41\x04name\x12\xaa\x01\n\tResumeJob\x12\x30.google.cloud.scheduler.v1beta1.ResumeJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job"F\x82\xd3\xe4\x93\x02\x39"4/v1beta1/{name=projects/*/locations/*/jobs/*}:resume:\x01*\xda\x41\x04name\x12\xa1\x01\n\x06RunJob\x12-.google.cloud.scheduler.v1beta1.RunJobRequest\x1a#.google.cloud.scheduler.v1beta1.Job"C\x82\xd3\xe4\x93\x02\x36"1/v1beta1/{name=projects/*/locations/*/jobs/*}:run:\x01*\xda\x41\x04name\x1aQ\xca\x41\x1d\x63loudscheduler.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8b\x01\n"com.google.cloud.scheduler.v1beta1B\x0eSchedulerProtoP\x01ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler\xa2\x02\tSCHEDULERb\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_job__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, @@ -66,7 +70,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\022!cloudscheduler.googleapis.com/Job" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -114,8 +120,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=261, - serialized_end=333, + serialized_start=319, + serialized_end=434, ) @@ -171,8 +177,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=335, - serialized_end=429, + serialized_start=436, + serialized_end=530, ) @@ -198,7 +204,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!cloudscheduler.googleapis.com/Job" + ), file=DESCRIPTOR, ) ], @@ -210,8 +218,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=431, - serialized_end=460, + serialized_start=532, + serialized_end=604, ) @@ -237,7 +245,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\022!cloudscheduler.googleapis.com/Job" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -255,7 +265,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -267,8 +277,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=462, - serialized_end=546, + serialized_start=607, + serialized_end=739, ) @@ -294,7 +304,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -324,8 +334,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=548, - serialized_end=665, + serialized_start=741, + serialized_end=863, ) @@ -351,7 +361,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!cloudscheduler.googleapis.com/Job" + ), file=DESCRIPTOR, ) ], @@ -363,8 +375,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=667, - serialized_end=699, + serialized_start=865, + serialized_end=940, ) @@ -390,7 +402,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!cloudscheduler.googleapis.com/Job" + ), file=DESCRIPTOR, ) ], @@ -402,8 +416,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=701, - serialized_end=732, + serialized_start=942, + serialized_end=1016, ) @@ -429,7 +443,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!cloudscheduler.googleapis.com/Job" + ), file=DESCRIPTOR, ) ], @@ -441,8 +457,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=734, - serialized_end=766, + serialized_start=1018, + serialized_end=1093, ) @@ -468,7 +484,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!cloudscheduler.googleapis.com/Job" + ), file=DESCRIPTOR, ) ], @@ -480,8 +498,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=768, - serialized_end=797, + serialized_start=1095, + serialized_end=1167, ) _LISTJOBSRESPONSE.fields_by_name[ @@ -519,7 +537,7 @@ Attributes: parent: - Required. The location name. For example: + Required. The location name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID``. page_size: Requested page size. The maximum page size is 500. If @@ -582,7 +600,7 @@ Attributes: name: - Required. The job name. For example: + Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. """, # @@protoc_insertion_point(class_scope:google.cloud.scheduler.v1beta1.GetJobRequest) @@ -602,10 +620,10 @@ Attributes: parent: - Required. The location name. For example: + Required. The location name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID``. job: - Required. The job to add. The user can optionally specify a + 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 @@ -631,7 +649,7 @@ Attributes: job: - Required. The new job properties. + 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 @@ -657,7 +675,7 @@ Attributes: name: - Required. The job name. For example: + Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. """, # @@protoc_insertion_point(class_scope:google.cloud.scheduler.v1beta1.DeleteJobRequest) @@ -677,7 +695,7 @@ Attributes: name: - Required. The job name. For example: + Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. """, # @@protoc_insertion_point(class_scope:google.cloud.scheduler.v1beta1.PauseJobRequest) @@ -697,7 +715,7 @@ Attributes: name: - Required. The job name. For example: + Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. """, # @@protoc_insertion_point(class_scope:google.cloud.scheduler.v1beta1.ResumeJobRequest) @@ -717,7 +735,7 @@ Attributes: name: - Required. The job name. For example: + Required. The job name. For example: ``projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID``. """, # @@protoc_insertion_point(class_scope:google.cloud.scheduler.v1beta1.RunJobRequest) @@ -727,15 +745,26 @@ DESCRIPTOR._options = None +_LISTJOBSREQUEST.fields_by_name["parent"]._options = None +_GETJOBREQUEST.fields_by_name["name"]._options = None +_CREATEJOBREQUEST.fields_by_name["parent"]._options = None +_CREATEJOBREQUEST.fields_by_name["job"]._options = None +_UPDATEJOBREQUEST.fields_by_name["job"]._options = None +_DELETEJOBREQUEST.fields_by_name["name"]._options = None +_PAUSEJOBREQUEST.fields_by_name["name"]._options = None +_RESUMEJOBREQUEST.fields_by_name["name"]._options = None +_RUNJOBREQUEST.fields_by_name["name"]._options = None _CLOUDSCHEDULER = _descriptor.ServiceDescriptor( name="CloudScheduler", full_name="google.cloud.scheduler.v1beta1.CloudScheduler", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=800, - serialized_end=2088, + serialized_options=_b( + "\312A\035cloudscheduler.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform" + ), + serialized_start=1170, + serialized_end=2616, methods=[ _descriptor.MethodDescriptor( name="ListJobs", @@ -745,7 +774,7 @@ input_type=_LISTJOBSREQUEST, output_type=_LISTJOBSRESPONSE, serialized_options=_b( - "\202\323\344\223\002/\022-/v1beta1/{parent=projects/*/locations/*}/jobs" + "\202\323\344\223\002/\022-/v1beta1/{parent=projects/*/locations/*}/jobs\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -756,7 +785,7 @@ input_type=_GETJOBREQUEST, output_type=google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_job__pb2._JOB, serialized_options=_b( - "\202\323\344\223\002/\022-/v1beta1/{name=projects/*/locations/*/jobs/*}" + "\202\323\344\223\002/\022-/v1beta1/{name=projects/*/locations/*/jobs/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -767,7 +796,7 @@ input_type=_CREATEJOBREQUEST, output_type=google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_job__pb2._JOB, serialized_options=_b( - '\202\323\344\223\0024"-/v1beta1/{parent=projects/*/locations/*}/jobs:\003job' + '\202\323\344\223\0024"-/v1beta1/{parent=projects/*/locations/*}/jobs:\003job\332A\nparent,job' ), ), _descriptor.MethodDescriptor( @@ -778,7 +807,7 @@ input_type=_UPDATEJOBREQUEST, output_type=google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_job__pb2._JOB, serialized_options=_b( - "\202\323\344\223\002821/v1beta1/{job.name=projects/*/locations/*/jobs/*}:\003job" + "\202\323\344\223\002821/v1beta1/{job.name=projects/*/locations/*/jobs/*}:\003job\332A\017job,update_mask" ), ), _descriptor.MethodDescriptor( @@ -789,7 +818,7 @@ input_type=_DELETEJOBREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002/*-/v1beta1/{name=projects/*/locations/*/jobs/*}" + "\202\323\344\223\002/*-/v1beta1/{name=projects/*/locations/*/jobs/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -800,7 +829,7 @@ input_type=_PAUSEJOBREQUEST, output_type=google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_job__pb2._JOB, serialized_options=_b( - '\202\323\344\223\0028"3/v1beta1/{name=projects/*/locations/*/jobs/*}:pause:\001*' + '\202\323\344\223\0028"3/v1beta1/{name=projects/*/locations/*/jobs/*}:pause:\001*\332A\004name' ), ), _descriptor.MethodDescriptor( @@ -811,7 +840,7 @@ input_type=_RESUMEJOBREQUEST, output_type=google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_job__pb2._JOB, serialized_options=_b( - '\202\323\344\223\0029"4/v1beta1/{name=projects/*/locations/*/jobs/*}:resume:\001*' + '\202\323\344\223\0029"4/v1beta1/{name=projects/*/locations/*/jobs/*}:resume:\001*\332A\004name' ), ), _descriptor.MethodDescriptor( @@ -822,7 +851,7 @@ input_type=_RUNJOBREQUEST, output_type=google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_job__pb2._JOB, serialized_options=_b( - '\202\323\344\223\0026"1/v1beta1/{name=projects/*/locations/*/jobs/*}:run:\001*' + '\202\323\344\223\0026"1/v1beta1/{name=projects/*/locations/*/jobs/*}:run:\001*\332A\004name' ), ), ], diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/job.proto b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/job.proto index ddf910b03384..ddfda31eddc2 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/job.proto +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/job.proto @@ -17,12 +17,12 @@ syntax = "proto3"; package google.cloud.scheduler.v1beta1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/scheduler/v1beta1/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler"; option java_multiple_files = true; @@ -32,6 +32,11 @@ option java_package = "com.google.cloud.scheduler.v1beta1"; // Configuration for a job. // The maximum allowed size for a job is 100KB. message Job { + option (google.api.resource) = { + type: "cloudscheduler.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/jobs/{job}" + }; + // State of the job. enum State { // Unspecified state. diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/job_pb2.py b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/job_pb2.py index 0536ae370635..980631b89ea8 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/job_pb2.py +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/job_pb2.py @@ -15,7 +15,6 @@ _sym_db = _symbol_database.Default() -from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.scheduler_v1beta1.proto import ( target_pb2 as google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_target__pb2, @@ -23,6 +22,7 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -33,15 +33,15 @@ '\n"com.google.cloud.scheduler.v1beta1B\010JobProtoP\001ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler' ), serialized_pb=_b( - '\n.google/cloud/scheduler_v1beta1/proto/job.proto\x12\x1egoogle.cloud.scheduler.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/scheduler_v1beta1/proto/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"\x88\x06\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x45\n\rpubsub_target\x18\x04 \x01(\x0b\x32,.google.cloud.scheduler.v1beta1.PubsubTargetH\x00\x12U\n\x16\x61pp_engine_http_target\x18\x05 \x01(\x0b\x32\x33.google.cloud.scheduler.v1beta1.AppEngineHttpTargetH\x00\x12\x41\n\x0bhttp_target\x18\x06 \x01(\x0b\x32*.google.cloud.scheduler.v1beta1.HttpTargetH\x00\x12\x10\n\x08schedule\x18\x14 \x01(\t\x12\x11\n\ttime_zone\x18\x15 \x01(\t\x12\x34\n\x10user_update_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x05state\x18\n \x01(\x0e\x32).google.cloud.scheduler.v1beta1.Job.State\x12"\n\x06status\x18\x0b \x01(\x0b\x32\x12.google.rpc.Status\x12\x31\n\rschedule_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_attempt_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0cretry_config\x18\x13 \x01(\x0b\x32+.google.cloud.scheduler.v1beta1.RetryConfig\x12\x33\n\x10\x61ttempt_deadline\x18\x16 \x01(\x0b\x32\x19.google.protobuf.Duration"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\x11\n\rUPDATE_FAILED\x10\x04\x42\x08\n\x06target"\xe2\x01\n\x0bRetryConfig\x12\x13\n\x0bretry_count\x18\x01 \x01(\x05\x12\x35\n\x12max_retry_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14min_backoff_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14max_backoff_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x05 \x01(\x05\x42y\n"com.google.cloud.scheduler.v1beta1B\x08JobProtoP\x01ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;schedulerb\x06proto3' + '\n.google/cloud/scheduler_v1beta1/proto/job.proto\x12\x1egoogle.cloud.scheduler.v1beta1\x1a\x19google/api/resource.proto\x1a\x31google/cloud/scheduler_v1beta1/proto/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xe4\x06\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x45\n\rpubsub_target\x18\x04 \x01(\x0b\x32,.google.cloud.scheduler.v1beta1.PubsubTargetH\x00\x12U\n\x16\x61pp_engine_http_target\x18\x05 \x01(\x0b\x32\x33.google.cloud.scheduler.v1beta1.AppEngineHttpTargetH\x00\x12\x41\n\x0bhttp_target\x18\x06 \x01(\x0b\x32*.google.cloud.scheduler.v1beta1.HttpTargetH\x00\x12\x10\n\x08schedule\x18\x14 \x01(\t\x12\x11\n\ttime_zone\x18\x15 \x01(\t\x12\x34\n\x10user_update_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x05state\x18\n \x01(\x0e\x32).google.cloud.scheduler.v1beta1.Job.State\x12"\n\x06status\x18\x0b \x01(\x0b\x32\x12.google.rpc.Status\x12\x31\n\rschedule_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_attempt_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0cretry_config\x18\x13 \x01(\x0b\x32+.google.cloud.scheduler.v1beta1.RetryConfig\x12\x33\n\x10\x61ttempt_deadline\x18\x16 \x01(\x0b\x32\x19.google.protobuf.Duration"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\x11\n\rUPDATE_FAILED\x10\x04:Z\xea\x41W\n!cloudscheduler.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}B\x08\n\x06target"\xe2\x01\n\x0bRetryConfig\x12\x13\n\x0bretry_count\x18\x01 \x01(\x05\x12\x35\n\x12max_retry_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14min_backoff_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14max_backoff_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x05 \x01(\x05\x42y\n"com.google.cloud.scheduler.v1beta1B\x08JobProtoP\x01ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;schedulerb\x06proto3' ), dependencies=[ - google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_scheduler__v1beta1_dot_proto_dot_target__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, ], ) @@ -343,7 +343,9 @@ extensions=[], nested_types=[], enum_types=[_JOB_STATE], - serialized_options=None, + serialized_options=_b( + "\352AW\n!cloudscheduler.googleapis.com/Job\0222projects/{project}/locations/{location}/jobs/{job}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], @@ -357,7 +359,7 @@ ) ], serialized_start=281, - serialized_end=1057, + serialized_end=1149, ) @@ -467,8 +469,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1060, - serialized_end=1286, + serialized_start=1152, + serialized_end=1378, ) _JOB.fields_by_name[ @@ -703,4 +705,5 @@ DESCRIPTOR._options = None +_JOB._options = None # @@protoc_insertion_point(module_scope) diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/target.proto b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/target.proto index 3bb44a1fb85d..4b47e356768b 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/target.proto +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/target.proto @@ -17,8 +17,8 @@ syntax = "proto3"; package google.cloud.scheduler.v1beta1; +import "google/api/resource.proto"; import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler"; option java_multiple_files = true; @@ -32,9 +32,7 @@ option java_package = "com.google.cloud.scheduler.v1beta1"; // constitutes a failed execution. For a redirected request, the response // returned by the redirected request is considered. message HttpTarget { - // Required. - // - // The full URI path that the request will be sent to. This string + // Required. The full URI path that the request will be sent to. This string // must begin with either "http://" or "https://". Some examples of // valid values for [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri] are: // `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will @@ -77,8 +75,8 @@ message HttpTarget { // will be generated and attached as an `Authorization` header in the HTTP // request. // - // This type of authorization should be used when sending requests to a GCP - // endpoint. + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. OAuthToken oauth_token = 5; // If specified, an @@ -86,8 +84,9 @@ message HttpTarget { // token will be generated and attached as an `Authorization` header in the // HTTP request. // - // This type of authorization should be used when sending requests to third - // party endpoints. + // This type of authorization can be used for many scenarios, including + // calling Cloud Run, or endpoints where you intend to validate the token + // yourself. OidcToken oidc_token = 6; } } @@ -162,16 +161,16 @@ message AppEngineHttpTarget { // Pub/Sub target. The job will be delivered by publishing a message to // the given Pub/Sub topic. message PubsubTarget { - // Required. - // - // The name of the Cloud Pub/Sub topic to which messages will + // Required. The name of the Cloud Pub/Sub topic to which messages will // be published when a job is delivered. The topic name must be in the // same format as required by PubSub's // [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), // for example `projects/PROJECT_ID/topics/TOPIC_ID`. // // The topic must be in the same project as the Cloud Scheduler job. - string topic_name = 1; + string topic_name = 1 [(google.api.resource_reference) = { + type: "pubsub.googleapis.com/Topic" + }]; // The message payload for PubsubMessage. // @@ -315,8 +314,8 @@ enum HttpMethod { // Contains information needed for generating an // [OAuth token](https://developers.google.com/identity/protocols/OAuth2). -// This type of authorization should be used when sending requests to a GCP -// endpoint. +// This type of authorization should generally only be used when calling Google +// APIs hosted on *.googleapis.com. message OAuthToken { // [Service account email](https://cloud.google.com/iam/docs/service-accounts) // to be used for generating OAuth token. @@ -332,9 +331,10 @@ message OAuthToken { // Contains information needed for generating an // [OpenID Connect -// token](https://developers.google.com/identity/protocols/OpenIDConnect). This -// type of authorization should be used when sending requests to third party -// endpoints. +// token](https://developers.google.com/identity/protocols/OpenIDConnect). +// This type of authorization can be used for many scenarios, including +// calling Cloud Run, or endpoints where you intend to validate the token +// yourself. message OidcToken { // [Service account email](https://cloud.google.com/iam/docs/service-accounts) // to be used for generating OIDC token. @@ -346,3 +346,11 @@ message OidcToken { // specified in target will be used. string audience = 2; } + +// The Pub/Sub Topic resource definition is in google/cloud/pubsub/v1/, +// but we do not import that proto directly; therefore, we redefine the +// pattern here. +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; diff --git a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/target_pb2.py b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/target_pb2.py index f44a902f973d..e1bb923a9507 100644 --- a/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/target_pb2.py +++ b/packages/google-cloud-scheduler/google/cloud/scheduler_v1beta1/proto/target_pb2.py @@ -16,8 +16,8 @@ _sym_db = _symbol_database.Default() +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 -from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -25,14 +25,14 @@ package="google.cloud.scheduler.v1beta1", syntax="proto3", serialized_options=_b( - '\n"com.google.cloud.scheduler.v1beta1B\013TargetProtoP\001ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler' + '\n"com.google.cloud.scheduler.v1beta1B\013TargetProtoP\001ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler\352A@\n\033pubsub.googleapis.com/Topic\022!projects/{project}/topics/{topic}' ), serialized_pb=_b( - '\n1google/cloud/scheduler_v1beta1/proto/target.proto\x12\x1egoogle.cloud.scheduler.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/protobuf/any.proto"\xfe\x02\n\nHttpTarget\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12?\n\x0bhttp_method\x18\x02 \x01(\x0e\x32*.google.cloud.scheduler.v1beta1.HttpMethod\x12H\n\x07headers\x18\x03 \x03(\x0b\x32\x37.google.cloud.scheduler.v1beta1.HttpTarget.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12\x41\n\x0boauth_token\x18\x05 \x01(\x0b\x32*.google.cloud.scheduler.v1beta1.OAuthTokenH\x00\x12?\n\noidc_token\x18\x06 \x01(\x0b\x32).google.cloud.scheduler.v1beta1.OidcTokenH\x00\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14\x61uthorization_header"\xcb\x02\n\x13\x41ppEngineHttpTarget\x12?\n\x0bhttp_method\x18\x01 \x01(\x0e\x32*.google.cloud.scheduler.v1beta1.HttpMethod\x12L\n\x12\x61pp_engine_routing\x18\x02 \x01(\x0b\x32\x30.google.cloud.scheduler.v1beta1.AppEngineRouting\x12\x14\n\x0crelative_uri\x18\x03 \x01(\t\x12Q\n\x07headers\x18\x04 \x03(\x0b\x32@.google.cloud.scheduler.v1beta1.AppEngineHttpTarget.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xb5\x01\n\x0cPubsubTarget\x12\x12\n\ntopic_name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12P\n\nattributes\x18\x04 \x03(\x0b\x32<.google.cloud.scheduler.v1beta1.PubsubTarget.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"T\n\x10\x41ppEngineRouting\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08instance\x18\x03 \x01(\t\x12\x0c\n\x04host\x18\x04 \x01(\t":\n\nOAuthToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t"<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t*s\n\nHttpMethod\x12\x1b\n\x17HTTP_METHOD_UNSPECIFIED\x10\x00\x12\x08\n\x04POST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\x08\n\x04HEAD\x10\x03\x12\x07\n\x03PUT\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x12\t\n\x05PATCH\x10\x06\x12\x0b\n\x07OPTIONS\x10\x07\x42|\n"com.google.cloud.scheduler.v1beta1B\x0bTargetProtoP\x01ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;schedulerb\x06proto3' + '\n1google/cloud/scheduler_v1beta1/proto/target.proto\x12\x1egoogle.cloud.scheduler.v1beta1\x1a\x19google/api/resource.proto\x1a\x1cgoogle/api/annotations.proto"\xfe\x02\n\nHttpTarget\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12?\n\x0bhttp_method\x18\x02 \x01(\x0e\x32*.google.cloud.scheduler.v1beta1.HttpMethod\x12H\n\x07headers\x18\x03 \x03(\x0b\x32\x37.google.cloud.scheduler.v1beta1.HttpTarget.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x04 \x01(\x0c\x12\x41\n\x0boauth_token\x18\x05 \x01(\x0b\x32*.google.cloud.scheduler.v1beta1.OAuthTokenH\x00\x12?\n\noidc_token\x18\x06 \x01(\x0b\x32).google.cloud.scheduler.v1beta1.OidcTokenH\x00\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14\x61uthorization_header"\xcb\x02\n\x13\x41ppEngineHttpTarget\x12?\n\x0bhttp_method\x18\x01 \x01(\x0e\x32*.google.cloud.scheduler.v1beta1.HttpMethod\x12L\n\x12\x61pp_engine_routing\x18\x02 \x01(\x0b\x32\x30.google.cloud.scheduler.v1beta1.AppEngineRouting\x12\x14\n\x0crelative_uri\x18\x03 \x01(\t\x12Q\n\x07headers\x18\x04 \x03(\x0b\x32@.google.cloud.scheduler.v1beta1.AppEngineHttpTarget.HeadersEntry\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xd7\x01\n\x0cPubsubTarget\x12\x34\n\ntopic_name\x18\x01 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12P\n\nattributes\x18\x04 \x03(\x0b\x32<.google.cloud.scheduler.v1beta1.PubsubTarget.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"T\n\x10\x41ppEngineRouting\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08instance\x18\x03 \x01(\t\x12\x0c\n\x04host\x18\x04 \x01(\t":\n\nOAuthToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t"<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t*s\n\nHttpMethod\x12\x1b\n\x17HTTP_METHOD_UNSPECIFIED\x10\x00\x12\x08\n\x04POST\x10\x01\x12\x07\n\x03GET\x10\x02\x12\x08\n\x04HEAD\x10\x03\x12\x07\n\x03PUT\x10\x04\x12\n\n\x06\x44\x45LETE\x10\x05\x12\t\n\x05PATCH\x10\x06\x12\x0b\n\x07OPTIONS\x10\x07\x42\xbf\x01\n"com.google.cloud.scheduler.v1beta1B\x0bTargetProtoP\x01ZGgoogle.golang.org/genproto/googleapis/cloud/scheduler/v1beta1;scheduler\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3' ), dependencies=[ + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_api_dot_annotations__pb2.DESCRIPTOR, - google_dot_protobuf_dot_any__pb2.DESCRIPTOR, ], ) @@ -73,8 +73,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1253, - serialized_end=1368, + serialized_start=1287, + serialized_end=1402, ) _sym_db.RegisterEnumDescriptor(_HTTPMETHOD) @@ -501,8 +501,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=994, - serialized_end=1043, + serialized_start=1028, + serialized_end=1077, ) _PUBSUBTARGET = _descriptor.Descriptor( @@ -527,7 +527,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\372A\035\n\033pubsub.googleapis.com/Topic"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -576,7 +576,7 @@ extension_ranges=[], oneofs=[], serialized_start=862, - serialized_end=1043, + serialized_end=1077, ) @@ -668,8 +668,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1045, - serialized_end=1129, + serialized_start=1079, + serialized_end=1163, ) @@ -725,8 +725,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1131, - serialized_end=1189, + serialized_start=1165, + serialized_end=1223, ) @@ -782,8 +782,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1191, - serialized_end=1251, + serialized_start=1225, + serialized_end=1285, ) _HTTPTARGET_HEADERSENTRY.containing_type = _HTTPTARGET @@ -848,7 +848,7 @@ Attributes: uri: - Required. The full URI path that the request will be sent to. + Required. The full URI path that the request will be sent to. This string must begin with either "http://" or "https://". Some examples of valid values for [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri] are: @@ -887,14 +887,16 @@ If specified, an `OAuth token `__ will be generated and attached as an ``Authorization`` header - in the HTTP request. This type of authorization should be - used when sending requests to a GCP endpoint. + in the HTTP request. This type of authorization should + generally only be used when calling Google APIs hosted on + \*.googleapis.com. oidc_token: If specified, an `OIDC `__ token will be generated and attached as an ``Authorization`` header in the HTTP request. - This type of authorization should be used when sending - requests to third party endpoints. + This type of authorization can be used for many scenarios, + including calling Cloud Run, or endpoints where you intend to + validate the token yourself. """, # @@protoc_insertion_point(class_scope:google.cloud.scheduler.v1beta1.HttpTarget) ), @@ -999,7 +1001,7 @@ Attributes: topic_name: - Required. The name of the Cloud Pub/Sub topic to which + Required. The name of the Cloud Pub/Sub topic to which messages will be published when a job is delivered. The topic name must be in the same format as required by PubSub's `PublishRequest.name `__. This - type of authorization should be used when sending requests to a GCP - endpoint. + type of authorization should generally only be used when calling Google + APIs hosted on \*.googleapis.com. Attributes: @@ -1150,8 +1152,9 @@ __module__="google.cloud.scheduler_v1beta1.proto.target_pb2", __doc__="""Contains information needed for generating an `OpenID Connect token `__. - This type of authorization should be used when sending requests to third - party endpoints. + This type of authorization can be used for many scenarios, including + calling Cloud Run, or endpoints where you intend to validate the token + yourself. Attributes: @@ -1175,4 +1178,5 @@ _HTTPTARGET_HEADERSENTRY._options = None _APPENGINEHTTPTARGET_HEADERSENTRY._options = None _PUBSUBTARGET_ATTRIBUTESENTRY._options = None +_PUBSUBTARGET.fields_by_name["topic_name"]._options = None # @@protoc_insertion_point(module_scope) diff --git a/packages/google-cloud-scheduler/synth.metadata b/packages/google-cloud-scheduler/synth.metadata index a3260141ad09..797c82f3212b 100644 --- a/packages/google-cloud-scheduler/synth.metadata +++ b/packages/google-cloud-scheduler/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-10-12T12:30:31.933154Z", + "updateTime": "2019-10-23T12:31:17.538221Z", "sources": [ { "generator": { "name": "artman", - "version": "0.39.0", - "dockerImage": "googleapis/artman@sha256:72554d0b3bdc0b4ac7d6726a6a606c00c14b454339037ed86be94574fb05d9f3" + "version": "0.40.2", + "dockerImage": "googleapis/artman@sha256:3b8f7d9b4c206843ce08053474f5c64ae4d388ff7d995e68b59fb65edf73eeb9" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "af8dd2c1750558b538eaa6bdaa3bc899079533ee", - "internalRef": "274260771" + "sha": "0d0dc5172f16c9815a5eda6e99408fb96282f608", + "internalRef": "276178557" } }, { "template": { "name": "python_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ],