Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
fix(scheduler)!: remove project_path method, update docstrings (via…
Browse files Browse the repository at this point in the history
… synth) (#9522)
  • Loading branch information
yoshi-automation authored and busunkim96 committed Oct 28, 2019
1 parent ef8da6e commit 36c611b
Show file tree
Hide file tree
Showing 13 changed files with 257 additions and 210 deletions.
7 changes: 0 additions & 7 deletions google/cloud/scheduler_v1/gapic/cloud_scheduler_client.py
Expand Up @@ -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,
Expand Down
18 changes: 9 additions & 9 deletions google/cloud/scheduler_v1/gapic/cloud_scheduler_client_config.py
Expand Up @@ -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",
},
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/scheduler_v1/proto/cloudscheduler.proto
Expand Up @@ -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"
}
];

Expand Down Expand Up @@ -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"
}
];

Expand Down
6 changes: 3 additions & 3 deletions google/cloud/scheduler_v1/proto/cloudscheduler_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 12 additions & 37 deletions google/cloud/scheduler_v1beta1/gapic/cloud_scheduler_client.py
Expand Up @@ -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,
Expand Down Expand Up @@ -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-
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -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",
},
Expand Down

0 comments on commit 36c611b

Please sign in to comment.