diff --git a/google/cloud/scheduler_v1/services/cloud_scheduler/async_client.py b/google/cloud/scheduler_v1/services/cloud_scheduler/async_client.py index 86d77816..36aa7106 100644 --- a/google/cloud/scheduler_v1/services/cloud_scheduler/async_client.py +++ b/google/cloud/scheduler_v1/services/cloud_scheduler/async_client.py @@ -224,6 +224,26 @@ async def list_jobs( ) -> pagers.ListJobsAsyncPager: r"""Lists jobs. + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_list_jobs(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.ListJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_jobs(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.ListJobsRequest, dict]): The request object. Request message for listing jobs @@ -315,6 +335,25 @@ async def get_job( ) -> job.Job: r"""Gets a job. + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_get_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.GetJobRequest( + name="name_value", + ) + + # Make the request + response = client.get_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.GetJobRequest, dict]): The request object. Request message for @@ -398,6 +437,25 @@ async def create_job( ) -> gcs_job.Job: r"""Creates a job. + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_create_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.CreateJobRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.CreateJobRequest, dict]): The request object. Request message for @@ -497,6 +555,25 @@ async def update_job( retry the UpdateJob request until a successful response is received. + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_update_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.UpdateJobRequest( + ) + + # Make the request + response = client.update_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.UpdateJobRequest, dict]): The request object. Request message for @@ -583,6 +660,22 @@ async def delete_job( ) -> None: r"""Deletes a job. + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_delete_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.DeleteJobRequest( + name="name_value", + ) + + # Make the request + client.delete_job(request=request) + Args: request (Union[google.cloud.scheduler_v1.types.DeleteJobRequest, dict]): The request object. Request message for deleting a job @@ -669,6 +762,26 @@ async def pause_job( [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED] to be paused. + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_pause_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.PauseJobRequest( + name="name_value", + ) + + # Make the request + response = client.pause_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.PauseJobRequest, dict]): The request object. Request message for @@ -751,6 +864,26 @@ async def resume_job( [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed. + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_resume_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.ResumeJobRequest( + name="name_value", + ) + + # Make the request + response = client.resume_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.ResumeJobRequest, dict]): The request object. Request message for @@ -825,6 +958,26 @@ async def run_job( When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running. + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_run_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.RunJobRequest( + name="name_value", + ) + + # Make the request + response = client.run_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.RunJobRequest, dict]): The request object. Request message for forcing a job to diff --git a/google/cloud/scheduler_v1/services/cloud_scheduler/client.py b/google/cloud/scheduler_v1/services/cloud_scheduler/client.py index cb47aa39..010364fe 100644 --- a/google/cloud/scheduler_v1/services/cloud_scheduler/client.py +++ b/google/cloud/scheduler_v1/services/cloud_scheduler/client.py @@ -430,6 +430,27 @@ def list_jobs( ) -> pagers.ListJobsPager: r"""Lists jobs. + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_list_jobs(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.ListJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_jobs(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.ListJobsRequest, dict]): The request object. Request message for listing jobs @@ -511,6 +532,26 @@ def get_job( ) -> job.Job: r"""Gets a job. + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_get_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.GetJobRequest( + name="name_value", + ) + + # Make the request + response = client.get_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.GetJobRequest, dict]): The request object. Request message for @@ -584,6 +625,26 @@ def create_job( ) -> gcs_job.Job: r"""Creates a job. + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_create_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.CreateJobRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.CreateJobRequest, dict]): The request object. Request message for @@ -683,6 +744,26 @@ def update_job( retry the UpdateJob request until a successful response is received. + + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_update_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.UpdateJobRequest( + ) + + # Make the request + response = client.update_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.UpdateJobRequest, dict]): The request object. Request message for @@ -769,6 +850,23 @@ def delete_job( ) -> None: r"""Deletes a job. + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_delete_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.DeleteJobRequest( + name="name_value", + ) + + # Make the request + client.delete_job(request=request) + Args: request (Union[google.cloud.scheduler_v1.types.DeleteJobRequest, dict]): The request object. Request message for deleting a job @@ -845,6 +943,27 @@ def pause_job( [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED] to be paused. + + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_pause_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.PauseJobRequest( + name="name_value", + ) + + # Make the request + response = client.pause_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.PauseJobRequest, dict]): The request object. Request message for @@ -927,6 +1046,27 @@ def resume_job( [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed. + + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_resume_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.ResumeJobRequest( + name="name_value", + ) + + # Make the request + response = client.resume_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.ResumeJobRequest, dict]): The request object. Request message for @@ -1001,6 +1141,27 @@ def run_job( When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running. + + + .. code-block:: + + from google.cloud import scheduler_v1 + + def sample_run_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.RunJobRequest( + name="name_value", + ) + + # Make the request + response = client.run_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1.types.RunJobRequest, dict]): The request object. Request message for forcing a job to diff --git a/google/cloud/scheduler_v1beta1/services/cloud_scheduler/async_client.py b/google/cloud/scheduler_v1beta1/services/cloud_scheduler/async_client.py index 8168b5b8..31d6c4f2 100644 --- a/google/cloud/scheduler_v1beta1/services/cloud_scheduler/async_client.py +++ b/google/cloud/scheduler_v1beta1/services/cloud_scheduler/async_client.py @@ -224,6 +224,26 @@ async def list_jobs( ) -> pagers.ListJobsAsyncPager: r"""Lists jobs. + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_list_jobs(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.ListJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_jobs(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.ListJobsRequest, dict]): The request object. Request message for listing jobs @@ -315,6 +335,25 @@ async def get_job( ) -> job.Job: r"""Gets a job. + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_get_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.GetJobRequest( + name="name_value", + ) + + # Make the request + response = client.get_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.GetJobRequest, dict]): The request object. Request message for @@ -398,6 +437,25 @@ async def create_job( ) -> gcs_job.Job: r"""Creates a job. + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_create_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.CreateJobRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.CreateJobRequest, dict]): The request object. Request message for @@ -498,6 +556,25 @@ async def update_job( retry the UpdateJob request until a successful response is received. + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_update_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.UpdateJobRequest( + ) + + # Make the request + response = client.update_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.UpdateJobRequest, dict]): The request object. Request message for @@ -584,6 +661,22 @@ async def delete_job( ) -> None: r"""Deletes a job. + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_delete_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.DeleteJobRequest( + name="name_value", + ) + + # Make the request + client.delete_job(request=request) + Args: request (Union[google.cloud.scheduler_v1beta1.types.DeleteJobRequest, dict]): The request object. Request message for deleting a job @@ -670,6 +763,26 @@ async def pause_job( [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be paused. + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_pause_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.PauseJobRequest( + name="name_value", + ) + + # Make the request + response = client.pause_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.PauseJobRequest, dict]): The request object. Request message for @@ -762,6 +875,26 @@ async def resume_job( [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed. + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_resume_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.ResumeJobRequest( + name="name_value", + ) + + # Make the request + response = client.resume_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.ResumeJobRequest, dict]): The request object. Request message for @@ -846,6 +979,26 @@ async def run_job( When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running. + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_run_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.RunJobRequest( + name="name_value", + ) + + # Make the request + response = client.run_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.RunJobRequest, dict]): The request object. Request message for forcing a job to diff --git a/google/cloud/scheduler_v1beta1/services/cloud_scheduler/client.py b/google/cloud/scheduler_v1beta1/services/cloud_scheduler/client.py index 7a340b03..82175e58 100644 --- a/google/cloud/scheduler_v1beta1/services/cloud_scheduler/client.py +++ b/google/cloud/scheduler_v1beta1/services/cloud_scheduler/client.py @@ -430,6 +430,27 @@ def list_jobs( ) -> pagers.ListJobsPager: r"""Lists jobs. + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_list_jobs(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.ListJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_jobs(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.ListJobsRequest, dict]): The request object. Request message for listing jobs @@ -511,6 +532,26 @@ def get_job( ) -> job.Job: r"""Gets a job. + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_get_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.GetJobRequest( + name="name_value", + ) + + # Make the request + response = client.get_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.GetJobRequest, dict]): The request object. Request message for @@ -584,6 +625,26 @@ def create_job( ) -> gcs_job.Job: r"""Creates a job. + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_create_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.CreateJobRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.CreateJobRequest, dict]): The request object. Request message for @@ -684,6 +745,26 @@ def update_job( retry the UpdateJob request until a successful response is received. + + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_update_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.UpdateJobRequest( + ) + + # Make the request + response = client.update_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.UpdateJobRequest, dict]): The request object. Request message for @@ -770,6 +851,23 @@ def delete_job( ) -> None: r"""Deletes a job. + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_delete_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.DeleteJobRequest( + name="name_value", + ) + + # Make the request + client.delete_job(request=request) + Args: request (Union[google.cloud.scheduler_v1beta1.types.DeleteJobRequest, dict]): The request object. Request message for deleting a job @@ -846,6 +944,27 @@ def pause_job( [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be paused. + + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_pause_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.PauseJobRequest( + name="name_value", + ) + + # Make the request + response = client.pause_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.PauseJobRequest, dict]): The request object. Request message for @@ -928,6 +1047,27 @@ def resume_job( [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed. + + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_resume_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.ResumeJobRequest( + name="name_value", + ) + + # Make the request + response = client.resume_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.ResumeJobRequest, dict]): The request object. Request message for @@ -1002,6 +1142,27 @@ def run_job( When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running. + + + .. code-block:: + + from google.cloud import scheduler_v1beta1 + + def sample_run_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.RunJobRequest( + name="name_value", + ) + + # Make the request + response = client.run_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.scheduler_v1beta1.types.RunJobRequest, dict]): The request object. Request message for forcing a job to diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_create_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_create_job_async.py new file mode 100644 index 00000000..70697b6c --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_create_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_CreateJob_async] +from google.cloud import scheduler_v1 + + +async def sample_create_job(): + # Create a client + client = scheduler_v1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1.CreateJobRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_CreateJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_create_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_create_job_sync.py new file mode 100644 index 00000000..be377b34 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_create_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_CreateJob_sync] +from google.cloud import scheduler_v1 + + +def sample_create_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.CreateJobRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_CreateJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_delete_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_delete_job_async.py new file mode 100644 index 00000000..5686b20c --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_delete_job_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_DeleteJob_async] +from google.cloud import scheduler_v1 + + +async def sample_delete_job(): + # Create a client + client = scheduler_v1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1.DeleteJobRequest( + name="name_value", + ) + + # Make the request + await client.delete_job(request=request) + + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_DeleteJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_delete_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_delete_job_sync.py new file mode 100644 index 00000000..1f8dd8ba --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_delete_job_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_DeleteJob_sync] +from google.cloud import scheduler_v1 + + +def sample_delete_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.DeleteJobRequest( + name="name_value", + ) + + # Make the request + client.delete_job(request=request) + + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_DeleteJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_get_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_get_job_async.py new file mode 100644 index 00000000..328e1e82 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_get_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_GetJob_async] +from google.cloud import scheduler_v1 + + +async def sample_get_job(): + # Create a client + client = scheduler_v1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1.GetJobRequest( + name="name_value", + ) + + # Make the request + response = await client.get_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_GetJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_get_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_get_job_sync.py new file mode 100644 index 00000000..ec12eb8f --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_get_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_GetJob_sync] +from google.cloud import scheduler_v1 + + +def sample_get_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.GetJobRequest( + name="name_value", + ) + + # Make the request + response = client.get_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_GetJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_list_jobs_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_list_jobs_async.py new file mode 100644 index 00000000..95439f47 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_list_jobs_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListJobs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_ListJobs_async] +from google.cloud import scheduler_v1 + + +async def sample_list_jobs(): + # Create a client + client = scheduler_v1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1.ListJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_jobs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_ListJobs_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_list_jobs_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_list_jobs_sync.py new file mode 100644 index 00000000..25531a41 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_list_jobs_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListJobs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_ListJobs_sync] +from google.cloud import scheduler_v1 + + +def sample_list_jobs(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.ListJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_jobs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_ListJobs_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_pause_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_pause_job_async.py new file mode 100644 index 00000000..68a5ff2e --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_pause_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PauseJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_PauseJob_async] +from google.cloud import scheduler_v1 + + +async def sample_pause_job(): + # Create a client + client = scheduler_v1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1.PauseJobRequest( + name="name_value", + ) + + # Make the request + response = await client.pause_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_PauseJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_pause_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_pause_job_sync.py new file mode 100644 index 00000000..0db7b974 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_pause_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PauseJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_PauseJob_sync] +from google.cloud import scheduler_v1 + + +def sample_pause_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.PauseJobRequest( + name="name_value", + ) + + # Make the request + response = client.pause_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_PauseJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_resume_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_resume_job_async.py new file mode 100644 index 00000000..2b8a9a0b --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_resume_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResumeJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_ResumeJob_async] +from google.cloud import scheduler_v1 + + +async def sample_resume_job(): + # Create a client + client = scheduler_v1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1.ResumeJobRequest( + name="name_value", + ) + + # Make the request + response = await client.resume_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_ResumeJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_resume_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_resume_job_sync.py new file mode 100644 index 00000000..ffcf92a2 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_resume_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResumeJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_ResumeJob_sync] +from google.cloud import scheduler_v1 + + +def sample_resume_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.ResumeJobRequest( + name="name_value", + ) + + # Make the request + response = client.resume_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_ResumeJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_run_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_run_job_async.py new file mode 100644 index 00000000..e1302e2f --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_run_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RunJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_RunJob_async] +from google.cloud import scheduler_v1 + + +async def sample_run_job(): + # Create a client + client = scheduler_v1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1.RunJobRequest( + name="name_value", + ) + + # Make the request + response = await client.run_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_RunJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_run_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_run_job_sync.py new file mode 100644 index 00000000..f7ec6dc8 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_run_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RunJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_RunJob_sync] +from google.cloud import scheduler_v1 + + +def sample_run_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.RunJobRequest( + name="name_value", + ) + + # Make the request + response = client.run_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_RunJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_update_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_update_job_async.py new file mode 100644 index 00000000..886869ec --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_update_job_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_UpdateJob_async] +from google.cloud import scheduler_v1 + + +async def sample_update_job(): + # Create a client + client = scheduler_v1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1.UpdateJobRequest( + ) + + # Make the request + response = await client.update_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_UpdateJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_update_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_update_job_sync.py new file mode 100644 index 00000000..d69d9111 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1_cloud_scheduler_update_job_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1_CloudScheduler_UpdateJob_sync] +from google.cloud import scheduler_v1 + + +def sample_update_job(): + # Create a client + client = scheduler_v1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1.UpdateJobRequest( + ) + + # Make the request + response = client.update_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1_CloudScheduler_UpdateJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_create_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_create_job_async.py new file mode 100644 index 00000000..5bdac98b --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_create_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_CreateJob_async] +from google.cloud import scheduler_v1beta1 + + +async def sample_create_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.CreateJobRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_CreateJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_create_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_create_job_sync.py new file mode 100644 index 00000000..3a5b878d --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_create_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_CreateJob_sync] +from google.cloud import scheduler_v1beta1 + + +def sample_create_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.CreateJobRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_CreateJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_delete_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_delete_job_async.py new file mode 100644 index 00000000..4ae48c2f --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_delete_job_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_DeleteJob_async] +from google.cloud import scheduler_v1beta1 + + +async def sample_delete_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.DeleteJobRequest( + name="name_value", + ) + + # Make the request + await client.delete_job(request=request) + + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_DeleteJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_delete_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_delete_job_sync.py new file mode 100644 index 00000000..02ed0ad5 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_delete_job_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_DeleteJob_sync] +from google.cloud import scheduler_v1beta1 + + +def sample_delete_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.DeleteJobRequest( + name="name_value", + ) + + # Make the request + client.delete_job(request=request) + + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_DeleteJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_get_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_get_job_async.py new file mode 100644 index 00000000..7e8b0b42 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_get_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_GetJob_async] +from google.cloud import scheduler_v1beta1 + + +async def sample_get_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.GetJobRequest( + name="name_value", + ) + + # Make the request + response = await client.get_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_GetJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_get_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_get_job_sync.py new file mode 100644 index 00000000..842a345c --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_get_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_GetJob_sync] +from google.cloud import scheduler_v1beta1 + + +def sample_get_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.GetJobRequest( + name="name_value", + ) + + # Make the request + response = client.get_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_GetJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_list_jobs_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_list_jobs_async.py new file mode 100644 index 00000000..b0430b7f --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_list_jobs_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListJobs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ListJobs_async] +from google.cloud import scheduler_v1beta1 + + +async def sample_list_jobs(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.ListJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_jobs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ListJobs_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_list_jobs_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_list_jobs_sync.py new file mode 100644 index 00000000..95849241 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_list_jobs_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListJobs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ListJobs_sync] +from google.cloud import scheduler_v1beta1 + + +def sample_list_jobs(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.ListJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_jobs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ListJobs_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_pause_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_pause_job_async.py new file mode 100644 index 00000000..ef4c0f70 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_pause_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PauseJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_PauseJob_async] +from google.cloud import scheduler_v1beta1 + + +async def sample_pause_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.PauseJobRequest( + name="name_value", + ) + + # Make the request + response = await client.pause_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_PauseJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_pause_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_pause_job_sync.py new file mode 100644 index 00000000..9d5f3bf2 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_pause_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PauseJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_PauseJob_sync] +from google.cloud import scheduler_v1beta1 + + +def sample_pause_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.PauseJobRequest( + name="name_value", + ) + + # Make the request + response = client.pause_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_PauseJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_resume_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_resume_job_async.py new file mode 100644 index 00000000..6b7a829f --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_resume_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResumeJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ResumeJob_async] +from google.cloud import scheduler_v1beta1 + + +async def sample_resume_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.ResumeJobRequest( + name="name_value", + ) + + # Make the request + response = await client.resume_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ResumeJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_resume_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_resume_job_sync.py new file mode 100644 index 00000000..1edd3ec8 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_resume_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResumeJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ResumeJob_sync] +from google.cloud import scheduler_v1beta1 + + +def sample_resume_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.ResumeJobRequest( + name="name_value", + ) + + # Make the request + response = client.resume_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ResumeJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_run_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_run_job_async.py new file mode 100644 index 00000000..e3a7e433 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_run_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RunJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_RunJob_async] +from google.cloud import scheduler_v1beta1 + + +async def sample_run_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.RunJobRequest( + name="name_value", + ) + + # Make the request + response = await client.run_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_RunJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_run_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_run_job_sync.py new file mode 100644 index 00000000..02a53f74 --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_run_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RunJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_RunJob_sync] +from google.cloud import scheduler_v1beta1 + + +def sample_run_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.RunJobRequest( + name="name_value", + ) + + # Make the request + response = client.run_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_RunJob_sync] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_update_job_async.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_update_job_async.py new file mode 100644 index 00000000..c1c3ab6f --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_update_job_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_UpdateJob_async] +from google.cloud import scheduler_v1beta1 + + +async def sample_update_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerAsyncClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.UpdateJobRequest( + ) + + # Make the request + response = await client.update_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_UpdateJob_async] diff --git a/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_update_job_sync.py b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_update_job_sync.py new file mode 100644 index 00000000..5f53cffa --- /dev/null +++ b/samples/generated_samples/cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_update_job_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-scheduler + + +# [START cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_UpdateJob_sync] +from google.cloud import scheduler_v1beta1 + + +def sample_update_job(): + # Create a client + client = scheduler_v1beta1.CloudSchedulerClient() + + # Initialize request argument(s) + request = scheduler_v1beta1.UpdateJobRequest( + ) + + # Make the request + response = client.update_job(request=request) + + # Handle the response + print(response) + +# [END cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_UpdateJob_sync] diff --git a/samples/generated_samples/snippet_metadata_scheduler_v1.json b/samples/generated_samples/snippet_metadata_scheduler_v1.json new file mode 100644 index 00000000..7fcc78d5 --- /dev/null +++ b/samples/generated_samples/snippet_metadata_scheduler_v1.json @@ -0,0 +1,712 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "CreateJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_create_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_CreateJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "CreateJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_create_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_CreateJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "DeleteJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_delete_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_DeleteJob_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "DeleteJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_delete_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_DeleteJob_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "GetJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_get_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_GetJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "GetJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_get_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_GetJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "ListJobs" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_list_jobs_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_ListJobs_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "ListJobs" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_list_jobs_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_ListJobs_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "PauseJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_pause_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_PauseJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "PauseJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_pause_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_PauseJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "ResumeJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_resume_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_ResumeJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "ResumeJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_resume_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_ResumeJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "RunJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_run_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_RunJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "RunJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_run_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_RunJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "UpdateJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_update_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_UpdateJob_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "UpdateJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1_cloud_scheduler_update_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1_CloudScheduler_UpdateJob_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/samples/generated_samples/snippet_metadata_scheduler_v1beta1.json b/samples/generated_samples/snippet_metadata_scheduler_v1beta1.json new file mode 100644 index 00000000..9539357b --- /dev/null +++ b/samples/generated_samples/snippet_metadata_scheduler_v1beta1.json @@ -0,0 +1,712 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "CreateJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_create_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_CreateJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "CreateJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_create_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_CreateJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "DeleteJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_delete_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_DeleteJob_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "DeleteJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_delete_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_DeleteJob_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "GetJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_get_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_GetJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "GetJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_get_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_GetJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "ListJobs" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_list_jobs_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ListJobs_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "ListJobs" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_list_jobs_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ListJobs_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "PauseJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_pause_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_PauseJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "PauseJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_pause_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_PauseJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "ResumeJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_resume_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ResumeJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "ResumeJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_resume_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_ResumeJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "RunJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_run_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_RunJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "RunJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_run_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_RunJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "UpdateJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_update_job_async.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_UpdateJob_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "CloudScheduler" + }, + "shortName": "UpdateJob" + } + }, + "file": "cloudscheduler_generated_scheduler_v1beta1_cloud_scheduler_update_job_sync.py", + "regionTag": "cloudscheduler_generated_scheduler_v1beta1_CloudScheduler_UpdateJob_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +}